Permit multiple versions of a package to be installed (-i)
within a single transaction (rhbz#213399)
This commit is contained in:
parent
cb55ab4c35
commit
dae15112df
|
@ -201,9 +201,12 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
|
||||||
if ((this = rpmteDS(p, RPMTAG_NAME)) == NULL)
|
if ((this = rpmteDS(p, RPMTAG_NAME)) == NULL)
|
||||||
continue; /* XXX can't happen */
|
continue; /* XXX can't happen */
|
||||||
|
|
||||||
/* If newer NEVR was previously added, then skip adding older. */
|
/*
|
||||||
|
* On upgrade, if newer NEVR was previously added,
|
||||||
|
* then skip adding older.
|
||||||
|
*/
|
||||||
rc = rpmdsCompare(newChk, this);
|
rc = rpmdsCompare(newChk, this);
|
||||||
if (rc != 0) {
|
if (upgrade && rc != 0) {
|
||||||
const char * pkgNEVR = rpmdsDNEVR(this);
|
const char * pkgNEVR = rpmdsDNEVR(this);
|
||||||
const char * addNEVR = rpmdsDNEVR(oldChk);
|
const char * addNEVR = rpmdsDNEVR(oldChk);
|
||||||
if (rpmIsVerbose())
|
if (rpmIsVerbose())
|
||||||
|
@ -215,9 +218,12 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If older NEVR was previously added, then replace old with new. */
|
/*
|
||||||
|
* On upgrade, if older NEVR was previously added,
|
||||||
|
* then replace old with new.
|
||||||
|
*/
|
||||||
rc = rpmdsCompare(oldChk, this);
|
rc = rpmdsCompare(oldChk, this);
|
||||||
if (rc != 0) {
|
if (upgrade && rc != 0) {
|
||||||
const char * pkgNEVR = rpmdsDNEVR(this);
|
const char * pkgNEVR = rpmdsDNEVR(this);
|
||||||
const char * addNEVR = rpmdsDNEVR(newChk);
|
const char * addNEVR = rpmdsDNEVR(newChk);
|
||||||
if (rpmIsVerbose())
|
if (rpmIsVerbose())
|
||||||
|
|
Loading…
Reference in New Issue