Package: devscripts
Version: 2.15.9
Severity: wishlist
Tags: upstream patch
Dear Maintainer,
I propose to teach 'debcheckout -p' / 'debcheckout -d' to print the Vcs-Browse
field, if set.
A proposed patch is attached. It adds a third tab-separated field to the
output of 'debcheckout -p'; would that be a problem?
Cheers,
Daniel
-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
DEBUILD_DPKG_BUILDPACKAGE_OPTS="-us -uc -tc"
DEBUILD_LINTIAN_OPTS="--display-info --display-experimental --pedantic
--fail-on-warnings --color=always"
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.3.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages devscripts depends on:
ii dpkg-dev 1.18.4
ii libc6 2.21-6
ii perl 5.22.1-3
ii python3 3.4.3-7
pn python3:any <none>
Versions of packages devscripts recommends:
ii at 3.1.18-2
ii curl 7.45.0-1+b1
ii dctrl-tools 2.24-1
pn debian-keyring <none>
pn dput | dupload <none>
pn equivs <none>
ii fakeroot 1.20.2-1
ii file 1:5.25-2
ii gnupg 1.4.20-1
pn libdistro-info-perl <none>
ii libencode-locale-perl 1.05-1
ii libjson-perl 2.90-1
ii liblwp-protocol-https-perl 6.06-2
pn libsoap-lite-perl <none>
ii liburi-perl 1.69-1
ii libwww-perl 6.15-1
ii lintian 2.5.39.1
ii man-db 2.7.5-1
ii patch 2.7.5-1
ii patchutils 0.3.4-1
pn python3-debian <none>
pn python3-magic <none>
ii sensible-utils 0.0.9
ii strace 4.10-3
pn unzip <none>
pn wdiff <none>
ii wget 1.17.1-1
ii xz-utils 5.1.1alpha+20120614-2.1
Versions of packages devscripts suggests:
ii bsd-mailx [mailx] 8.1.2-0.20150408cvs-1
ii build-essential 12.1
pn cvs-buildpackage <none>
pn debbindiff <none>
pn devscripts-el <none>
pn gnuplot <none>
ii gpgv 1.4.20-1
ii libauthen-sasl-perl 2.1600-1
pn libfile-desktopentry-perl <none>
ii libnet-smtp-ssl-perl 1.03-1
pn libterm-size-perl <none>
ii libtimedate-perl 2.3000-2
pn libyaml-syck-perl <none>
ii mutt 1.5.24-1
ii openssh-client [ssh-client] 1:7.1p1-5
pn svn-buildpackage <none>
ii w3m 0.5.3-26
-- debconf-show failed
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index 3477f8a..6b41278 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -100,8 +100,10 @@ Print a detailed help message and exit.
=item B<-p>, B<--print>
Only print a summary about package repository information, without
-checking it out; the output format is TAB-separated with two fields:
-repository type, repository URL. This action works offline, it only
+checking it out; the output format is TAB-separated with three fields:
+repository type, repository checkout URL, repository Web view URL.
+More TAB-separated fields may be added in the future.
+This action works offline, it only
uses "static" information as known by APT's cache.
Also see B<-d>. This option and B<-d> are mutually exclusive.
@@ -907,10 +909,11 @@ sub unpack_source($$$$$) {
}
# Print information about a repository and quit.
-sub print_repo($$) {
- my ($repo_type, $repo_url) = @_;
+sub print_repo($$$) {
+ my ($repo_type, $repo_url, $browse_url) = @_;
- print "$repo_type\t$repo_url\n";
+ $browse_url //= "";
+ print "$repo_type\t$repo_url\t$browse_url\n";
exit(0);
}
@@ -950,8 +953,8 @@ sub tg_info($) {
}
# Print details about a repository and quit.
-sub print_details($$) {
- my ($repo_type, $repo_url) = @_;
+sub print_details($$$) {
+ my ($repo_type, $repo_url, $browse_url) = @_;
print "type\t$repo_type\n";
print "url\t$repo_url\n";
@@ -961,6 +964,7 @@ sub print_details($$) {
print "$k\t$v\n";
}
}
+ print "browse\t$browse_url\n" if $browse_url;
exit(0);
}
@@ -1076,14 +1080,15 @@ and it will not be possible to commit them directly.
EOF
exit(1);
}
- $browse_url = find_browse($pkg, $version) if @files;
+ $browse_url = find_browse($pkg, $version)
+ if @files or $print_mode or $details_mode;
}
$repo_url = munge_url($repo_type, $repo_url);
$repo_url = set_auth($repo_type, $repo_url, $user, $dont_act)
if $auth and not @files;
- print_repo($repo_type, $repo_url) if $print_mode; # ... then quit
- print_details($repo_type, $repo_url) if $details_mode; # ... then quit
+ print_repo($repo_type, $repo_url, $browse_url) if $print_mode; # ... then quit
+ print_details($repo_type, $repo_url, $browse_url) if $details_mode; # ... then quit
if (length $pkg) {
print "declared $repo_type repository at $repo_url\n";
$destdir = $pkg unless length $destdir;
_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel