commit b10643ac91ae601333286a815fcb3586aa66c24b
Author: Jan Rękorajski <[email protected]>
Date:   Thu Jan 24 12:33:15 2013 +0100

    - teach rpm dependency generator that we have python stuff also in 
/usr/share/python*
    - rel 38

 rpm-python-sitescriptdir.patch | 34 ++++++++++++++++++++++++++++++++++
 rpm.spec                       |  4 +++-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index f067989..c94a844 100644
--- 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
diff --git a/rpm-python-sitescriptdir.patch b/rpm-python-sitescriptdir.patch
new file mode 100644
index 0000000..4165211
--- /dev/null
+++ b/rpm-python-sitescriptdir.patch
@@ -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 */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/b10643ac91ae601333286a815fcb3586aa66c24b

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to