fixing bug 3608: give error msg while kitrepo is not valid for 'buildkit cleanrepo <kitrepo>' command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16716 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1141f649c0
commit
e997e19531
@ -863,9 +863,10 @@ sub kit_cleanrepo
|
||||
print "Contents of $::base_repodir has been successfully removed. \n";
|
||||
}
|
||||
} else {
|
||||
my $got_one = 0;
|
||||
foreach my $kr (@{$::bldkit_config->{kitrepo}{entries}}) {
|
||||
if ($repoid eq $kr->{kitrepoid}) {
|
||||
my $repodir = $::base_repodir.'/'.$kr->{kitreponame};
|
||||
my $repodir = $::base_repodir.'/'.$kr->{kitreponame};
|
||||
if ( -d $repodir ){
|
||||
if ( system("rm -Rf $repodir ") ) {
|
||||
print "Error removing directory $repodir \n";
|
||||
@ -876,9 +877,13 @@ sub kit_cleanrepo
|
||||
} else {
|
||||
print "Kit repository $kr->{kitrepoid} directory $repodir does not exist. Nothing to remove for this repository. \n";
|
||||
}
|
||||
last;
|
||||
$got_one = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ( !$got_one ) {
|
||||
print "Kit repository $repoid does not exist.\n";
|
||||
}
|
||||
}
|
||||
if ( -d "$::workdir/rpmbuild" ) {
|
||||
system("rm -Rf $::workdir/rpmbuild ");
|
||||
|
Loading…
Reference in New Issue
Block a user