aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-01-20 21:07:52 +0000
committerThierry Vignaud <tv@mageia.org>2013-01-20 21:07:52 +0000
commit8db371afa188d551f41bf620b9f6814e7c21af1a (patch)
tree8c27e5be8ceb6e2df3338c7ec90dd3880eb67c71
parent96beb8d1223d76de97b620973a35e744692e4e7b (diff)
downloadperl-URPM-8db371afa188d551f41bf620b9f6814e7c21af1a.tar
perl-URPM-8db371afa188d551f41bf620b9f6814e7c21af1a.tar.gz
perl-URPM-8db371afa188d551f41bf620b9f6814e7c21af1a.tar.bz2
perl-URPM-8db371afa188d551f41bf620b9f6814e7c21af1a.tar.xz
perl-URPM-8db371afa188d551f41bf620b9f6814e7c21af1a.zip
(pack_header) separate the suggests & requires cases
the doble test was needed in mdv2008.0 due to suggests being implemented as requires
-rw-r--r--URPM.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index b823ca9..01326e8 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -761,10 +761,10 @@ pack_header(const URPM__Package pkg) {
pkg->info = memcpy(malloc(p-buff), buff, p-buff);
}
if (pkg->filesize == 0) pkg->filesize = get_filesize(pkg->h);
- if (pkg->requires == NULL && pkg->suggests == NULL) {
+ 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);
- }
if (pkg->obsoletes == NULL)
pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION);
if (pkg->conflicts == NULL)