aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-08-26 14:29:35 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-12 23:08:04 +0200
commit3db43b0cf315a4c0c7b78787f637db04045f90ed (patch)
treef5be3b109b317d89f4cfd3eddf4edb651b121c3f /URPM.xs
parent4b366ad2bab97ee59bdd39124d5c75c7ecd8340f (diff)
downloadperl-URPM-3db43b0cf315a4c0c7b78787f637db04045f90ed.tar
perl-URPM-3db43b0cf315a4c0c7b78787f637db04045f90ed.tar.gz
perl-URPM-3db43b0cf315a4c0c7b78787f637db04045f90ed.tar.bz2
perl-URPM-3db43b0cf315a4c0c7b78787f637db04045f90ed.tar.xz
perl-URPM-3db43b0cf315a4c0c7b78787f637db04045f90ed.zip
make it compatible with rpm-4.12.0
rpm-4.12.0 introduces a new weak deps implementation (the 3rd one to be used in mdv/mga!) The tag we used to use (RPMTAG_SUGGESTSNAME) is now OLDSUGGESTSNAME => we need to handle both old & new tags Hopefully rpm-4.12.x enables to check both old & new tags when using xxxNVRS variants We thus have a choice between RECOMMEND & SUGGEST tags, that both fallback on older SUGGESTS tags if no new ones are found. The difference is that they filter old suggests depending on RPMSENSE_STRONG hint. As we used suggests in the recommends role, this is the perfect time to switch from suggests to recommends (with a patch on rpm in order to fallback RECOMMEND on weak (old) SUGGESTS instead of on strong (old) ENHANCES as we didn't used the later in mga) Our rpm is patched so that RECOMMENDNAME fallbacks too. In Suse, only RECOMMENDNEVRS is the only RECOMMEND variant that handle the fallback on old tags. However, using RPMTAG_RECOMMENDNEVRS makes URPM->suggest_nosense to return versionated suggests, which while not supported by urpmi, do are used by a couple packages (such as git or gnome-user-share) This breaks urpmi as suggests on "foo >= x.y" is not interpreted by urpmi which thinks that "foo" is a new suggests and reinstalls a previously removed suggests Hence we patched rpm.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index b90404e..46fc2a9 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -764,7 +764,7 @@ pack_header(const URPM__Package pkg) {
if (pkg->requires == NULL)
pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION);
if (pkg->suggests == NULL)
- pkg->suggests = pack_list(pkg->h, RPMTAG_SUGGESTSNAME, 0, 0);
+ pkg->suggests = pack_list(pkg->h, RPMTAG_RECOMMENDNAME, 0, 0);
if (pkg->obsoletes == NULL)
pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION);
if (pkg->conflicts == NULL)
@@ -1871,7 +1871,7 @@ Pkg_obsoletes_nosense(pkg)
case 1: tag = RPMTAG_CONFLICTNAME; s = pkg->conflicts; break;
case 2: tag = RPMTAG_PROVIDENAME; s = pkg->provides; break;
case 3: tag = RPMTAG_REQUIRENAME; s = pkg->requires; break;
- case 4: tag = RPMTAG_SUGGESTSNAME; s = pkg->suggests; break;
+ case 4: tag = RPMTAG_RECOMMENDNAME;s = pkg->suggests; break;
default: tag = RPMTAG_OBSOLETENAME; s = pkg->obsoletes; break;
}
return_list_str(s, pkg->h, tag, 0, 0, callback_list_str_xpush, NULL);