[Rpm-maint] [rpm-software-management/rpm] Add support for --oldpackage to --freshen (PR #2122)

Michal Domonkos notifications at github.com
Thu Jul 14 13:23:00 UTC 2022


@dmnks commented on this pull request.



>      if (name != NULL)
         mi = rpmtsInitIterator(ts, RPMDBI_NAME, name, 0);
     if (rpmtsColor(ts) && arch)
 	rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_DEFAULT, arch);
 
     while ((oldH = rpmdbNextIterator(mi)) != NULL) {
+	if (allowOld)

This doesn't check if `h` (the requested package) really is newer than `oldH` (the installed package). Shouldn't this conditional be `rpmVersionCompare(oldH, h) > 0` instead (or better yet, an `else` branch for the other conditional in the loop)?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2122#pullrequestreview-1038860966
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2122/review/1038860966 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220714/134d3d6f/attachment-0001.html>


More information about the Rpm-maint mailing list