[packages/rpm] - clean, proper fix for namespace clash
baggins
baggins at pld-linux.org
Thu Sep 13 14:54:23 CEST 2012
commit e3f16e1bf34ee15f4065aac1c00e07bad7a080ae
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Sep 13 14:47:26 2012 +0200
- clean, proper fix for namespace clash
This fixes the case when 'P:group(NAME)' satisfies 'C:NAME < EVR'
group(NAME) belongs to RPMNS_TYPE_GROUP namespace and 'NAME < EVR'
to RPMNS_TYPE_VERSION namespace, so they should not be compared.
This should also fix triggers firing on NAME uninstal for packages
providing group(NAME).
rpm-namespace-compare.patch | 15 +++++++++++++++
rpm-namespace-probe.patch | 39 ---------------------------------------
rpm.spec | 4 ++--
3 files changed, 17 insertions(+), 41 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index fa8579e..752c73c 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -47,7 +47,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 5.4.10
-Release: 0.13
+Release: 0.14
License: LGPL
Group: Base
# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
@@ -117,7 +117,7 @@ Patch33: %{name}-cleanbody.patch
Patch34: %{name}-dirdeps-macro.patch
Patch35: %{name}-installbeforeerase.patch
Patch36: %{name}-libmagic-locale.patch
-Patch37: %{name}-namespace-probe.patch
+Patch37: %{name}-namespace-compare.patch
Patch38: %{name}-popt-coreutils.patch
Patch39: %{name}-postun-nofail.patch
Patch40: %{name}-silence-RPM_CHAR_TYPE.patch
diff --git a/rpm-namespace-compare.patch b/rpm-namespace-compare.patch
new file mode 100644
index 0000000..7a2dfa8
--- /dev/null
+++ b/rpm-namespace-compare.patch
@@ -0,0 +1,15 @@
+--- rpm-5.4.10/lib/rpmds.c~ 2012-07-06 17:39:16.000000000 +0200
++++ rpm-5.4.10/lib/rpmds.c 2012-09-13 12:40:32.439076460 +0200
+@@ -4036,6 +4036,12 @@
+
+ assert((rpmdsFlags(A) & RPMSENSE_SENSEMASK) == A->ns.Flags);
+ assert((rpmdsFlags(B) & RPMSENSE_SENSEMASK) == B->ns.Flags);
++ /* Different namespaces don't overlap. */
++ if (A->ns.Type != B->ns.Type) {
++ result = 0;
++ goto exit;
++ }
++
+ /* Different names (and/or name.arch's) don't overlap. */
+ if (rpmdsNAcmp(A, B)) {
+ result = 0;
diff --git a/rpm-namespace-probe.patch b/rpm-namespace-probe.patch
deleted file mode 100644
index acbfb4b..0000000
--- a/rpm-namespace-probe.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Disable Provides: user(NAME), group(NAME) probes as it would fire trigger on NAME uninstall
-
-as for example uninstalling this spec: https://bugs.pld-linux.org/attachment.cgi?id=20
-
-15:30:53 jbj> glen_: rpmns.c splits group(mailman) into the tuple {group, mailman} for name space processing.
-15:32:48 jbj> the code in unbsatisfiedDepnds is driven by the name "group". if split, then its not the string
- "group(mailman)" any more.
-
---- rpm-4.4.9/lib/depends.c~ 2008-04-08 19:44:02.000000000 +0300
-+++ rpm-4.4.9/lib/depends.c 2008-04-25 15:12:52.734623679 +0300
-@@ -611,6 +611,7 @@
- goto exit;
- }
-
-+#if !defined(RPM_VENDOR_PLD)
- /* Evaluate user/group lookup probes. */
- if (NSType == RPMNS_TYPE_USER) {
- const char *s;
-@@ -646,6 +647,7 @@
- rpmdsNotify(dep, _("(group lookup)"), rc);
- goto exit;
- }
-+#endif
-
- /* Evaluate access(2) probe dependencies. */
- if (NSType == RPMNS_TYPE_ACCESS) {
---- rpm-4.4.9/rpmdb/rpmns.c~ 2007-05-16 14:31:58.000000000 +0300
-+++ rpm-4.4.9/rpmdb/rpmns.c 2008-04-25 15:36:20.223855745 +0300
-@@ -179,8 +179,10 @@
- case RPMNS_TYPE_UNAME:
- case RPMNS_TYPE_SONAME:
- case RPMNS_TYPE_ACCESS:
-+#if !defined(RPM_VENDOR_PLD)
- case RPMNS_TYPE_USER:
- case RPMNS_TYPE_GROUP:
-+#endif
- case RPMNS_TYPE_MOUNTED:
- case RPMNS_TYPE_DISKSPACE:
- case RPMNS_TYPE_DIGEST:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/e3f16e1bf34ee15f4065aac1c00e07bad7a080ae
More information about the pld-cvs-commit
mailing list