This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=23689cce4be6eeef0c14847ed34803dd957df06e

commit 23689cce4be6eeef0c14847ed34803dd957df06e
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Mar 21 22:27:36 2022 +0100

    Dpkg::Vendor: Add a new backport-version-regex hook
    
    This new hook will return a regex matching the version part that denotes
    that this is a backport, with a capture group for the backport delimiter
    string.
---
 scripts/Dpkg/Vendor/Debian.pm  |  2 ++
 scripts/Dpkg/Vendor/Default.pm | 11 +++++++++++
 t/pod-spell.t                  |  3 +++
 3 files changed, 16 insertions(+)

diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 6b3e1dd4a..c293a99d6 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -86,6 +86,8 @@ sub run_hook {
         umask 0022;
         # Reset locale to a sane default.
         $ENV{LC_COLLATE} = 'C.UTF-8';
+    } elsif ($hook eq 'backport-version-regex') {
+        return qr/~(bpo|deb)/;
     } else {
         return $self->SUPER::run_hook($hook, @params);
     }
diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm
index 5b0ee9ba7..66d1bc6cb 100644
--- a/scripts/Dpkg/Vendor/Default.pm
+++ b/scripts/Dpkg/Vendor/Default.pm
@@ -153,6 +153,15 @@ tags (formed by alphanumeric and dash characters).
 The hook is called by dpkg-buildpackage to sanitize its build environment
 (since dpkg 1.20.0).
 
+=item backport-version-regex ()
+
+The hook is called by dpkg-genchanges and dpkg-mergechangelog to determine
+the backport version string that should be specially handled as not an earlier
+than version or remapped so that it does not get considered as a pre-release
+(since dpkg 1.21.3).
+The returned string is a regex with one capture group for the backport
+delimiter string, or undef if there is no regex.
+
 =back
 
 =cut
@@ -186,6 +195,8 @@ sub run_hook {
         return ();
     } elsif ($hook eq 'sanitize-environment') {
         return;
+    } elsif ($hook eq 'backport-version-regex') {
+        return;
     }
 
     # Default return value for unknown/unimplemented hooks
diff --git a/t/pod-spell.t b/t/pod-spell.t
index 13b5383b6..baf9a4483 100644
--- a/t/pod-spell.t
+++ b/t/pod-spell.t
@@ -50,6 +50,7 @@ OpenPGP
 RCS
 XDG
 archqual
+backport
 buildinfo
 bzip2
 canonicalized
@@ -66,8 +67,10 @@ dpkg-buildpackage
 dpkg-checkbuilddeps
 dpkg-dev
 dpkg-genbuildinfo
+dpkg-genchanges
 dpkg-gencontrol
 dpkg-parsechangelog
+dpkg-mergechangelog
 dsc
 dup'ed
 env

-- 
Dpkg.Org's dpkg

Reply via email to