mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
pull-debian-source: Return the most recent source line.
pull-debian-source: Return the most recent source line. Depend on libapt-pkg-perl for the Debian version comparison required for this.
This commit is contained in:
parent
0a3d905cf4
commit
acd67abdb5
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -14,7 +14,11 @@ ubuntu-dev-tools (0.86) UNRELEASED; urgency=low
|
||||
* ubuntutools/requestsync/mail.py: rmadison() returns now the most recent
|
||||
source line (Closes: #560758)
|
||||
|
||||
-- Michael Bienia <geser@ubuntu.com> Sun, 20 Dec 2009 15:40:40 +0100
|
||||
[ Iain Lane ]
|
||||
* pull-debian-source: Return the most recent source line. Depend on
|
||||
libapt-pkg-perl for the Debian version comparison required for this.
|
||||
|
||||
-- Iain Lane <laney@ubuntu.com> Tue, 22 Dec 2009 22:26:07 +0000
|
||||
|
||||
ubuntu-dev-tools (0.85) lucid; urgency=low
|
||||
|
||||
|
3
debian/control
vendored
3
debian/control
vendored
@ -16,7 +16,8 @@ Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo,
|
||||
python-debian, python-launchpadlib, dctrl-tools, lsb-release, diffstat,
|
||||
dpkg-dev, python-apt (>= 0.7.9), python-lazr.restfulclient
|
||||
Recommends: bzr, pbuilder | cowdancer | sbuild, reportbug (>= 3.39ubuntu1),
|
||||
ca-certificates, debootstrap, genisoimage, perl-modules, libwww-perl
|
||||
ca-certificates, debootstrap, genisoimage, perl-modules, libwww-perl,
|
||||
libapt-pkg-perl
|
||||
Conflicts: devscripts (<< 2.10.7ubuntu5)
|
||||
Replaces: devscripts (<< 2.10.7ubuntu5)
|
||||
Description: useful tools for Ubuntu developers
|
||||
|
@ -22,6 +22,7 @@ use strict;
|
||||
use LWP::Simple;
|
||||
use File::Basename;
|
||||
use Getopt::Long;
|
||||
use AptPkg::Version;
|
||||
|
||||
die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
|
||||
|
||||
@ -89,9 +90,11 @@ sub getDSC {
|
||||
die("$madison");
|
||||
}
|
||||
my($baseURL)='http://ftp.debian.org/debian/pool/';
|
||||
my($url)=$baseURL;
|
||||
my(@madison)=split(/\n/,$madison);
|
||||
my %urls;
|
||||
my $url;
|
||||
foreach my $line (@madison) {
|
||||
$url = $baseURL;
|
||||
my($package,$version,$release,$archs)=split(/\|/,$line,4);
|
||||
$package=~s/\s*//g;
|
||||
$version=~s/\s*//g;
|
||||
@ -117,10 +120,15 @@ sub getDSC {
|
||||
$url .= 'main/';
|
||||
}
|
||||
$url .= $firstLetter . '/' . $package . '/' . $package . '_' . $version . '.dsc';
|
||||
return $url;
|
||||
$urls{$version} = $url;
|
||||
}
|
||||
|
||||
}
|
||||
die("Unable To Find Source Package On Madison\n");
|
||||
|
||||
my @vers = reverse sort AptPkg::Version::CmpVersion keys %urls;
|
||||
|
||||
return $urls{$vers[0]} or die("Unable To Find Source Package On Madison\n");
|
||||
|
||||
}
|
||||
sub usage {
|
||||
my($name)=basename($0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user