This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2848db123e1452d2c71840b7c00ca198c3626d4e commit 2848db123e1452d2c71840b7c00ca198c3626d4e (HEAD -> master) Author: Josh Triplett <[email protected]> AuthorDate: Sat Sep 15 16:10:29 2018 -0700 perl: Replace all calls to Cwd::cwd with Cwd::getcwd The former calls /bin/pwd, while the latter uses the getcwd() syscall directly. Signed-off-by: Guillem Jover <[email protected]> --- debian/changelog | 4 ++++ doc/lcov-inject.pl | 2 +- lib/dpkg/t/t-tarextract.t | 2 +- lib/dpkg/t/t-treewalk.t | 2 +- scripts/Dpkg/Vendor/Debian.pm | 2 +- scripts/dpkg-genbuildinfo.pl | 2 +- scripts/dpkg-source.pl | 2 +- scripts/t/Dpkg_Shlibs.t | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 10d681f61..3f8de197d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -296,6 +296,10 @@ dpkg (1.19.1) UNRELEASED; urgency=medium - Delete fixup lines from i18nspector output instead of emptying them. - Add new codespell author test. + [ Josh Triplett ] + * Perl: Replace all calls to Cwd::cwd with Cwd::getcwd; the former calls + /bin/pwd, while the latter uses the getcwd() syscall directly. + [ Updated programs translations ] * Dutch (Frans Spiesschaert). Closes: #881401 * German (Sven Joachim). diff --git a/doc/lcov-inject.pl b/doc/lcov-inject.pl index a74c8010d..12b78bd9a 100755 --- a/doc/lcov-inject.pl +++ b/doc/lcov-inject.pl @@ -25,7 +25,7 @@ use Cwd; use Devel::Cover::DB; my $dir = 'scripts'; -my $cwd = cwd(); +my $cwd = getcwd(); chdir $dir or die "cannot switch to $dir\n"; diff --git a/lib/dpkg/t/t-tarextract.t b/lib/dpkg/t/t-tarextract.t index 25916bb8d..5fb9afa09 100755 --- a/lib/dpkg/t/t-tarextract.t +++ b/lib/dpkg/t/t-tarextract.t @@ -119,7 +119,7 @@ TAR make_path($tmpdir); - my $cwd = cwd(); + my $cwd = getcwd(); # Check generated tarballs. foreach my $type (qw(v7 ustar oldgnu gnu)) { diff --git a/lib/dpkg/t/t-treewalk.t b/lib/dpkg/t/t-treewalk.t index dcde7901e..6f379c81b 100755 --- a/lib/dpkg/t/t-treewalk.t +++ b/lib/dpkg/t/t-treewalk.t @@ -45,7 +45,7 @@ sub make_file { # Populate the tree hierarchy. sub make_tree { my ($dirtree) = @_; - my $cwd = cwd(); + my $cwd = getcwd(); make_path($dirtree); chdir $dirtree; diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 4bcf120e0..7d4b6d802 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -210,7 +210,7 @@ sub _add_build_flags { $use_feature{reproducible}{fixdebugpath}) { require Cwd; - $build_path = $ENV{DEB_BUILD_PATH} || Cwd::cwd(); + $build_path = $ENV{DEB_BUILD_PATH} || Cwd::getcwd(); # If we have any unsafe character in the path, disable the flag, # so that we do not need to worry about escaping the characters diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl index 96b06093a..fe296506e 100755 --- a/scripts/dpkg-genbuildinfo.pl +++ b/scripts/dpkg-genbuildinfo.pl @@ -423,7 +423,7 @@ if ($use_feature{kernel}) { $fields->{'Build-Kernel-Version'} = "$kern_rel $kern_ver"; } -my $cwd = cwd(); +my $cwd = getcwd(); if ($use_feature{path}) { $fields->{'Build-Path'} = $cwd; } else { diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 107408d79..6a4825d22 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -118,7 +118,7 @@ if (defined($options{opmode}) && } if ($dir eq '.') { # . is never correct, adjust automatically - $dir = basename(cwd()); + $dir = basename(getcwd()); chdir '..' or syserr(g_("unable to chdir to '%s'"), '..'); } # --format options are not allowed, they would take precedence diff --git a/scripts/t/Dpkg_Shlibs.t b/scripts/t/Dpkg_Shlibs.t index 4dc98bb3f..a2b892d74 100644 --- a/scripts/t/Dpkg_Shlibs.t +++ b/scripts/t/Dpkg_Shlibs.t @@ -54,7 +54,7 @@ Dpkg::Shlibs::blank_library_paths(); # We want relative paths inside the ld.so.conf fragments to work, and $srcdir # is usually a relative path, so let's temporarily switch directory. # XXX: An alternative would be to make parse_ldso_conf relative path aware. -my $cwd = cwd(); +my $cwd = getcwd(); test_needs_srcdir_switch(); Dpkg::Shlibs::parse_ldso_conf('t/Dpkg_Shlibs/ld.so.conf'); chdir($cwd); -- Dpkg.Org's dpkg

