From b91c0b9da55e7a6b015e49fe441301afef721d83 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Remember which libraries we've asked the user to install already. Ignore mingw-example. --- BUILD.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/BUILD.pl b/BUILD.pl index 5a65199..ae67a93 100755 --- a/BUILD.pl +++ b/BUILD.pl @@ -56,6 +56,7 @@ sub main { delete $br{"mingw-cyrus-sasl"}; delete $br{"mingw-nsis"}; delete $br{"mingw-wix"}; + delete $br{"mingw-example"}; # There is a dependency loop (gcc -> runtime/w32api -> gcc) # which has to be manually resolved below. Break that loop. @@ -84,6 +85,8 @@ sub main { unlink "/tmp/tsort2.tmp"; } + my %installed; + while () { chomp; if (/^mingw-(.*)/) { @@ -97,8 +100,9 @@ sub main { # Are all BR RPMs installed? my $br; foreach $br (@brs) { - if (! rpm_installed ($br)) { + if (! rpm_installed ($br) && !exists $installed{$br}) { print "as root # rpm -Uvh $br*.rpm\n"; + $installed{$br} = 1; } } @@ -107,7 +111,8 @@ sub main { (!rpm_installed ("mingw-runtime") || !rpm_installed ("mingw-w32api"))) { print "rpmbuild -ba bootstrap/mingw-bootstrap.spec\n"; - print "as root # rpm -Uvh mingw-bootstrap*.rpm\n" + print "as root # rpm -Uvh mingw-bootstrap*.rpm\n"; + $installed{"mingw-bootstrap"} = 1; } # Spec file. -- 1.8.3.1