git.annexia.org
/
fedora-mingw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5b5a81
)
Support --suffix option in smock (kwizart).
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 3 Jul 2009 18:59:35 +0000
(19:59 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 3 Jul 2009 18:59:35 +0000
(19:59 +0100)
smock/smock.pl
patch
|
blob
|
history
diff --git
a/smock/smock.pl
b/smock/smock.pl
index
ff492ca
..
76a1a54
100755
(executable)
--- a/
smock/smock.pl
+++ b/
smock/smock.pl
@@
-26,6
+26,7
@@
use File::Temp qw(tempfile);
my @arches = ();
my @distros = ();
my @arches = ();
my @distros = ();
+my $suffix = "";
my $localrepo = $ENV{HOME} . "/public_html/smock/yum";
my $dryrun = 0;
my $keepgoing = 0;
my $localrepo = $ENV{HOME} . "/public_html/smock/yum";
my $dryrun = 0;
my $keepgoing = 0;
@@
-36,6
+37,7
@@
my $man = 0;
GetOptions (
"arch=s" => \@arches,
"distro=s" => \@distros,
GetOptions (
"arch=s" => \@arches,
"distro=s" => \@distros,
+ "suffix=s" => \$suffix,
"localrepo=s" => \$localrepo,
"dryrun" => \$dryrun,
"keepgoing" => \$keepgoing,
"localrepo=s" => \$localrepo,
"dryrun" => \$dryrun,
"keepgoing" => \$keepgoing,
@@
-114,6
+116,11
@@
Don't run any commands, just print the packages in the correct
format for chain building. See:
L<http://fedoraproject.org/wiki/Koji/UsingKoji#Chained_builds>
format for chain building. See:
L<http://fedoraproject.org/wiki/Koji/UsingKoji#Chained_builds>
+=item B<--suffix>
+
+Append a suffix to the mock configuration file in order to use
+a custom one.
+
=back
=cut
=back
=cut
@@
-353,7
+360,7
@@
foreach my $arch (@arches) {
my $scratchdir = "$localrepo/scratch/$name-$distro-$arch";
mkdir $scratchdir;
my $scratchdir = "$localrepo/scratch/$name-$distro-$arch";
mkdir $scratchdir;
- if (system ("mock -r $distro-$arch --resultdir $scratchdir $srpm_filename") == 0) {
+ if (system ("mock -r $distro-$arch
$suffix
--resultdir $scratchdir $srpm_filename") == 0) {
# Build was a success so move the final RPMs into the
# mock repo for next time.
system ("mv $scratchdir/*.src.rpm $localrepo/$distro/src/SRPMS") == 0 or die "mv";
# Build was a success so move the final RPMs into the
# mock repo for next time.
system ("mv $scratchdir/*.src.rpm $localrepo/$distro/src/SRPMS") == 0 or die "mv";
@@
-366,7
+373,7
@@
foreach my $arch (@arches) {
}
else {
}
else {
- push @errors, "$name-$distro-$arch";
+ push @errors, "$name-$distro-$arch
$suffix
";
print STDERR "Build failed, return code $?\nLeaving the logs in $scratchdir\n";
exit 1 unless $keepgoing;
}
print STDERR "Build failed, return code $?\nLeaving the logs in $scratchdir\n";
exit 1 unless $keepgoing;
}