Always detect Python egg-info files as text for pythonegg(xxx) Provides generation

This commit is contained in:
Andrey Bondrov 2018-06-21 16:58:10 +10:00
parent b8044820df
commit 43213f186d
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,20 @@
diff -urN rpm-5.4.10-orig/lib/rpmfc.c rpm-5.4.10-patched/lib/rpmfc.c
--- rpm-5.4.10-orig/lib/rpmfc.c 2018-06-21 16:46:02.416087354 +1000
+++ rpm-5.4.10-patched/lib/rpmfc.c 2018-06-21 16:54:06.839041871 +1000
@@ -1468,6 +1468,16 @@
else if (_suffix(s, "qmldir"))
ftype = "qml file";
+ /* XXX all files with extension ".egg" are ASCII text for now. */
+ /* XXX python code examples from them give false Python script result. */
+ else if (_suffix(s, ".egg"))
+ ftype = "ASCII text";
+
+ /* XXX all files with extension ".egg-info" are ASCII text for now. */
+ /* XXX python code examples from them give false Python script result. */
+ else if (_suffix(s, ".egg-info"))
+ ftype = "ASCII text";
+
/* XXX all files with extension ".php" are PHP for now. */
else if (_suffix(s, ".php"))
ftype = "PHP script text";

View file

@ -61,7 +61,7 @@ Summary: The RPM package management system
Name: rpm Name: rpm
Epoch: 1 Epoch: 1
Version: %{libver}.%{minorver} Version: %{libver}.%{minorver}
Release: %{?prereldate:0.%{prereldate}.}78 Release: %{?prereldate:0.%{prereldate}.}79
License: LGPLv2.1+ License: LGPLv2.1+
Group: System/Configuration/Packaging Group: System/Configuration/Packaging
Url: http://rpm5.org/ Url: http://rpm5.org/
@ -524,6 +524,9 @@ Patch516: rpm-5.4.10-appdatadir.patch
# Add QML dependency generator # Add QML dependency generator
Patch517: rpm-5.4.10-qml-dependency-generator.patch Patch517: rpm-5.4.10-qml-dependency-generator.patch
# Always detect Python egg-info files as text for pythonegg(xxx) Provides generation
Patch518: rpm-5.4.10-fix-egg-info-provides.patch
BuildRequires: autoconf >= 2.57 BuildRequires: autoconf >= 2.57
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: automake >= 1.8 BuildRequires: automake >= 1.8
@ -1186,6 +1189,7 @@ This package contains the RPM API documentation generated in HTML format.
%patch515 -p1 -b .fix-addsign-check %patch515 -p1 -b .fix-addsign-check
%patch516 -p1 -b .appdatadir~ %patch516 -p1 -b .appdatadir~
%patch517 -p1 -b .qmldeps~ %patch517 -p1 -b .qmldeps~
%patch518 -p1 -b .egg-info~
#required by P55, P80, P81, P94.. #required by P55, P80, P81, P94..
./autogen.sh ./autogen.sh