mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Merge dgetlp fixes from Terence Simpson. Remove the python-ubuntutools binary for now. Minor changes.
This commit is contained in:
parent
36772683d0
commit
98724c64e3
39
debian/changelog
vendored
39
debian/changelog
vendored
@ -1,30 +1,38 @@
|
|||||||
ubuntu-dev-tools (0.27) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.27) UNRELEASED; urgency=low
|
||||||
|
|
||||||
[ Andrew Hunter ]
|
[ Andrew Hunter ]
|
||||||
* Use install files as we have multiple binaries now.
|
|
||||||
* ppaput:
|
* ppaput:
|
||||||
* Separated ppaput script from backend python modules (shipped in
|
- Separated ppaput script from backend python modules (LP: #192184).
|
||||||
python-ppaput). (LP: #192184)
|
- Switched from homegrown option parseing to Optparse, much more
|
||||||
* Switched from homegrown option parseing to Optparse, much more
|
|
||||||
robust and less code duplication.
|
robust and less code duplication.
|
||||||
|
|
||||||
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
||||||
* Remove wrong element from doc/ppaput.1.docbook.
|
* debian/control:
|
||||||
* Move ppaput.py into new ubuntutools/ directory and remove
|
- Change the Vcs-Bzr address to the correct one.
|
||||||
it's shabang.
|
- Move the reportbug dependency to Recommends.
|
||||||
* Write a description for the new python-ubuntutools binary
|
- Drop docbook2x build dependency (see Daniel's changes).
|
||||||
package in debian/control. Add a "Suggests: ubuntu-dev-tools".
|
* Move ppaput.py (the module) into new ubuntutools/ directory and
|
||||||
* Check for reportbug being installed in submittodebian. Replace
|
remove it's shabang.
|
||||||
reportbug dependency with a Recommends.
|
* submittodebian:
|
||||||
* Add ppaput to debian/copyright.
|
- Check if reportbug is installed and if it isn't throw an error.
|
||||||
* Remove debian/pycompat.
|
* debian/copyright.
|
||||||
|
- Add ppaput (the executable has been removed for now -see below-,
|
||||||
|
but there is still the module in the source package).
|
||||||
|
* debian/pycompat:
|
||||||
|
- Remove it, as it is not necessary for python-central.
|
||||||
|
|
||||||
|
[ Terence Simpson ]
|
||||||
|
* dgetlp:
|
||||||
|
- Fix bug where optaining the .orig.tar.gz would fail if the package
|
||||||
|
name contains hypens.
|
||||||
|
- Add support for native packages.
|
||||||
|
|
||||||
[ Daniel Holbach ]
|
[ Daniel Holbach ]
|
||||||
* README, debian/rules, doc/ppaput.1.docbook, ppaput, setup.py: removed
|
* README, debian/rules, doc/ppaput.1.docbook, ppaput, setup.py: removed
|
||||||
ppaput for now. It has shortcomings and is not actively used in the
|
ppaput for now. It has shortcomings and is not actively used in the
|
||||||
sponsoring process.
|
sponsoring process.
|
||||||
|
|
||||||
-- Daniel Holbach <daniel.holbach@ubuntu.com> Fri, 22 Feb 2008 18:55:21 +0100
|
-- Siegfried-Angel Gevatter Pujals (RainCT) <rainct@ubuntu.com> Fri, 22 Feb 2008 19:52:59 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.26) hardy; urgency=low
|
ubuntu-dev-tools (0.26) hardy; urgency=low
|
||||||
|
|
||||||
@ -67,7 +75,8 @@ ubuntu-dev-tools (0.25) hardy; urgency=low
|
|||||||
|
|
||||||
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
||||||
* what-patch:
|
* what-patch:
|
||||||
- Print a list of files that have been modified outside debian/.
|
- Print a list of files that have been modified outside the
|
||||||
|
debian/ directory (LP: #174933).
|
||||||
- Add -h and -q options.
|
- Add -h and -q options.
|
||||||
- Add proper exit values.
|
- Add proper exit values.
|
||||||
* debian/control:
|
* debian/control:
|
||||||
|
20
debian/control
vendored
20
debian/control
vendored
@ -2,10 +2,10 @@ Source: ubuntu-dev-tools
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
|
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
|
||||||
Vcs-Bzr: https://launchpad.net/ubuntu-dev-tools/
|
Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk
|
||||||
Vcs-Browser: http://codebrowse.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/changes
|
Vcs-Browser: http://codebrowse.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/changes
|
||||||
Build-Depends: cdbs (>= 0.4.49), debhelper (>= 5), python-all-dev (>= 2.4)
|
Build-Depends: cdbs (>= 0.4.49), debhelper (>= 5), python-all-dev (>= 2.4)
|
||||||
Build-Depends-Indep: docbook2x, python-central (>= 0.5)
|
Build-Depends-Indep: python-central (>= 0.5)
|
||||||
XS-Python-Version: all
|
XS-Python-Version: all
|
||||||
Homepage: https://launchpad.net/ubuntu-dev-tools/
|
Homepage: https://launchpad.net/ubuntu-dev-tools/
|
||||||
Standards-Version: 3.7.3
|
Standards-Version: 3.7.3
|
||||||
@ -14,7 +14,7 @@ Package: ubuntu-dev-tools
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Section: devel
|
Section: devel
|
||||||
Depends: ${python:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.25), python-debian, dctrl-tools, lsb-release
|
Depends: ${python:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.25), python-debian, dctrl-tools, lsb-release
|
||||||
Recommends: bzr, pbuilder, python-ubuntu-utils, reportbug (>= 3.39ubuntu1)
|
Recommends: bzr, pbuilder, reportbug (>= 3.39ubuntu1)
|
||||||
Conflicts: devscripts (<< 2.10.7ubuntu5)
|
Conflicts: devscripts (<< 2.10.7ubuntu5)
|
||||||
Replaces: devscripts (<< 2.10.7ubuntu5)
|
Replaces: devscripts (<< 2.10.7ubuntu5)
|
||||||
XB-Python-Version: ${python:Versions}
|
XB-Python-Version: ${python:Versions}
|
||||||
@ -22,17 +22,3 @@ Description: useful tools for Ubuntu developers
|
|||||||
This is a collection of useful tools that Ubuntu developers use to
|
This is a collection of useful tools that Ubuntu developers use to
|
||||||
make their packaging work a lot easier. Such tools can include bug
|
make their packaging work a lot easier. Such tools can include bug
|
||||||
filing, packaging preparation, package analysis, etc.
|
filing, packaging preparation, package analysis, etc.
|
||||||
|
|
||||||
Package: python-ubuntutools
|
|
||||||
Architecture: all
|
|
||||||
Section: python
|
|
||||||
Depends: ${python:Depends}
|
|
||||||
Suggests: ubuntu-dev-tools
|
|
||||||
XB-Python-Version: ${python:Versions}
|
|
||||||
Description: useful Python modules for Ubuntu developers
|
|
||||||
This is a namespace of Python modules that people interested in
|
|
||||||
Ubuntu development might find useful. It include:
|
|
||||||
.
|
|
||||||
* ppaput: a Python module that abstracts the process of creating and
|
|
||||||
uploading Debian source packages to Launchpad's Personal Package
|
|
||||||
Archives.
|
|
||||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -6,6 +6,3 @@ include /usr/share/cdbs/1/rules/debhelper.mk
|
|||||||
include /usr/share/cdbs/1/class/python-distutils.mk
|
include /usr/share/cdbs/1/class/python-distutils.mk
|
||||||
|
|
||||||
DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1
|
DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1
|
||||||
|
|
||||||
binary-install/python-ubuntutools::
|
|
||||||
rm -rf debian/python-ubuntutools/usr/lib
|
|
||||||
|
1
debian/ubuntu-dev-tools.install
vendored
1
debian/ubuntu-dev-tools.install
vendored
@ -1,2 +1 @@
|
|||||||
debian/tmp/usr/bin/*
|
|
||||||
bash_completion/* etc/bash_completion.d/pbuilder-dist
|
bash_completion/* etc/bash_completion.d/pbuilder-dist
|
||||||
|
138
dgetlp
138
dgetlp
@ -1,7 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright 2007 (C) Terence Simpson <stdin@stdin.me.uk>
|
# Copyright (C) 2008 Terence Simpson <tsimpson@ubuntu.com>
|
||||||
# Modified by Siegfried-A. Gevatter <rainct@ubuntu.com>
|
# Modified by Siegfried-A. Gevatter <rainct@ubuntu.com>
|
||||||
# License: GPLv2 or later
|
# License:
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
# This script simulates «dget»'s behaviour for files hosted at
|
# This script simulates «dget»'s behaviour for files hosted at
|
||||||
# launchpadlibrarian.net.
|
# launchpadlibrarian.net.
|
||||||
@ -15,6 +28,7 @@
|
|||||||
|
|
||||||
GET="wget"
|
GET="wget"
|
||||||
UNPACK="dpkg-source -x {dsc-file}"
|
UNPACK="dpkg-source -x {dsc-file}"
|
||||||
|
DIRECT_TO_NULL="/dev/null"
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -24,27 +38,41 @@ Usage: $0 [-d] <Launchpad URL>
|
|||||||
This scripts simulates «dget»'s behaviour for files hostead at
|
This scripts simulates «dget»'s behaviour for files hostead at
|
||||||
launchpadlibrarian.net.
|
launchpadlibrarian.net.
|
||||||
|
|
||||||
If you specify the -d option then it won't do anything, but just
|
If you specify the -d option then it won't do anything, except download the
|
||||||
print the commands it would run otherwise.
|
.dsc file, but just print the commands it would run otherwise.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
$0 http://launchpadlibrarian.net/10348157/coreutils_5.97-5.4ubuntu1.dsc
|
$(basename $0) http://launchpadlibrarian.net/10348157/coreutils_5.97-5.4ubuntu1.dsc
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $1 ] && [ $1 = "-d" ] || [ $1 = "--debug" ]
|
while [ $# -ne 1 ]; do
|
||||||
then
|
case "$1" in
|
||||||
# Debug Mode
|
-d|--debug)
|
||||||
GET="echo "${GET}
|
# Debug Mode
|
||||||
UNPACK="echo "${UNPACK}
|
OUTPUT="/tmp/"
|
||||||
shift
|
GET="echo ${GET}"
|
||||||
fi
|
UNPACK="echo ${UNPACK}"
|
||||||
|
shift
|
||||||
if [ $1 ] && [ $1 = "-h" ] || [ $1 = "--help" ]
|
;;
|
||||||
then
|
-v|--verbose)
|
||||||
usage
|
DIRECT_TO_NULL="$(tty)"
|
||||||
exit 0
|
shift
|
||||||
fi
|
;;
|
||||||
|
-h|--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo "Unknown option: \`$1'"
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [ $# -ne 1 ]
|
if [ $# -ne 1 ]
|
||||||
then
|
then
|
||||||
@ -52,6 +80,43 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## internal functions
|
||||||
|
getBase() {
|
||||||
|
echo "Getting ${BASE}/${NUMBER}/${FILE}"
|
||||||
|
if [ -f "$FILE" ]; then rm -f $FILE; fi # Remove .dsc incase the last run was with debug
|
||||||
|
if ! wget ${BASE}/${NUMBER}/${FILE} -O ${OUTPUT}${FILE} 2>${DIRECT_TO_NULL}
|
||||||
|
then
|
||||||
|
echo "Failed to fetch «.dsc» file, aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
getUrl() {
|
||||||
|
if [ -f "$2" ]
|
||||||
|
then
|
||||||
|
##Todo: Check the md5sum in the .dsc to see if we should redownload or not
|
||||||
|
echo "Skipping already downloaded ${2}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Getting ${1}${2}"
|
||||||
|
if ! $GET ${1}${2} 2>$DIRECT_TO_NULL
|
||||||
|
then
|
||||||
|
echo "Failed to fetch «${3}»"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack() {
|
||||||
|
if ! $UNPACK
|
||||||
|
then
|
||||||
|
echo "Failed to unpack source, aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## begin #!/bin/bash
|
||||||
|
|
||||||
# Store download URL into a local variable to be able to modify it
|
# Store download URL into a local variable to be able to modify it
|
||||||
URL=$1
|
URL=$1
|
||||||
|
|
||||||
@ -77,35 +142,28 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BASE="http://launchpadlibrarian.net" #BASE="http://$(echo $URL|cut -d '/' -f 3)"
|
#BASE="http://$(echo $URL|cut -d '/' -f 3)" #Not needed as we know the base URL
|
||||||
|
BASE="http://launchpadlibrarian.net"
|
||||||
NUMBER="$(echo $URL|cut -d '/' -f 4)"
|
NUMBER="$(echo $URL|cut -d '/' -f 4)"
|
||||||
FILE="$(echo $URL|cut -d '/' -f 5)"
|
FILE="$(echo $URL|cut -d '/' -f 5)"
|
||||||
|
|
||||||
UNPACK=$(echo $UNPACK | sed s/{dsc-file}/${FILE}/g)
|
UNPACK=$(echo $UNPACK | sed s/{dsc-file}/${FILE}/g)
|
||||||
|
|
||||||
echo "Getting ${BASE}/${NUMBER}/${FILE}"
|
if [ -f "$FILE" ]; then rm -f $FILE; fi
|
||||||
if ! $GET ${BASE}/${NUMBER}/${FILE}
|
getBase;
|
||||||
|
PkgVersion="$(grep -B100 "^Files:" ${OUTPUT}${FILE}|grep "^Version:"|cut -d' ' -f2)"
|
||||||
|
PkgName="$(grep -B100 "^Files:" ${OUTPUT}${FILE}|grep "^Source:"|cut -d' ' -f2)"
|
||||||
|
|
||||||
|
if $(echo ${PkgVersion} | grep '-' >/dev/null)
|
||||||
then
|
then
|
||||||
echo "Failed to fetch «.dsc» file, aborting."
|
getUrl ${BASE}/$((${NUMBER}-1))/ "$(echo $FILE|sed 's,\.dsc,.diff.gz,')" "diff.gz"
|
||||||
exit 1
|
getUrl ${BASE}/$((${NUMBER}-2))/ "${PkgName}_$(echo ${PkgVersion}|sed 's,-[0-9]*[a-z]*[0-9]*,.orig.tar.gz,')" "orig.tar.gz"
|
||||||
|
else
|
||||||
|
getUrl ${BASE}/$((${NUMBER}-1))/ "${PkgName}_${PkgVersion}.tar.gz" "tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Getting ${BASE}/$(($NUMBER-1))/$(echo $FILE|sed 's,\.dsc$,.diff.gz,')"
|
if [ "x${OUTPUT}" != "x" ]
|
||||||
if ! $GET ${BASE}/$(($NUMBER-1))/$(echo $FILE | sed 's,\.dsc$,.diff.gz,')
|
then rm -f ${OUTPUT}${FILE}
|
||||||
then
|
|
||||||
echo "Failed to fetch «.diff.gz» file, aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Getting ${BASE}/$(($NUMBER-2))/$(echo $FILE|sed 's,\-[0-9]*.*$,.orig.tar.gz,')"
|
unpack;
|
||||||
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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user