1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

Modernize these two scripts a little bit to make it easier to deal

with 5.X or 4.X package sets (i.e., INDEX vs INDEX-5 and tgz vs tbz)

OKed by:    marcus
This commit is contained in:
Murray Stokely 2004-06-08 21:57:01 +00:00
parent 5e98f2fe8d
commit 23cad417ec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111108
2 changed files with 16 additions and 6 deletions

View File

@ -22,7 +22,8 @@ fi
pkgs="$ports/packages/All"
scripts="$dir"
xdep_re="^XFree86-3.3.6_1[0-9]$"
#indexfile="INDEX-5"
indexfile="INDEX"
#
##############################################################################
@ -67,9 +68,9 @@ if [ ! -f "$logs/.cdrom.done" ]; then
touch $logs/.cdrom.done
fi
if [ ! -f "$logs/INDEX" ]; then
echo "===> copying INDEX file"
$scripts/scrubindex.pl $pkgs $ports/INDEX > $logs/INDEX
if [ ! -f "$logs/$indexfile" ]; then
echo "===> copying INDEX file from $ports/$indexfile"
$scripts/scrubindex.pl $pkgs $ports/$indexfile > $logs/INDEX
$scripts/checkdeps.pl $pkgs $logs/INDEX | sort -u | \
sed -e 's/^/missing dependency: /'
fi
@ -96,6 +97,7 @@ if [ X$ans != Xn -a X$ans != XN ]; then
echo "===> deleting scratch"
rm -rf scratch
fi
echo "Calling oneshot.pl config $logs/need.ALL $logs/INDEX $ports $pkgs/../ $dists"
$scripts/oneshot.pl config $logs/need.ALL $logs/INDEX $ports $pkgs/../ $dists
for disc in `ls -d disc? 2>/dev/null`; do
echo "===> cleaning $disc"

View File

@ -5,6 +5,12 @@ die "$0 <pkgdir> <indexfile>\n" if ($#ARGV != 1);
$xdep = 'XFree86-3\.3\.6_10';
$pkgdir = shift(@ARGV);
#$ext = 'tbz';
$ext = 'tgz';
print STDERR "scrubindex pkgdir: $pkgdir\n";
my $cnt = 0;
LOOP:
while (<>) {
@ -13,11 +19,13 @@ while (<>) {
s/\| /\|/g;
@f = split('\|');
next if (! -f "$pkgdir/$f[0].tgz");
next if (! -f "$pkgdir/$f[0].$ext");
foreach $dep (split(' ', $f[8])) {
next LOOP if (! -f "$pkgdir/$dep.tgz");
next LOOP if (! -f "$pkgdir/$dep.$ext");
}
$cnt++;
print;
}
print STDERR "$cnt lines copied from scrubindex.pl"