summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-03 13:49:37 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-03 14:53:44 +0100
commit666278d3724ee2f7b3f75272a9735c5bb4176575 (patch)
tree4f8d2d8d7285a6eed7a12756b80e5d9719b13d30 /dgit
parentfe63aca9ed9d55d546a8cb5cd83053bbaaafe309 (diff)
Dgit.pm: Move is_orig_file_of_p_v and its dependencies from dgit
We want is_orig_file_of_p_v, so move it and all the things it depends on. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit22
1 files changed, 2 insertions, 20 deletions
diff --git a/dgit b/dgit
index 48feca9..ddc2d6c 100755
--- a/dgit
+++ b/dgit
@@ -100,9 +100,6 @@ our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
our $suite_re = '[-+.0-9a-z]+';
our $cleanmode_re = 'dpkg-source(?:-d)?|git|git-ff|check|none';
-our $orig_f_comp_re = qr{orig(?:-$extra_orig_namepart_re)?};
-our $orig_f_sig_re = '\\.(?:asc|gpg|pgp)';
-our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?(?:$orig_f_sig_re)?";
our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
our $splitbraincache = 'dgit-intern/quilt-cache';
@@ -201,16 +198,8 @@ sub lref () { return "refs/heads/".lbranch(); }
sub lrref () { return "refs/remotes/$remotename/".server_branch($csuite); }
sub rrref () { return server_ref($csuite); }
-sub stripepoch ($) {
- my ($vsn) = @_;
- $vsn =~ s/^\d+\://;
- return $vsn;
-}
-
-sub srcfn ($$) {
- my ($vsn,$sfx) = @_;
- return "${package}_".(stripepoch $vsn).$sfx
-}
+sub srcfn ($$) { return &source_file_leafname($package, @_); }
+sub is_orig_file_of_vsn ($$) { return &is_orig_file_of_p_v($package, @_); }
sub dscfn ($) {
my ($vsn) = @_;
@@ -1867,13 +1856,6 @@ sub is_orig_file_in_dsc ($$) {
return 1;
}
-sub is_orig_file_of_vsn ($$) {
- my ($f, $upstreamvsn) = @_;
- my $base = srcfn $upstreamvsn, '';
- return 0 unless $f =~ m/^\Q$base\E\.$orig_f_tail_re$/;
- return 1;
-}
-
# This function determines whether a .changes file is source-only from
# the point of view of dak. Thus, it permits *_source.buildinfo
# files.