From: Frank Lichtenheld Date: Thu, 21 Feb 2008 01:27:57 +0000 (+0100) Subject: parse-contents: Create "all" symlinks relative instead of absolute X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=52f0086a17ba7e484857d78f90cda00b8360697b;p=deb%2Fpackages.git parse-contents: Create "all" symlinks relative instead of absolute No need to break them if you move the directories around. --- diff --git a/bin/parse-contents b/bin/parse-contents index f7fa9a4..82df0b8 100755 --- a/bin/parse-contents +++ b/bin/parse-contents @@ -38,6 +38,7 @@ use English; use DB_File; use Storable; use File::Path; +use File::Basename; use Packages::CommonCode qw(:all); use Packages::Config qw( $TOPDIR $DBDIR @ARCHIVES @SUITES @ARCHITECTURES ); &Packages::Config::init( './' ); @@ -142,7 +143,7 @@ for my $suite (@suites) { activate($filelist_db); #FIXME: hardcoded archs. (debports has no contrib/non-free) if ($arch !~ m/^kfreebsd-.*$/) { - system("ln", "-sf", $filelist_db, + system("ln", "-sf", basename($filelist_db), "$DBDIR/filelists_${suite}_all.db") == 0 or die "Oops"; }