* Merge Siegfried-Angel Gevatter Pujals' branch.

This commit is contained in:
Luke Yelavich 2007-11-20 10:39:54 +11:00
commit 6ef10be9bb
5 changed files with 118 additions and 5 deletions

View File

@ -9,3 +9,4 @@ Kees Cook <kees@ubuntu.com>
Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
Soren Hansen <soren@ubuntu.com>
Steve Kowalik <stevenk@ubuntu.com>
Terence Simpson <stdin@stdin.me.uk>

5
debian/changelog vendored
View File

@ -12,7 +12,10 @@ ubuntu-dev-tools (0.22) UNRELEASED; urgency=low
* requestsync:
-Always pass -u option to rmadison now that it defaults to ubuntu
-- Laurent Bigonville <bigon@ubuntu.com> Thu, 15 Nov 2007 22:33:49 +0100
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
* Add dgetlp script (for «dgetting» from Launchpad)
-- Siegfried-Angel Gevatter Pujals (RainCT) <sgevatter@ubuntu.cat> Tue, 20 Nov 2007 00:16:55 +0100
ubuntu-dev-tools (0.21) hardy; urgency=low

9
debian/copyright vendored
View File

@ -12,6 +12,7 @@ Upstream Author:
Kees Cook <kees@ubuntu.com>
Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
Soren Hansen <soren@ubuntu.com>
Terence Simpson <stdin@stdin.me.uk>
Copyright:
@ -23,11 +24,12 @@ Copyright:
Michael Bienia <geser@ubuntu.com> 2006-2007
Kees Cook <kees@ubuntu.com> 2006-2007
Siegfried-A. Gevatter <siggi.gevatter@gmail.com> 2007
Terence Simpson <stdin@stdin.me.uk> 2007
Licenses:
check-symbols, dch-repeat, mk-sbuild-lv, pbuilder-dist, pull-debian-debdiff,
submittodebian, update-maintainer, and what-patch are licensed under GPLv2:
submittodebian, update-maintainer, dgetlp and what-patch are licensed under GPLv2:
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -62,5 +64,6 @@ get-branches, suspicious-source and get-build-deps are licensed under GPLv3:
On Debian systems, the complete text of the GNU General Public License v3
can be found in `/usr/share/common-licenses/GPL-3'.
The following of the scripts can be used, at your option, regarding any later version
of the previously specified license: pbuilder-dist, suspicious-source and get-build-deps.
The following of the scripts can be used, at your option, regarding any
later version of the previously specified license: pbuilder-dist, dgetlp,
suspicious-source, get-build-deps.

105
dgetlp Executable file
View File

@ -0,0 +1,105 @@
#!/bin/bash
# Copyright 2007 (C) Terence Simpson <stdin@stdin.me.uk>
# Modified by Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
# License: GPLv2 or later
#
# This script simulates «dget»'s behaviour for files hosted at
# launchpadlibrarian.net.
#
# Detailed description:
# This script attempts to download the source package in the same
# way as dget does, but from launchpadlibrarian.net, which doesn't
# store all the files in the same directory. It (the script) assumes
# that the files are stored in sequential directories on Launchpad
# Librarian and attemps to download and then unpack them.
GET="wget"
UNPACK="dpkg-source -x {dsc-file}"
usage()
{
cat << EOF
Usage: $0 [-d] <Launchpad URL>
This scripts simulates «dget»'s behaviour for files hostead at
launchpadlibrarian.net.
If you specify the -d option then it won't do anything, but just
print the commands it would run otherwise.
Example:
$0 http://launchpadlibrarian.net/10348157/coreutils_5.97-5.4ubuntu1.dsc
EOF
}
if [ "$1" = "-d" ]
then
# Debug Mode
GET="echo "${GET}
UNPACK="echo "${UNPACK}
shift
fi
if [ $# -ne 1 ]
then
usage
exit 1
fi
# Store download URL into a local variable to be able to modify it
URL=$1
if [ ${URL:0:4} == 'www.' ]
then
URL="http://"${URL:4}
fi
if [ ${URL:0:7} != 'http://' ]
then
URL="http://"$URL
fi
if [ ${URL:0:30} != 'http://launchpadlibrarian.net/' ]
then
echo "Error: This utility only works for files on launchpadlibrarian.net."
exit 1
fi
if [ ${URL##*.} != 'dsc' ]
then
echo "You have to provide the URL for the .dsc file."
exit 1
fi
BASE="http://launchpadlibrarian.net" #BASE="http://$(echo $URL|cut -d '/' -f 3)"
NUMBER="$(echo $URL|cut -d '/' -f 4)"
FILE="$(echo $URL|cut -d '/' -f 5)"
UNPACK=$(echo $UNPACK | sed s/{dsc-file}/${FILE}/g)
echo "Getting ${BASE}/${NUMBER}/${FILE}"
if ! $GET ${BASE}/${NUMBER}/${FILE}
then
echo "Failed to fetch «.dsc» file, aborting."
exit 1
fi
echo "Getting ${BASE}/$(($NUMBER-1))/$(echo $FILE|sed 's,\.dsc$,.diff.gz,')"
if ! $GET ${BASE}/$(($NUMBER-1))/$(echo $FILE | sed 's,\.dsc$,.diff.gz,')
then
echo "Failed to fetch «.diff.gz» file, aborting."
exit 1
fi
echo "Getting ${BASE}/$(($NUMBER-2))/$(echo $FILE|sed 's,\-[0-9]*.*$,.orig.tar.gz,')"
if ! $GET ${BASE}/$(($NUMBER-2))/$(echo $FILE|sed 's,\-[0-9]*.*$,.orig.tar.gz,')
then
echo "Failed to fetch «orig.tar.gz» file, aborting."
exit 1
fi
if ! $UNPACK
then
echo "Failed to unpack source, aborting."
exit 1
fi

View File

@ -30,6 +30,7 @@ setup(name='ubuntu-dev-tools',
'hugdaylist',
'massfile',
'submittodebian',
'get-build-deps'
'get-build-deps',
'dgetlp'
],
)