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=a0e40ff858f09d3441e38da60f75aab423e33d48 commit a0e40ff858f09d3441e38da60f75aab423e33d48 Author: Guillem Jover <[email protected]> AuthorDate: Tue Apr 9 03:53:10 2024 +0200 perl: Use new Dpkg::Source::Package->get_basedirname() method Instead of open coding this, use the method provided by the class. --- scripts/Dpkg/Source/Package/V1.pm | 3 +-- scripts/Dpkg/Source/Package/V2.pm | 3 +-- scripts/dpkg-source.pl | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index bdf2c8725..566fd24c4 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -291,8 +291,7 @@ sub do_build { my $sourcepackage = $self->{fields}{'Source'}; my $basenamerev = $self->get_basename(1); my $basename = $self->get_basename(); - my $basedirname = $basename; - $basedirname =~ s/_/-/; + my $basedirname = $self->get_basedirname(); # Try to find a .orig tarball for the package my $origdir = "$dir.orig"; diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 1f0946128..a3d6c49a9 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -406,8 +406,7 @@ sub check_patches_applied { sub _generate_patch { my ($self, $dir, %opts) = @_; my ($dirname, $updir) = fileparse($dir); - my $basedirname = $self->get_basename(); - $basedirname =~ s/_/-/; + my $basedirname = $self->get_basedirname(); # Identify original tarballs my ($tarfile, %addonfile); diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index c27a954ab..3f14b1044 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -469,8 +469,7 @@ if ($options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) { $srcpkg->parse_cmdline_options(@cmdline_options); # Decide where to unpack - my $newdirectory = $srcpkg->get_basename(); - $newdirectory =~ s/_/-/g; + my $newdirectory = $srcpkg->get_basedirname(); if (@ARGV) { $newdirectory = File::Spec->catdir(shift(@ARGV)); if (-e $newdirectory) { -- Dpkg.Org's dpkg

