Author: ryan52-guest
Date: 2009-08-28 06:33:52 +0000 (Fri, 28 Aug 2009)
New Revision: 1973
Modified:
trunk/debian/changelog
trunk/debian/control
trunk/scripts/uscan.1
trunk/scripts/uscan.pl
Log:
uscan: add --download-current-version option (Closes: #539724)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-08-25 19:02:22 UTC (rev 1972)
+++ trunk/debian/changelog 2009-08-28 06:33:52 UTC (rev 1973)
@@ -47,8 +47,12 @@
* debdiff: New option --no-unpack-tarballs to skip unpacking tarballs
contained in source packages.
- -- Christoph Berg <[email protected]> Wed, 12 Aug 2009 14:15:54 +0200
+ [ Ryan Niebur ]
+ * uscan: add --download-current-version option (Closes: #539724)
+ * Add myself to Uploaders
+ -- Ryan Niebur <[email protected]> Thu, 27 Aug 2009 23:27:32 -0700
+
devscripts (2.10.53) unstable; urgency=low
The "Debconf fish!" upload
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2009-08-25 19:02:22 UTC (rev 1972)
+++ trunk/debian/control 2009-08-28 06:33:52 UTC (rev 1973)
@@ -2,7 +2,7 @@
Section: devel
Priority: optional
Maintainer: Devscripts Devel Team <[email protected]>
-Uploaders: Julian Gilbey <[email protected]>, Joey Hess <[email protected]>,
Mohammed Adnène Trojette <[email protected]>, Christoph Berg <[email protected]>,
Stefano Zacchiroli <[email protected]>, James Vega <[email protected]>, Martin
Zobel-Helas <[email protected]>, Adam D. Barratt <[email protected]>, Luk
Claes <[email protected]>, Patrick Schoenfeld <[email protected]>
+Uploaders: Julian Gilbey <[email protected]>, Joey Hess <[email protected]>,
Mohammed Adnène Trojette <[email protected]>, Christoph Berg <[email protected]>,
Stefano Zacchiroli <[email protected]>, James Vega <[email protected]>, Martin
Zobel-Helas <[email protected]>, Adam D. Barratt <[email protected]>, Luk
Claes <[email protected]>, Patrick Schoenfeld <[email protected]>, Ryan
Niebur <[email protected]>
Standards-Version: 3.8.2
Build-Depends: perl, debhelper (>= 6.0.0), docbook-xsl, libtimedate-perl,
libfile-desktopentry-perl, libterm-size-perl, liburi-perl, libwww-perl,
Modified: trunk/scripts/uscan.1
===================================================================
--- trunk/scripts/uscan.1 2009-08-25 19:02:22 UTC (rev 1972)
+++ trunk/scripts/uscan.1 2009-08-28 06:33:52 UTC (rev 1973)
@@ -404,6 +404,9 @@
Specify the version which the upstream release must match in order to be
considered, rather than using the release with the highest version.
.TP
+\fB\-\-download\-current\-version\fR
+Download the currently packaged version
+.TP
.B \-\-verbose
Give verbose output.
.TP
Modified: trunk/scripts/uscan.pl
===================================================================
--- trunk/scripts/uscan.pl 2009-08-25 19:02:22 UTC (rev 1972)
+++ trunk/scripts/uscan.pl 2009-08-28 06:33:52 UTC (rev 1973)
@@ -116,6 +116,8 @@
Specify the version which the upstream release must
match in order to be considered, rather than using the
release with the highest version
+ --download-current-version
+ Download the currently packaged version
--package PACKAGE
Specify the package name rather than examining
debian/changelog; must use --upstream-version and
@@ -259,6 +261,7 @@
my ($opt_package, $opt_uversion, $opt_watchfile, $opt_dehs, $opt_timeout);
my $opt_download_version;
my $opt_user_agent;
+my $opt_download_current_version;
GetOptions("help" => \$opt_h,
"version" => \$opt_v,
@@ -286,6 +289,7 @@
"useragent=s" => \$opt_user_agent,
"noconf" => \$opt_noconf,
"no-conf" => \$opt_noconf,
+ "download-current-version" => \$opt_download_current_version,
)
or die "Usage: $progname [options] [directories]\nRun $progname --help for
more details\n";
@@ -817,6 +821,25 @@
$pattern = "(?:(?:$site)?" . quotemeta($basedir) . ")?$filepattern";
}
+ if (! $lastversion or $lastversion eq 'debian') {
+ if (defined $pkg_version) {
+ $lastversion=$pkg_version;
+ } else {
+ warn "$progname warning: Unable to determine current version\n in
$watchfile, skipping:\n $line\n";
+ return 1;
+ }
+ }
+ # And mangle it if requested
+ my $mangled_lastversion;
+ $mangled_lastversion = $lastversion;
+ foreach my $pat (@{$options{'dversionmangle'}}) {
+ eval "\$mangled_lastversion =~ $pat;";
+ }
+ if($opt_download_current_version) {
+ $download_version = $mangled_lastversion;
+ $force_download = 1;
+ }
+
# Check all's OK
if ($pattern !~ /\(.*\)/) {
warn "$progname warning: Filename pattern missing version delimiters
()\n in $watchfile, skipping:\n $line\n";
@@ -1055,20 +1078,7 @@
$newfile_base = "$pkg-$newversion.download";
}
}
- if (! $lastversion or $lastversion eq 'debian') {
- if (defined $pkg_version) {
- $lastversion=$pkg_version;
- } else {
- warn "$progname warning: Unable to determine current version\n in
$watchfile, skipping:\n $line\n";
- return 1;
- }
- }
- # And mangle it if requested
- my $mangled_lastversion = $lastversion;
- foreach my $pat (@{$options{'dversionmangle'}}) {
- eval "\$mangled_lastversion =~ $pat;";
- }
-
+
# So what have we got to report now?
my $upstream_url;
# Upstream URL? Copying code from below - ugh.
--
To unsubscribe, send mail to [email protected].