diff --git a/lib/psm.c b/lib/psm.c index 9998b06..3b7c17f 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -40,7 +40,7 @@ static int upgrade_honor_buildtime(void) static int honor_buildtime = -1; if (honor_buildtime < 0) - honor_buildtime = rpmExpandNumeric("%{?_upgrade_honor_buildtime}") ? 1 : 0; + honor_buildtime = rpmExpandNumeric("%{?_upgrade_honor_buildtime}%{?!_upgrade_honor_buildtime:1}") ? 1 : 0; return honor_buildtime; } diff --git a/lib/transaction.c b/lib/transaction.c index a67cde3..a0dd37c 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1521,7 +1521,7 @@ static int upgrade_honor_buildtime(void) static int honor_buildtime = -1; if (honor_buildtime < 0) - honor_buildtime = rpmExpandNumeric("%{?_upgrade_honor_buildtime}") ? 1 : 0; + honor_buildtime = rpmExpandNumeric("%{?_upgrade_honor_buildtime}%{?!_upgrade_honor_buildtime:1}") ? 1 : 0; return honor_buildtime; } diff --git a/rpm-4_0.spec b/rpm-4_0.spec index 19220a8..15ef524 100644 --- a/rpm-4_0.spec +++ b/rpm-4_0.spec @@ -534,8 +534,8 @@ fi - Backported epoch handling fix to package upgrade algorithm. - Backported my own changes to the package upgrade algorithm: + Remove old files on "-U --force" even if package NEVRs match. - + When comparing package versions on -U or -F, optionally - take build dates into account. + + When comparing package versions on -U or -F, take + build dates into account. * Thu Oct 13 2005 Dmitry V. Levin 4.0.4-alt51 - rpmio/macro.c, build/parseSpec: diff --git a/rpmpopt.in b/rpmpopt.in index d35c40b..f44c138 100644 --- a/rpmpopt.in +++ b/rpmpopt.in @@ -205,6 +205,7 @@ rpm alias --vendor --eval %vendor rpm alias --packager --eval %packager rpm alias --distribution --eval %distribution rpm alias --nowait-lock --define '_wait_for_lock 0' +rpm alias --ignorebuildtime --define '_upgrade_honor_buildtime 0' #============================================================================== rpmb alias --dbpath --define '_dbpath !#:+' \ --POPTdesc=$"use as the directory for the database" \ @@ -281,6 +282,7 @@ rpmi alias --ftpport --define '_ftpport !#:+' rpmi alias --ftpproxy --define '_ftpproxy !#:+' rpmi alias --httpport --define '_httpport !#:+' rpmi alias --httpproxy --define '_httpproxy !#:+' +rpmi alias --ignorebuildtime --define '_upgrade_honor_buildtime 0' #============================================================================== rpmk alias --dbpath --define '_dbpath !#:+' \ --POPTdesc=$"use as the directory for the database" \