[packages/rpm] fast_python_deps: examine .egg-info files too

jajcus jajcus at pld-linux.org
Sun Nov 29 10:13:10 CET 2015


commit 296155b5f0d8bf6b3b2f393ef4e77bc286924040
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Sun Nov 29 10:12:23 2015 +0100

    fast_python_deps: examine .egg-info files too
    
    python-docutils has an .egg-info file instead of a directory, for some
    reason.
    
    Release: 31

 fast_python_deps.patch | 16 ++++++++++++----
 rpm.spec               |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index b1b268a..ec43cff 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	5.4.15
-Release:	30
+Release:	31
 License:	LGPL v2.1
 Group:		Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
diff --git a/fast_python_deps.patch b/fast_python_deps.patch
index 1decba7..f22e1b0 100644
--- a/fast_python_deps.patch
+++ b/fast_python_deps.patch
@@ -1,6 +1,6 @@
 diff -dur -x '*~' -x '*.orig' rpm-5.4.15.orig/lib/rpmfc.c rpm-5.4.15/lib/rpmfc.c
---- rpm-5.4.15.orig/lib/rpmfc.c	2015-11-23 20:38:44.516459734 +0100
-+++ rpm-5.4.15/lib/rpmfc.c	2015-11-23 20:39:56.267070624 +0100
+--- rpm-5.4.15.orig/lib/rpmfc.c	2015-11-29 09:57:16.945204643 +0100
++++ rpm-5.4.15/lib/rpmfc.c	2015-11-29 09:59:24.804768239 +0100
 @@ -604,8 +604,6 @@
    /* XXX "a /usr/bin/python -t script text executable" */
    /* XXX "python 2.3 byte-compiled" */
@@ -20,7 +20,7 @@ diff -dur -x '*~' -x '*.orig' rpm-5.4.15.orig/lib/rpmfc.c rpm-5.4.15/lib/rpmfc.c
  
      miRE mire;
      int skipProv = fc->skipProv;
-@@ -1156,8 +1157,25 @@
+@@ -1156,8 +1157,29 @@
  		if ((fn[0] == '3' && fn[1] == '2') || 
  			(fn[0] == '6' && fn[1] == '4'))
  		    fn += 2;
@@ -44,11 +44,15 @@ diff -dur -x '*~' -x '*.orig' rpm-5.4.15.orig/lib/rpmfc.c rpm-5.4.15/lib/rpmfc.c
 +			/* get all PKG-INFO files for egg-info data */
 +			fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
 +		    }
++		    else if (l > 8 && !strcmp(fn + l - 8, "egg-info")) {
++			/* get all .egg-info files too */
++			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"))) {
-@@ -1184,8 +1202,25 @@
+@@ -1184,8 +1206,29 @@
  	    fn = strstr(fc->fn[fc->ix], "/usr/share");
  	    if (fn) {
  		fn += sizeof("/usr/share")-1;
@@ -72,6 +76,10 @@ diff -dur -x '*~' -x '*.orig' rpm-5.4.15.orig/lib/rpmfc.c rpm-5.4.15/lib/rpmfc.c
 +			/* get all PKG-INFO files for egg-info data */
 +			fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
 +		    }
++		    else if (l > 8 && !strcmp(fn + l - 8, "egg-info")) {
++			/* get all .egg-info files too */
++			fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
++		    }
 +		}
  		else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1) || !strncmp(fn, "/gems/specifications", sizeof("/gems/specifications")-1)) {
  		    fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list