From: Dmitry Burmistrov Date: Tue, 19 Aug 2014 17:37:09 +0000 (+0400) Subject: Add patch MIRA0001-Allow-parcing-indices-override-files-when-architect.patch X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;p=packages%2Fcentos6%2Fdpkg.git Add patch MIRA0001-Allow-parcing-indices-override-files-when-architect.patch Change-Id: Icfe4d8a18ba50cde71e0016e8b4159f430a0512e Closes-Bug: #1358785 --- diff --git a/MIRA0001-Allow-parcing-indices-override-files-when-architect.patch b/MIRA0001-Allow-parcing-indices-override-files-when-architect.patch new file mode 100644 index 0000000..8e3e8ef --- /dev/null +++ b/MIRA0001-Allow-parcing-indices-override-files-when-architect.patch @@ -0,0 +1,49 @@ +From 09efec567e6b0baa835c1921c222a5a967cf193a Mon Sep 17 00:00:00 2001 +From: Dennis Dmitriev +Date: Tue, 19 Aug 2014 18:31:33 +0300 +Subject: [PATCH] Allow correctly parcing indices/override.* files + +Allow parcing indices/override.* files when architecture +prefixes are used in package names there. It allows to use +dpkg-scanpackages with Ubuntu repositories. + +Originally, dpkg-scanpackages just skip the following lines because it +compares package names without any modification, and cannot find the +apropriate package because 'a2jmidid' != 'a2jmidid/amd64' +For example, several lines from override.precise.extra.main: +... +a2jmidid Bugs https://bugs.launchpad.net/ubuntu/+filebug +a2jmidid Origin Ubuntu +a2jmidid/amd64 Task ubuntustudio-generation, ubuntustudio-recording +a2jmidid/armel Task ubuntustudio-generation, ubuntustudio-recording +a2jmidid/armhf Task ubuntustudio-generation, ubuntustudio-recording +a2jmidid/i386 Task ubuntustudio-generation, ubuntustudio-recording +a2jmidid/powerpc Task ubuntustudio-generation, ubuntustudio-recording +... + +Related-Bug: 1358785 +--- + scripts/dpkg-scanpackages.pl | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl +index 9a3d59c..3d6724b 100755 +--- a/scripts/dpkg-scanpackages.pl ++++ b/scripts/dpkg-scanpackages.pl +@@ -143,7 +143,12 @@ sub load_override_extra + s/\s+$//; + next unless $_; + +- my ($p, $field, $value) = split(/\s+/, $_, 3); ++ my ($pr, $field, $value) = split(/\s+/, $_, 3); ++ ++ my ($p, $parch) = split(/\//, $pr, 2); ++ if (defined($options{arch}) and defined($parch)) { ++ next unless ($options{arch} eq $parch); ++ } + + next unless defined($packages{$p}); + +-- +1.8.5.5 + diff --git a/dpkg.spec b/dpkg.spec index c233462..34a951e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -22,6 +22,7 @@ Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch Patch4: fedora-bug642160-empty-argv.patch Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch +Patch6: MIRA0001-Allow-parcing-indices-override-files-when-architect.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -67,6 +68,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req