Skip to content

Commit

Permalink
when a package is already installed, output the same to console, upda…
Browse files Browse the repository at this point in the history
…te to version 1.0.9

Change-Id: If17d3ebdd085248eb6aa5ab15a9477287a6ab9df
  • Loading branch information
ppadmavilasom committed May 20, 2016
1 parent 4a8985d commit cc87944
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions client/packageutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,11 @@ TDNFAddPackagesForInstall(
{
hy_packagelist_push(hPkgListGoal, hPkgTemp);
}
else
{
dwError = ERROR_TDNF_ALREADY_INSTALLED;
BAIL_ON_TDNF_ERROR(dwError);
}
}
else
{
Expand Down
5 changes: 5 additions & 0 deletions client/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ TDNFPrepareSinglePkg(
return dwError;

error:
if(dwError == ERROR_TDNF_ALREADY_INSTALLED)
{
dwError = 0;
fprintf(stderr, "Package %s is already installed.\n", pszPkgName);
}
if(dwError == ERROR_TDNF_NO_UPGRADE_PATH)
{
dwError = 0;
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(tdnf, 1.0.8)
AC_INIT(tdnf, 1.0.9)
AC_MSG_NOTICE([tdnf configuration])

AC_CANONICAL_SYSTEM
Expand Down
6 changes: 4 additions & 2 deletions include/tdnferror.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ extern "C" {
//
#define ERROR_TDNF_INVALID_ALLOCSIZE 1024
#define ERROR_TDNF_STRING_TOO_LONG 1025
//alter errors
#define ERROR_TDNF_ALREADY_INSTALLED 1026
#define ERROR_TDNF_NO_UPGRADE_PATH 1027
#define ERROR_TDNF_NO_DOWNGRADE_PATH 1028

//Hawkey errors 1300 to 1399
#define ERROR_TDNF_HAWKEY_BASE 1300
Expand Down Expand Up @@ -111,8 +115,6 @@ extern "C" {
#define ERROR_TDNF_RPM_GPG_PARSE_FAILED 1513
#define ERROR_TDNF_RPM_GPG_NO_MATCH 1514
#define ERROR_TDNF_RPM_CHECK 1515
#define ERROR_TDNF_NO_UPGRADE_PATH 1516
#define ERROR_TDNF_NO_DOWNGRADE_PATH 1517

//RPM Transaction
#define ERROR_TDNF_TRANS_INCOMPLETE 1525
Expand Down

0 comments on commit cc87944

Please sign in to comment.