Processed: Re: Bug#860187: debian-cd: Fix which_deb handling of non-Linux arches

2017-04-12 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 +pending
Bug #860187 [src:debian-cd] debian-cd: Fix which_deb handling of non-Linux 
arches
Added tag(s) pending.

-- 
860187: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860187
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#860187: debian-cd: Fix which_deb handling of non-Linux arches

2017-04-12 Thread Steve McIntyre
Control: tag -1 +pending

On Wed, Apr 12, 2017 at 05:34:35PM +0100, Steven Chamberlain wrote:
>Source: debian-cd
>Version: 3.1.20
>Tags: patch
>User: debian-...@lists.debian.org
>Usertags: kfreebsd
>X-Debbugs-Cc: debian-...@lists.debian.org
>
>Hi!
>
>When which_deb finds "*i386" or "*amd64" entries in the ARCHES list,
>it will wrongly change them to "i386" to "amd64" respectively (which
>is wrong in the case of kfreebsd-* or hurd-*).
>
>My attached patch makes the same changes here that were already made to
>identical code in generate_di_list, to fix #758512 (commits
>771f754516b161f248c132ee9d698e33a6330de0 and
>2ef5d3288cdc772cdcbb7b5d11192305dd05b063).

Thanks, applied in git now.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"I suspect most samba developers are already technically insane... Of
 course, since many of them are Australians, you can't tell." -- Linus Torvalds



Bug#860187: debian-cd: Fix which_deb handling of non-Linux arches

2017-04-12 Thread Steven Chamberlain
Source: debian-cd
Version: 3.1.20
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-...@lists.debian.org

Hi!

When which_deb finds "*i386" or "*amd64" entries in the ARCHES list,
it will wrongly change them to "i386" to "amd64" respectively (which
is wrong in the case of kfreebsd-* or hurd-*).

My attached patch makes the same changes here that were already made to
identical code in generate_di_list, to fix #758512 (commits
771f754516b161f248c132ee9d698e33a6330de0 and
2ef5d3288cdc772cdcbb7b5d11192305dd05b063).

Thanks!
Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org
From 544806f93e860f01f6f1167af2b4462074479af7 Mon Sep 17 00:00:00 2001
From: Steven Chamberlain 
Date: Wed, 12 Apr 2017 17:19:28 +0100
Subject: [PATCH] Fix which_deb handling of non-Linux arches

When which_deb finds "*i386" or "*amd64" entries in the ARCHES list,
it will wrongly change them to "i386" to "amd64" respectively (which
is wrong in the case of kfreebsd-* or hurd-*).

Make the same changes here that were already made to identical code in
generate_di_list, to fix #758512 (commits
771f754516b161f248c132ee9d698e33a6330de0 and
2ef5d3288cdc772cdcbb7b5d11192305dd05b063).
---
 tools/which_deb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/which_deb b/tools/which_deb
index d5a5a94..e23c721 100755
--- a/tools/which_deb
+++ b/tools/which_deb
@@ -29,9 +29,9 @@ if (!defined ($output)) {
 # Give preference to i386 and amd64, if specified
 my @ARCHES;
 if ( $ENV{ARCHES} ) {
-push @ARCHES, 'i386' if $ENV{ARCHES} =~ /i386/;
-push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /amd64/;
-push @ARCHES, grep { !/source|i386|amd64/ } split /\s+/, $ENV{ARCHES};
+push @ARCHES, 'i386' if $ENV{ARCHES} =~ /(^|\s)i386(\s|$)/;
+push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /(^|\s)amd64(\s|$)/;
+push @ARCHES, grep { !/^(source|i386|amd64)$/ } split /\s+/, $ENV{ARCHES};
 }
 
 # We seem to be building a source-only CD. Check for whatever binary
-- 
1.8.4.rc3



signature.asc
Description: Digital signature