aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs38
1 files changed, 3 insertions, 35 deletions
diff --git a/URPM.xs b/URPM.xs
index 4a06fb3..f098bf0 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -302,16 +302,6 @@ ranges_overlap(rpmsenseFlags aflags, char *sa, rpmsenseFlags bflags, char *sb) {
}
}
-static rpmsenseFlags has_old_suggests;
-rpmsenseFlags is_old_suggests(rpmsenseFlags flags) {
- rpmsenseFlags is = flags & RPMSENSE_MISSINGOK;
- if (is) has_old_suggests = is;
- return is;
-}
-rpmsenseFlags is_not_old_suggests(rpmsenseFlags flags) {
- return !is_old_suggests(flags);
-}
-
typedef int (*callback_list_str)(char *s, int slen, const char *name, const rpmsenseFlags flags, const char *evr, void *param);
static int
@@ -334,22 +324,7 @@ callback_list_str_xpush_requires(char *s, int slen, const char *name, const rpms
dSP;
if (s)
mXPUSHs(newSVpv(s, slen));
- else if (is_not_old_suggests(flags)) {
- char buff[4096];
- int len = print_list_entry(buff, sizeof(buff)-1, name, flags, evr);
- if (len >= 0)
- mXPUSHs(newSVpv(buff, len));
- }
- PUTBACK;
- /* returning zero indicates to continue processing */
- return 0;
-}
-static int
-callback_list_str_xpush_old_suggests(char *s, int slen, const char *name, rpmsenseFlags flags, const char *evr, __attribute__((unused)) void *param) {
- dSP;
- if (s)
- mXPUSHs(newSVpv(s, slen));
- else if (is_old_suggests(flags)) {
+ else {
char buff[4096];
int len = print_list_entry(buff, sizeof(buff)-1, name, flags, evr);
if (len >= 0)
@@ -831,11 +806,7 @@ pack_header(const URPM__Package pkg) {
}
if (pkg->filesize == 0) pkg->filesize = get_filesize(pkg->h);
if (pkg->requires == NULL && pkg->suggests == NULL)
- has_old_suggests = 0;
- pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION, is_not_old_suggests);
- if (has_old_suggests)
- pkg->suggests = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION, is_old_suggests);
- else
+ pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION, NULL);
pkg->suggests = pack_list(pkg->h, RPMTAG_SUGGESTSNAME, 0, 0, NULL);
if (pkg->obsoletes == NULL)
pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION, NULL);
@@ -1953,10 +1924,7 @@ Pkg_suggests(pkg)
URPM::Package pkg
PPCODE:
PUTBACK;
- int count = return_list_str(pkg->suggests, pkg->h, RPMTAG_SUGGESTSNAME, 0, 0, callback_list_str_xpush, NULL);
- if (count == 0)
- return_list_str(pkg->suggests, pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, 0,
- callback_list_str_xpush_old_suggests, NULL);
+ return_list_str(pkg->suggests, pkg->h, RPMTAG_SUGGESTSNAME, 0, 0, callback_list_str_xpush, NULL);
SPAGAIN;
void