Add patch MIRA0001-Allow-parcing-indices-override-files-when-architect.patch 6.0 6.0-updates 6.0.1 6.1 6.2 master
authorDmitry Burmistrov <dburmistrov@mirantis.com>
Tue, 19 Aug 2014 17:37:09 +0000 (21:37 +0400)
committerDmitry Burmistrov <dburmistrov@mirantis.com>
Tue, 19 Aug 2014 17:38:00 +0000 (21:38 +0400)
Change-Id: Icfe4d8a18ba50cde71e0016e8b4159f430a0512e
Closes-Bug: #1358785

MIRA0001-Allow-parcing-indices-override-files-when-architect.patch [new file with mode: 0644]
dpkg.spec

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 (file)
index 0000000..8e3e8ef
--- /dev/null
@@ -0,0 +1,49 @@
+From 09efec567e6b0baa835c1921c222a5a967cf193a Mon Sep 17 00:00:00 2001
+From: Dennis Dmitriev <ddmitriev@mirantis.com>
+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
+
index c233462fed14376930ea643499f81082000e6c2e..34a951ed76027944e36bac5cd6082f5e739afb12 100644 (file)
--- 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