chiark / gitweb /
Dgit.pm: Move upstreamversion from dgit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 3 Aug 2018 13:10:37 +0000 (14:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 3 Aug 2018 13:53:45 +0000 (14:53 +0100)
NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm
dgit

index 787e506..1cd765d 100644 (file)
@@ -43,6 +43,7 @@ BEGIN {
                      dep14_version_mangle
                       debiantags debiantag_old debiantag_new
                      debiantag_maintview
+                     upstreamversion
                      stripepoch source_file_leafname is_orig_file_of_p_v
                      server_branch server_ref
                       stat_exists link_ltarget
@@ -231,6 +232,12 @@ sub stripepoch ($) {
     return $vsn;
 }
 
+sub upstreamversion ($) {
+    my ($vsn) = @_;
+    $vsn =~ s/-[^-]+$//;
+    return $vsn;
+}
+
 sub source_file_leafname ($$$) {
     my ($package,$vsn,$sfx) = @_;
     return "${package}_".(stripepoch $vsn).$sfx
diff --git a/dgit b/dgit
index 283db22..dbb23f3 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -217,12 +217,6 @@ sub changespat ($;$) {
     return "${package}_".(stripepoch $vsn)."_".($arch//'*').".changes";
 }
 
-sub upstreamversion ($) {
-    my ($vsn) = @_;
-    $vsn =~ s/-[^-]+$//;
-    return $vsn;
-}
-
 our $us = 'dgit';
 initdebug('');