From 363b0b2dc955e1a21832c39fdddd29cf11cf974b Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 26 Feb 2003 15:45:44 +0000 Subject: [PATCH] Handle libdepend and newdepend --- .../package/check-package-dependencies | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/infrastructure/package/check-package-dependencies b/infrastructure/package/check-package-dependencies index 9d6dba0e6f8..d1e667d5a7c 100644 --- a/infrastructure/package/check-package-dependencies +++ b/infrastructure/package/check-package-dependencies @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $OpenBSD: check-package-dependencies,v 1.1 2000/04/19 14:31:18 espie Exp $ +# $OpenBSD: check-package-dependencies,v 1.2 2003/02/26 15:45:44 espie Exp $ # Copyright (c) 2000 # Marc Espie. All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -28,13 +28,18 @@ # including Broken: for apparently missing packages. # Used to hunt ftp-packages/cdrom-packages problems. +use strict; + sub analyze { my $fh = shift; - my $main = shift; + my $main; local $_; while (<$fh>) { chomp; - if (m/^\@pkgdep\s+(\S*)\s*$/) { + if (m/^\@name\s+(\S+)\s*$/) { + $main=$1; + } + elsif (m/^\@pkgdep\s+(\S*)\s*$/) { my $pkgname = $1; if (-e "$pkgname.tgz") { print "$main -> $pkgname\n"; @@ -42,6 +47,17 @@ sub analyze { print "Broken: $main -> $pkgname\n"; } } + elsif (m/^\@newdepend\s+(\S+?)\:\S+?\:(\S+)\s*$/ || + m/^\@libdepend\s+(\S+?)\:\S+?\:\S+?\:(\S+)\s*$/) { + if ($1 eq $main) { + my $pkgname = $2; + if (-e "$pkgname.tgz") { + print "$main -> $pkgname\n"; + } else { + print "Broken: $main -> $pkgname\n"; + } + } + } } } @@ -50,7 +66,7 @@ for my $pkgname (<*.tgz>) { print STDERR "$pkgname\n"; system "tar zxqf $pkgname +CONTENTS"; if (open(my $fh, '<+CONTENTS')) { - analyze($fh, $pkgname); + analyze($fh); unlink("+CONTENTS"); } else { warn "Problem with $pkgname";