From 2e829d16505ec555be1f6c8f5d831f32d82bf316 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Build for the same arch/distro in series - might be faster, and might work around the caching bugs in mock/yum. --- smock/smock.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/smock/smock.pl b/smock/smock.pl index d7ebbc5..38c7375 100755 --- a/smock/smock.pl +++ b/smock/smock.pl @@ -243,15 +243,17 @@ if (! -d "$localrepo/scratch") { system "rm -f $localrepo/scratch/*"; -foreach my $name (@buildorder) { - my $version = $srpms{$name}->{version}; - my $release = $srpms{$name}->{release}; - my $srpm_filename = $srpms{$name}->{filename}; +# NB: Need to do the arch/distro in the outer loop to work +# around the caching bug in mock/yum. +foreach my $arch (@arches) { + foreach my $distro (@distros) { + foreach my $name (@buildorder) { + my $version = $srpms{$name}->{version}; + my $release = $srpms{$name}->{release}; + my $srpm_filename = $srpms{$name}->{filename}; - $release =~ s/\.fc?\d+$//; # "1.fc9" -> "1" + $release =~ s/\.fc?\d+$//; # "1.fc9" -> "1" - foreach my $arch (@arches) { - foreach my $distro (@distros) { # Does the built (binary) package exist already? my $pattern = "$localrepo/$distro/$arch/RPMS/$name-$version-$release.*.rpm"; #print "pattern = $pattern\n"; -- 1.8.3.1