From 18dc0460ef29a01f78eec4a831bb4b9911f409e6 Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 20 Nov 2012 21:17:30 +0000 Subject: [PATCH] addkit - add check for tarfile with missing product rpms git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14376 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kit.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 742c456c2..004f0ba50 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -772,6 +772,15 @@ sub addkit # should be a tar.bz2 file $basename = basename($kit); + # If this kit was built without rpms, user will need to + # run buildkit addpkgs to add the rpms to the kit tarfile + # before addkit can be run + if ( $basename =~ /.NEED_PRODUCT_PKGS.tar.bz2/ ) { + my %rsp; + push@{ $rsp{data} }, "This kit tar file was built without product packages. You will need to separately obtain your product packages, install the xCAT-buildkit rpm, and run the buildkit addpkgs command to add the rpms to the $kit file."; + xCAT::MsgUtils->message( "E", \%rsp, $callback ); + return 1; + } $basename =~ s/.tar.bz2//; $kittmpdir = "/tmp/" . $basename; chmod(0666, "$kittmpdir/*");