[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.15.12-4-g4662406

Pino Toscano pino at moszumanska.debian.org
Sat Feb 15 15:39:33 UTC 2014


Gitweb-URL: http://git.debian.org/?p=pkg-kde/pkg-kde-tools.git;a=commitdiff;h=4662406

The following commit has been merged in the master branch:
commit 4662406a46fa3626938bf1e02780ab3b83b44ee0
Author: Pino Toscano <pino at debian.org>
Date:   Sat Feb 15 16:39:09 2014 +0100

    debcontrol2cmake.pl: filter out binaries not belonging to build arch
---
 cmake/debcontrol2cmake.pl | 17 +++++++++++++++++
 debian/changelog          |  4 ++++
 2 files changed, 21 insertions(+)

diff --git a/cmake/debcontrol2cmake.pl b/cmake/debcontrol2cmake.pl
index fc160de..5496342 100755
--- a/cmake/debcontrol2cmake.pl
+++ b/cmake/debcontrol2cmake.pl
@@ -20,6 +20,20 @@ use warnings;
 
 use Dpkg::Control::Info;
 use Dpkg::Control;
+use Dpkg::Arch;
+
+sub samearch {
+    my $arch = shift;
+    my @archlist = split(/\s+/, shift);
+
+    foreach my $a (@archlist) {
+        if (system("dpkg-architecture", "-a$arch", "-i$a") == 0) {
+            return 1;
+        }
+    }
+
+    return 0;
+}
 
 # Parse command line arguments
 my @fields;
@@ -36,11 +50,14 @@ for (my $i = 0; $i < @ARGV; $i++) {
     }
 }
 
+my $arch = Dpkg::Arch::get_build_arch();
+
 # Retrieve requested fields and generate set statements
 my $control = Dpkg::Control::Info->new("debian/control");
 foreach my $pkg ($control->{source}, @{$control->{packages}}) {
     my $pkgok;
     my $pkgname = ($pkg->get_type() ==  CTRL_INFO_SRC) ? "Source" : $pkg->{Package};
+    next if $pkg->get_type() == CTRL_INFO_PKG && !samearch($arch, $pkg->{"Architecture"});
     foreach my $field (@fields) {
         my $val;
         if (exists $pkg->{$field}) {
diff --git a/debian/changelog b/debian/changelog
index 0143830..37702e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ pkg-kde-tools (0.15.13) UNRELEASED; urgency=medium
   [ Maximiliano Curia ]
   * Fix "Useless use of \E at" warning in dhmk.pl.
 
+  [ Pino Toscano ]
+  * debcontrol2cmake.pl: filter out binary packages not belonging to the build
+    architecture.
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Tue, 14 Jan 2014 12:49:44 -0300
 
 pkg-kde-tools (0.15.12) unstable; urgency=low

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list