pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/lintpkgsrc/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Aug 14 03:18:37 UTC 2022

Modified Files:
        pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl

Log Message:
lintpkgsrc: properly clean up after chdir

When running 'lintpkgsrc -I tmp/lp-85 -yro', lintpkgsrc couldn't find
the cache file due to the intermediate chdir($pkgdistdir).


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.90 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.91
--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.90 Sun Aug 14 03:12:02 2022
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl      Sun Aug 14 03:18:36 2022
@@ -1,5 +1,5 @@
 #!@PERL5@
-# $NetBSD: lintpkgsrc.pl,v 1.90 2022/08/14 03:12:02 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.91 2022/08/14 03:18:36 rillig Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -1191,6 +1191,7 @@ sub scan_pkgsrc_distfiles_vs_distinfo($p
                }
 
                verbose("checksum mismatches\n");
+               my $prev_cwd = getcwd() or die;
                chdir_or_fail($pkgdistdir);
                foreach my $sum (keys %sumfiles) {
                        if ($sum eq 'Size') {
@@ -1225,7 +1226,7 @@ sub scan_pkgsrc_distfiles_vs_distinfo($p
                        waitpid($pid, 0) || fail "xargs digest $sum";
                        waitpid($pid2, 0) || fail 'pipe write to xargs';
                }
-               chdir_or_fail('/'); # Do not want to stay in $pkgdistdir
+               chdir_or_fail($prev_cwd);
        }
 
        sort keys %unref_distfiles;



Home | Main Index | Thread Index | Old Index