[devscripts] 02/02: debchange: Only emit "no orig tarball" for non-native packages
James McCoy
jamessan at debian.org
Thu Aug 27 01:59:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 6b95b521e0eda8adf78cac40f023a74b666d243a
Author: James McCoy <jamessan at debian.org>
Date: Wed Aug 26 21:54:47 2015 -0400
debchange: Only emit "no orig tarball" for non-native packages
Closes: #797018
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 2 ++
scripts/debchange.pl | 26 ++++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3204117..36d35ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ devscripts (2.15.9) UNRELEASED; urgency=medium
* mergechanges:
+ Add -S/--source argument to skip all binary packages. Thanks to Ansgar
Burchardt for the patch. (Closes: #795573)
+ * debchange:
+ + Only emit "no orig tarball" for non-native packages. (Closes: #797018)
[ Dominique Dumont ]
* licensecheck:
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 4348813..28366d9 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -42,6 +42,7 @@ use Cwd;
use Dpkg::Vendor qw(get_current_vendor);
use Dpkg::Changelog::Parse qw(changelog_parse);
use Dpkg::Control;
+use Dpkg::Version;
use Devscripts::Compression;
use Devscripts::Debbugs;
use POSIX qw(locale_h strftime);
@@ -1554,19 +1555,18 @@ copy("$changelog_path.dch","$changelog_path") or
if ((basename(cwd()) =~ m%^\Q$PACKAGE\E-\Q$UVERSION\E$%) &&
!$opt_p && !$opt_create) {
# Find the current version number etc.
- my ($new_version, $new_sversion, $new_uversion);
+ my $v;
my $changelog = changelog_parse();
if (exists $changelog->{Version}) {
- $new_version = $changelog->{Version};
+ $v = Dpkg::Version->new($changelog->{Version});
}
fatal "No version number in debian/changelog!"
- unless defined $new_version;
+ unless $v;
- # Is this a native Debian package, i.e., does it have a - in the
- # version number?
- $new_version =~ s/^\d+://; # remove epoch
- ($new_uversion=$new_version) =~ s/-[^-]*$//; # remove revision
+ my ($new_version, $new_uversion);
+ $new_version = $v->as_string(omit_epoch => 1);
+ $new_uversion = $v->as_string(omit_epoch => 1, omit_revision => 1);
if ($new_uversion ne $UVERSION) {
# Then we rename the directory
@@ -1575,11 +1575,13 @@ if ((basename(cwd()) =~ m%^\Q$PACKAGE\E-\Q$UVERSION\E$%) &&
} else {
warn "$progname warning: Couldn't rename directory: $!\n";
}
- # And check whether a new orig tarball exists
- my @origs = glob("../$PACKAGE\_$new_uversion.*");
- my $num_origs = grep { /^..\/\Q$PACKAGE\E_\Q$new_uversion\E\.orig\.tar\.$compression_re$/ } @origs;
- if ($num_origs == 0) {
- warn "$progname warning: no orig tarball found for the new version.\n";
+ if (!$v->is_native()) {
+ # And check whether a new orig tarball exists
+ my @origs = glob("../$PACKAGE\_$new_uversion.*");
+ my $num_origs = grep { /^..\/\Q$PACKAGE\E_\Q$new_uversion\E\.orig\.tar\.$compression_re$/ } @origs;
+ if ($num_origs == 0) {
+ warn "$progname warning: no orig tarball found for the new version.\n";
+ }
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list