From 7bf90f754dc9cf3e7199a8c442626fe3527b82ad Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Jun 2012 17:20:55 +0000 Subject: (obsoletes_overlap) drop 'direction' parameter also fix 'direction' default value for provides_overlap() it was broken since commit r4914 on 2012-06-13: "(provides_overlap) alias it with obsoletes_overlap (saves another 1.1% of code size)" --- NEWS | 4 ++++ URPM.pm | 4 ++-- URPM.xs | 5 ++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index f9fc959..ba935de 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +- drop 'direction' parameter in obsoletes_overlap() & provides_overlap() +- fix default 'direction' for provides_overlap() + (regression in URPM-4.2) + Version 4.5 - 17 June 2012 - drop support for old mdv2008.0 suggests (RPMTAG_REQUIRENAME + RPMSENSE_MISSINGOK) diff --git a/URPM.pm b/URPM.pm index 635f989..242e070 100644 --- a/URPM.pm +++ b/URPM.pm @@ -629,7 +629,7 @@ Full obsoletes tags Just the obsoleted package name. -=item $package->obsoletes_overlap($s, [$direction]) +=item $package->obsoletes_overlap($s) =item $package->os() @@ -647,7 +647,7 @@ Full provides tags Just the provided package name. -=item $package->provides_overlap($s, [$direction]) +=item $package->provides_overlap($s) =item $package->rate() diff --git a/URPM.xs b/URPM.xs index 28a5eeb..4687f86 100644 --- a/URPM.xs +++ b/URPM.xs @@ -1965,10 +1965,9 @@ Pkg_obsoletes_nosense(pkg) SPAGAIN; int -Pkg_obsoletes_overlap(pkg, s, direction=-1) +Pkg_obsoletes_overlap(pkg, s) URPM::Package pkg char *s - int direction ALIAS: provides_overlap = 1 PREINIT: @@ -2006,7 +2005,7 @@ Pkg_obsoletes_overlap(pkg, s, direction=-1) os.evr = s; } else os.evr = ""; - os.direction = direction; + os.direction = ix == 0 ? -1 : 1; /* mark end of name */ if (eon) { eonc = *eon; -- cgit v1.2.1