]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- teach rpm dependency generator that we have python stuff also in /usr/share/python* auto/th/rpm-5.4.10-38
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 24 Jan 2013 11:33:15 +0000 (12:33 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 24 Jan 2013 11:33:15 +0000 (12:33 +0100)
- rel 38

rpm-python-sitescriptdir.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-python-sitescriptdir.patch b/rpm-python-sitescriptdir.patch
new file mode 100644 (file)
index 0000000..4165211
--- /dev/null
@@ -0,0 +1,34 @@
+--- rpm-5.4.10/lib/rpmfc.c~    2012-12-01 21:13:39.985319735 +0100
++++ rpm-5.4.10/lib/rpmfc.c     2013-01-24 12:21:26.379891972 +0100
+@@ -1142,7 +1142,7 @@
+     /* Generate package and per-file dependencies. */
+     for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
+-      /* XXX Insure that /usr/lib{,64}/python files are marked RPMFC_PYTHON */
++      /* XXX Insure that /usr/{share,lib{,64}}/python files are marked RPMFC_PYTHON */
+       /* XXX HACK: classification by path is intrinsically stupid. */
+       {   fn = strstr(fc->fn[fc->ix], "/usr/lib");
+           if (fn) {
+@@ -1166,6 +1166,22 @@
+                       fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
+                   fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
+           }
++          fn = strstr(fc->fn[fc->ix], "/usr/share");
++          if (fn) {
++              fn += sizeof("/usr/share")-1;
++              if (!strncmp(fn, "/python", sizeof("/python")-1))
++                  fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
++              else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
++                  fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
++                  if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
++                      miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
++                      if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
++                          if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
++                              fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
++                      mire = mireFree(mire);
++                  }
++              }
++          }
+       }
+        /* XXX ugly quick & dirty integration of haskell() dependencies */
index f067989af326654ab2778a487a05f2b09b850a50..c94a84405c6e3f5861df39b1674af112ce7a9630 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -52,7 +52,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.10
-Release:       37
+Release:       38
 License:       LGPL
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
@@ -150,6 +150,7 @@ Patch56:    rpm-macros.patch
 Patch57:       %{name}-db5.2.patch
 Patch58:       %{name}-preserve-iterator.patch
 Patch59:       %{name}-triggerin-compat.patch
+Patch60:       %{name}-python-sitescriptdir.patch
 
 # Patches imported from Mandriva
 
@@ -849,6 +850,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch57 -p1
 %patch58 -p1
 %patch59 -p1
+%patch60 -p1
 
 %patch1000 -p1
 %patch1001 -p1
This page took 0.046767 seconds and 4 git commands to generate.