From adf839f07a8ac975656c0aaad5f3f7538fbf7433 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 24 2016 13:48:12 +0000 Subject: Backport patch for missing import in Python dependency generator Signed-off-by: Igor Gnatenko --- diff --git a/rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch b/rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch new file mode 100644 index 0000000..2a0b121 --- /dev/null +++ b/rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch @@ -0,0 +1,34 @@ +From 30d472c8af086df077e6cf047a87fdaf93c9b21b Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Wed, 24 Aug 2016 15:37:16 +0200 +Subject: [PATCH] pythondistdeps.py: add forgotten import + +Signed-off-by: Igor Gnatenko +--- + scripts/pythondistdeps.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py +index 76017f3..e4b99e2 100755 +--- a/scripts/pythondistdeps.py ++++ b/scripts/pythondistdeps.py +@@ -15,6 +15,7 @@ from getopt import getopt + from os.path import basename, dirname, isdir, sep + from sys import argv, stdin, version + from distutils.sysconfig import get_python_lib ++from warnings import warn + + + opts, args = getopt( +@@ -108,7 +109,7 @@ for f in files: + dist = Distribution.from_location(path_item, dist_name, metadata) + # Check if py_version is defined in the file + if not dist.py_version: +- warnings.warn("Version for {!r} has not been found".format(dist), RuntimeWarning) ++ warn("Version for {!r} has not been found".format(dist), RuntimeWarning) + continue + if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides: + # Get the Python major version +-- +2.9.3 + diff --git a/rpm.spec b/rpm.spec index f5fbc08..da78afd 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}45%{?dist} +Release: %{?snapver:0.%{snapver}.}46%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -91,6 +91,7 @@ Patch135: rpm-4.13.x-pythondistdeps-fileattr.patch Patch136: rpm-4.13.x-pythondistdeps.py-skip-distribution-metadata-if-ther.patch Patch137: rpm-4.13.x-pythondistdeps.py-show-warning-if-version-is-not-fou.patch Patch138: rpm-4.13.x-pythondistdeps.py-skip-.egg-link-files.patch +Patch139: rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch @@ -598,6 +599,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Wed Aug 24 2016 Igor Gnatenko - 4.13.0-0.rc1.46 +- Backport patch for missing import in Python dependency generator + * Wed Aug 24 2016 Kalev Lember - 4.13.0-0.rc1.45 - Fix -python2 and -python3 subpackage obsoleting from .42