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=60d8baf664bd75aa235a727fd63c189d450bb4ce commit 60d8baf664bd75aa235a727fd63c189d450bb4ce Author: Guillem Jover <guil...@debian.org> AuthorDate: Sat Jan 29 23:32:45 2022 +0100 Dpkg::Source::Package: Use File::Spec instead of ad-hoc concatenation This takes care of adding the required pathname separators when needed. --- scripts/Dpkg/Source/Package.pm | 5 +++-- scripts/Dpkg/Source/Package/V2.pm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 1c9bc41fc..7fb29a42c 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -323,7 +323,7 @@ Returns the filename of the DSC file. sub get_filename { my $self = shift; - return $self->{basedir} . $self->{filename}; + return File::Spec->catfile($self->{basedir}, $self->{filename}); } =item $p->get_files() @@ -364,7 +364,8 @@ sub check_checksums { $warn_on_weak = 1; } } - $checksums->add_from_file($self->{basedir} . $file, key => $file); + my $pathname = File::Spec->catfile($self->{basedir}, $file); + $checksums->add_from_file($pathname, key => $file); } warning(g_('source package uses only weak checksums')) if $warn_on_weak; diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 96e917001..1167625d7 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -324,7 +324,7 @@ sub _upstream_tarball_template { sort map { compression_get_property($_, 'file_ext') } compression_get_list()) . '}'; - return '../' . $self->get_basename() . ".orig.tar.$ext"; + return File::Spec->catfile('..', $self->get_basename() . ".orig.tar.$ext"); } sub can_build { -- Dpkg.Org's dpkg