aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-06-17 13:39:26 +0000
committerFrancois Pons <fpons@mandriva.com>2003-06-17 13:39:26 +0000
commit4882262f5c9b4cccc0e3a4727da776b1ce7fceae (patch)
treeb5172ce6777f57f03bdbb4feb9273d924f7be5ae /URPM.xs
parentb3e34403f39ad7f2a870fd39f35092ac878efd20 (diff)
downloadperl-URPM-4882262f5c9b4cccc0e3a4727da776b1ce7fceae.tar
perl-URPM-4882262f5c9b4cccc0e3a4727da776b1ce7fceae.tar.gz
perl-URPM-4882262f5c9b4cccc0e3a4727da776b1ce7fceae.tar.bz2
perl-URPM-4882262f5c9b4cccc0e3a4727da776b1ce7fceae.tar.xz
perl-URPM-4882262f5c9b4cccc0e3a4727da776b1ce7fceae.zip
0.91-2mdk
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs11
1 files changed, 7 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index 404675c..349fad6 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -98,6 +98,11 @@ typedef struct s_Package* URPM__Package;
#define FILTER_MODE_UPGRADE_FILES 1
#define FILTER_MODE_CONF_FILES 2
+/* promote epoch sense should be :
+ 0 for compability with old packages
+ 1 for rpm 4.2 and better new approach. */
+#define PROMOTE_EPOCH_SENSE 1
+
/* these are in rpmlib but not in rpmlib.h */
int readLead(FD_t fd, struct rpmlead *lead);
#ifdef RPM_42
@@ -2812,10 +2817,8 @@ Urpm_ranges_overlap(a, b)
/* now compare epoch */
if (ea && eb)
sense = rpmvercmp(*ea ? ea : "0", *eb ? eb : "0");
- /* if we need to promote, sense is 1 else it is kept as 0
- else if (ea && *ea && atol(ea) > 0)
- sense = 0;
- */
+ else if (ea && *ea && atol(ea) > 0)
+ sense = PROMOTE_EPOCH_SENSE;
else if (eb && *eb && atol(eb) > 0)
sense = -1;
/* now compare version and release if epoch has not been enough */