Bug#637282: [Build-common-hackers] Bug#637282: Bug#637282: cdbs: Please support linux-any target

2011-08-13 Thread Emilio Pozuelo Monfort
On 10/08/11 14:00, Jonas Smedegaard wrote:
 On 11-08-10 at 10:37am, Emilio Pozuelo Monfort wrote:
 On 10/08/11 08:24, Nobuhiro Iwamatsu wrote:
 cdbs does not support linux-any target yet.
 I made patch to support linux-any target. Could you apply this 
 patch?

 I tested some package with this patch. Work fine.

 This patch looks wrong. It won't work on !linux-any, e.g. kFreeBSD.

 The right way would be to test it with `dpkg-architecture -i$wildcard` 
 and check if $? == 0.
 
 Ah.  Thanks.
 
 Sounds like you are more into these details than me.  I suspect that 
 perhaps there are limits on which releases of Debian works with above, 
 and also that when it works it might replace parts of the existing 
 script rather than only extending.
 
 So would you perhaps be able to provide a patch?

How about this? (untested)

Emilio
From 8ada9ba6f8f5ed62588c30b201d9c09e67845663 Mon Sep 17 00:00:00 2001
From: Emilio Pozuelo Monfort po...@debian.org
Date: Sat, 13 Aug 2011 13:43:33 +0100
Subject: [PATCH] list-packages: properly parse architecture wildcards

---
 scripts/list-packages |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/list-packages b/scripts/list-packages
index 4b985dc..3642a68 100755
--- a/scripts/list-packages
+++ b/scripts/list-packages
@@ -63,7 +63,10 @@ sub GetPackages {
 			if ($package 
 			(($type eq 'indep'  $arch eq 'all') ||
 			 ($type eq 'arch'  $arch ne 'all') ||
-			 ($type eq 'same'  ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
+			 ($type eq 'same'  (
+$arch eq 'any' ||
+$arch =~ /\b$buildarch\b/ ||
+system (dpkg-architecture -a$buildarch -i$arch) == 0)) ||
 			 ! $type)) {
 push @list, $package;
 $package=;
-- 
1.7.5.4



Bug#637282: cdbs: Please support linux-any target

2011-08-10 Thread Nobuhiro Iwamatsu
Source: cdbs
Version: 0.4.96
Severity: wishlist
Tags: patch

Hi,

cdbs does not support linux-any target yet.
I made patch to support linux-any target. Could you apply this patch?

I tested some package with this patch. Work fine.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
diff -Nru cdbs-0.4.96/scripts/list-packages cdbs-0.4.96+nmu1/scripts/list-packages
--- cdbs-0.4.96/scripts/list-packages	2010-05-23 05:52:01.0 +0900
+++ cdbs-0.4.96+nmu1/scripts/list-packages	2011-08-10 14:02:01.0 +0900
@@ -63,7 +63,7 @@
 			if ($package 
 			(($type eq 'indep'  $arch eq 'all') ||
 			 ($type eq 'arch'  $arch ne 'all') ||
-			 ($type eq 'same'  ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
+			 ($type eq 'same'  ($arch eq 'any' || $arch eq 'linux-any' || $arch =~ /\b$buildarch\b/)) ||
 			 ! $type)) {
 push @list, $package;
 $package=;


Bug#637282: [Build-common-hackers] Bug#637282: cdbs: Please support linux-any target

2011-08-10 Thread Emilio Pozuelo Monfort
On 10/08/11 08:24, Nobuhiro Iwamatsu wrote:
 cdbs does not support linux-any target yet.
 I made patch to support linux-any target. Could you apply this patch?
 
 I tested some package with this patch. Work fine.

This patch looks wrong. It won't work on !linux-any, e.g. kFreeBSD.

The right way would be to test it with `dpkg-architecture -i$wildcard` and check
if $? == 0.

Emilio



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637282: [Build-common-hackers] Bug#637282: cdbs: Please support linux-any target

2011-08-10 Thread Jonas Smedegaard
On 11-08-10 at 03:24pm, Nobuhiro Iwamatsu wrote:
 cdbs does not support linux-any target yet.
 I made patch to support linux-any target. Could you apply this patch?
 
 I tested some package with this patch. Work fine.

Thanks.  Seems more sensible to me, however, to cover generically the 
*-any and any-* syntax.

Could I please ask you to verify that attached patch works for you as 
well?


Regards,

 - Jonas

-- 
 * Jonas Smedegaard - idealist  Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
diff --git a/scripts/list-packages b/scripts/list-packages
index 4b985dc..1454893 100755
--- a/scripts/list-packages
+++ b/scripts/list-packages
@@ -63,7 +63,11 @@ sub GetPackages {
 			if ($package 
 			(($type eq 'indep'  $arch eq 'all') ||
 			 ($type eq 'arch'  $arch ne 'all') ||
-			 ($type eq 'same'  ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
+			 ($type eq 'same'  (
+$arch eq 'any' ||
+$arch =~ /^any-\S+$/ ||
+$arch =~ /^\S+-any$/ ||
+$arch =~ /\b$buildarch\b/)) ||
 			 ! $type)) {
 push @list, $package;
 $package=;


signature.asc
Description: Digital signature


Bug#637282: [Build-common-hackers] Bug#637282: Bug#637282: cdbs: Please support linux-any target

2011-08-10 Thread Jonas Smedegaard
On 11-08-10 at 10:37am, Emilio Pozuelo Monfort wrote:
 On 10/08/11 08:24, Nobuhiro Iwamatsu wrote:
  cdbs does not support linux-any target yet.
  I made patch to support linux-any target. Could you apply this 
  patch?
  
  I tested some package with this patch. Work fine.
 
 This patch looks wrong. It won't work on !linux-any, e.g. kFreeBSD.
 
 The right way would be to test it with `dpkg-architecture -i$wildcard` 
 and check if $? == 0.

Ah.  Thanks.

Sounds like you are more into these details than me.  I suspect that 
perhaps there are limits on which releases of Debian works with above, 
and also that when it works it might replace parts of the existing 
script rather than only extending.

So would you perhaps be able to provide a patch?


Kind regards,

 - Jonas

-- 
 * Jonas Smedegaard - idealist  Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: Digital signature