diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-04-30 13:55:01 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-04-30 13:55:43 +0200 |
commit | 10790e75c710dd9593544898cd92dd5d6e09fa2d (patch) | |
tree | 908320ccf547ae79e65fff0847ca12e05f0062ef | |
parent | 4b600c3e4d2a6f5d5bf954461275fbe7a845c913 (diff) | |
download | perl-URPM-10790e75c710dd9593544898cd92dd5d6e09fa2d.tar perl-URPM-10790e75c710dd9593544898cd92dd5d6e09fa2d.tar.gz perl-URPM-10790e75c710dd9593544898cd92dd5d6e09fa2d.tar.bz2 perl-URPM-10790e75c710dd9593544898cd92dd5d6e09fa2d.tar.xz perl-URPM-10790e75c710dd9593544898cd92dd5d6e09fa2d.zip |
fix compiling with rpm-4.10 (eg: Debian 7 Wheezy)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM.xs | 10 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,5 @@ +- fix compiling with rpm-4.10 (eg: Debian 7 Wheezy) + Version 5.27 - 29 April 2020 - fix testing on pre UsrMove Linuxes (eg: mga2) @@ -137,6 +137,10 @@ typedef struct s_Package* URPM__Package; #endif #endif +#if defined(RPM4_12_0) || defined(PATCHED_MGA) || defined(PATCHED_RH) +#define WEAK_DEPS_ARE_SUPPORTED +#endif + static ssize_t write_nocheck(int fd, const void *buf, size_t count) { return write(fd, buf, count); } @@ -794,8 +798,10 @@ pack_header(const URPM__Package pkg) { if (pkg->filesize == 0) pkg->filesize = get_filesize(pkg->h); if (pkg->requires == NULL) pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION); +#ifdef WEAK_DEPS_ARE_SUPPORTED if (pkg->recommends == NULL) pkg->recommends = pack_list(pkg->h, RPMTAG_RECOMMENDNAME, 0, 0); +#endif if (pkg->obsoletes == NULL) pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION); if (pkg->conflicts == NULL) @@ -1919,7 +1925,9 @@ Pkg_obsoletes(pkg) case 1: tag = RPMTAG_CONFLICTNAME; s = pkg->conflicts; flags = RPMTAG_CONFLICTFLAGS; tag_version = RPMTAG_CONFLICTVERSION; break; case 2: tag = RPMTAG_PROVIDENAME; s = pkg->provides; flags = RPMTAG_PROVIDEFLAGS; tag_version = RPMTAG_PROVIDEVERSION; break; case 3: tag = RPMTAG_REQUIRENAME; s = pkg->requires; flags = RPMTAG_REQUIREFLAGS; tag_version = RPMTAG_REQUIREVERSION; break; +#ifdef WEAK_DEPS_ARE_SUPPORTED case 4: tag = RPMTAG_RECOMMENDNAME;s = pkg->recommends;flags = RPMTAG_RECOMMENDFLAGS;tag_version = RPMTAG_RECOMMENDVERSION;break; +#endif default: tag = RPMTAG_OBSOLETENAME; s = pkg->obsoletes; flags = RPMTAG_OBSOLETEFLAGS; tag_version = RPMTAG_OBSOLETEVERSION; break; } return_list_str(s, pkg->h, tag, flags, tag_version, callback_list_str_xpush, NULL); @@ -1942,7 +1950,9 @@ 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; +#ifdef WEAK_DEPS_ARE_SUPPORTED case 4: tag = RPMTAG_RECOMMENDNAME;s = pkg->recommends; break; +#endif default: tag = RPMTAG_OBSOLETENAME; s = pkg->obsoletes; break; } return_list_str(s, pkg->h, tag, 0, 0, callback_list_str_xpush, NULL); |