diff mbox

ubuntu-debian: Find ABI files according to their source package name

Message ID 4C6AAF05.30903@canonical.com
State Rejected
Headers show

Commit Message

Tim Gardner Aug. 17, 2010, 3:47 p.m. UTC
This patch helps find ABI files according to their source package name 
if the existing URLs (e.g. debian.linaro/etc/getabi) in the various 
branches end in 'linux' (which is likely _not_ the correct place).

rtg

Comments

Loïc Minier Aug. 17, 2010, 7:20 p.m. UTC | #1
+src_pkg_name=$(dpkg-parsechangelog -l${DEBIAN}/changelog|grep Source|sed 's/^.*Source: //')

 perhaps with an anchor at the start of the line (and one less process):
 src_pkg_name=$(dpkg-parsechangelog -l${DEBIAN}/changelog | sed -n 's/^Source: //p')
Andy Whitcroft Aug. 17, 2010, 8:25 p.m. UTC | #2
On Tue, Aug 17, 2010 at 09:47:17AM -0600, Tim Gardner wrote:
> This patch helps find ABI files according to their source package
> name if the existing URLs (e.g. debian.linaro/etc/getabi) in the
> various branches end in 'linux' (which is likely _not_ the correct
> place).

As this is a branch specific configuration option, cannot those paths
just be updated to be correct for the branch.  Cirtainly that is the
intention of that file?

-apw
Tim Gardner Aug. 17, 2010, 8:41 p.m. UTC | #3
On 08/17/2010 02:25 PM, Andy Whitcroft wrote:
> On Tue, Aug 17, 2010 at 09:47:17AM -0600, Tim Gardner wrote:
>> This patch helps find ABI files according to their source package
>> name if the existing URLs (e.g. debian.linaro/etc/getabi) in the
>> various branches end in 'linux' (which is likely _not_ the correct
>> place).
>
> As this is a branch specific configuration option, cannot those paths
> just be updated to be correct for the branch.  Cirtainly that is the
> intention of that file?
>

Well, of course, but given that I'm naturally lazy (and couldn't 
remember where the binaries end up), this helps the folks creating the 
topic branch. Maybe we should macro-ize the paths in 
debian.BRANCH/etc/getabi thusly:

repo_list=(
"http://archive.ubuntu.com/ubuntu/pool/main/l/${src_pkg_name}"
"http://ports.ubuntu.com/ubuntu-ports/pool/main/l/${src_pkg_name}"
"http://archive.ubuntu.com/ubuntu/pool/universe/l/${src_pkg_name}"
"http://ports.ubuntu.com/ubuntu-ports/pool/universe/l/${src_pkg_name}"
)

rtg
diff mbox

Patch

From 929ef5caff4cbd5b8e89a9b8254872674f6d62e1 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Tue, 17 Aug 2010 15:27:39 +0100
Subject: [PATCH] UBUNTU: [Config] Find ABI files according to their source package name

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 debian/scripts/misc/getabis |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index 2a1fc55..44602a9 100755
--- a/debian/scripts/misc/getabis
+++ b/debian/scripts/misc/getabis
@@ -14,6 +14,8 @@  abi=$(echo $revision | awk -F. '{print $1}')
 verabi=$ver-$abi
 verfull=$ver-$revision
 
+src_pkg_name=$(dpkg-parsechangelog -l${DEBIAN}/changelog|grep Source|sed 's/^.*Source: //')
+
 WGET="wget --quiet -c"
 
 abidir="`pwd`/$DEBIAN/abi/$verfull"
@@ -38,8 +40,9 @@  getall() {
 		cd $tmpdir
 		for r in "${repo_list[@]}"
 		do
+			url="`echo $r | sed 's/linux$/'${src_pkg_name}'/'`"
 			if ! [ -f $filename ]; then
-				$WGET $r/$filename
+				$WGET $url/$filename
 			fi
 		done
 		if [ "$?" = "0" ]; then
-- 
1.7.0.4