]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- add patch from mandriva to fix possibility of uprading the same
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 10 Sep 2012 06:02:44 +0000 (08:02 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 10 Sep 2012 06:02:44 +0000 (08:02 +0200)
  package if it has epoch tag (all of our packages do)
- fix running scripts that has only interpreter set and no body
  (post -p /sbin/ldconfig is prime example)

rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch [new file with mode: 0644]
rpm-fix--p-interpreter-and-empty-script.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch b/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
new file mode 100644 (file)
index 0000000..6d81cf4
--- /dev/null
@@ -0,0 +1,22 @@
+--- rpm-5.4.4/lib/transaction.c.epoch_cmp~     2011-11-30 22:25:26.646155379 +0100
++++ rpm-5.4.4/lib/transaction.c        2011-11-30 23:15:28.252768345 +0100
+@@ -1187,12 +1187,15 @@ rpmlog(RPMLOG_DEBUG, D_("sanity checking
+                           const char *val = NULL;
+                           he->tag = tags[t];
+                           xx = headerGet(h, he, 0);
+-                          if (he->tag == RPMTAG_EPOCH)
++                          if (he->tag == RPMTAG_EPOCH) {
+                               val = rpmteE(p);
+-                          else if (he->tag == RPMTAG_DISTEPOCH)
++                              if (val ? atoi(val) : 0 != he->p.ui32p ? *(he->p.ui32p) : 0)
++                                nkeys--;
++                          } else if (he->tag == RPMTAG_DISTEPOCH) {
+                               val = rpmteD(p);
+-                          if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
+-                              nkeys--;
++                              if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
++                                nkeys--;
++                          }
+                           he->p.ptr = _free(he->p.ptr);
+                       }
+                       mi = rpmmiFree(mi);
diff --git a/rpm-fix--p-interpreter-and-empty-script.patch b/rpm-fix--p-interpreter-and-empty-script.patch
new file mode 100644 (file)
index 0000000..8c2f2fc
--- /dev/null
@@ -0,0 +1,15 @@
+--- rpm-5.4.10/lib/psm.c~      2012-09-10 07:58:10.220193941 +0200
++++ rpm-5.4.10/lib/psm.c       2012-09-10 08:00:38.723522037 +0200
+@@ -1172,11 +1172,8 @@
+ assert(fi->h != NULL);
+     She->tag = psm->scriptTag;
+-    if (!headerGet(fi->h, She, 0))
+-      goto exit;
+-
+     Phe->tag = psm->progTag;
+-    if (!headerGet(fi->h, Phe, 0))
++    if (!headerGet(fi->h, She, 0) && !headerGet(fi->h, Phe, 0))
+       goto exit;
+     /* Coerce strings into header argv return. */
index c09a32198c55028183c04abc55eabf8b63185204..31be1b162d44dc23bbf22241cd22d8f3a7679ecf 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -133,6 +133,7 @@ Patch39:    %{name}-postun-nofail.patch
 Patch40:       %{name}-silence-RPM_CHAR_TYPE.patch
 Patch41:       %{name}-fix-missing-types-in-headers.patch
 Patch42:       %{name}-disable-ldconfig-optimization.patch
+Patch43:       %{name}-fix--p-interpreter-and-empty-script.patch
 
 # Patches imported from Mandriva
 
@@ -234,6 +235,8 @@ Patch1037:  rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
 # --ignorearch & --ignoreos to set these.
 # status: needs to be discussed upstream before thinking about merging
 Patch1038:     rpm-5.4.10-support-ignore-arch-and-os-again.patch
+# status: ready for merge
+Patch1039:     rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
 
 URL:           http://rpm5.org/
 BuildRequires: autoconf >= 2.60
@@ -799,6 +802,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch40 -p1
 %patch41 -p1
 %patch42 -p1
+%patch43 -p1
 
 %patch1000 -p1
 %patch1001 -p1
@@ -839,6 +843,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch1036 -p1
 %patch1037 -p1
 %patch1038 -p1
+%patch1039 -p1
 
 install %{SOURCE2} macros/pld.in
 install %{SOURCE8} scripts/php.prov.in
This page took 0.119833 seconds and 4 git commands to generate.