Fixing bug 3643: remove createrepo from buildkit spec and add error check while using it.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16926 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2013-07-10 09:05:47 +00:00
parent c642e22556
commit 86276afd3b
2 changed files with 10 additions and 1 deletions

View File

@ -626,6 +626,15 @@ sub kit_buildrepo
my $rc = 0;
my $repoid = $::KIT_BUILDREPO;
if ( !$debianflag ){
# Check if createrepo bin exists or not. Fail at the beginning.
if (! (-e "/usr/bin/createrepo") ) {
print "Error: /usr/bin/createrepo does not exist, install createrepo first\n";
return 1;
}
}
$repoid =~ s/\s+//g;
$repoid =~ tr/A-Z/a-z/; # convert to lowercase
if ( $repoid ne 'all' ) {

View File

@ -25,7 +25,7 @@ BuildArch: noarch
# No dependencies on any other xCAT rpms
# so that this rpm can be installed in a separate build server
Requires: /usr/bin/rpmbuild createrepo
Requires: /usr/bin/rpmbuild
Provides: xCAT-buildkit = %{epoch}:%{version}