From 9cb232d069130e9534abf3b472a309eeded06724 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Mon, 20 Jan 2014 04:08:30 -0500 Subject: [PATCH] fix 3879,remove build_input dir from complete kit xxx.tar.gz --- xCAT-buildkit/bin/buildkit | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/xCAT-buildkit/bin/buildkit b/xCAT-buildkit/bin/buildkit index 1a4f279a2..a670e5b31 100755 --- a/xCAT-buildkit/bin/buildkit +++ b/xCAT-buildkit/bin/buildkit @@ -952,11 +952,18 @@ sub kit_buildtar my $dir = dirname($::deploy_dir); my $bidir = "$dir/build_input"; - if ( -d "$bidir") { - if ( system("cd $::deploy_dir; cd ..; cp -r build_input $kitname" ) ) { - print "Error: Could not copy building tarfile $tarfile \n"; - return 1; + if ($::HAVE_EXTERNAL_PKG or $::HAVE_NON_NATIVE_PKGS) { + if ( -d "$bidir") { + if ( system("cd $::deploy_dir; cd ..; cp -r build_input $kitname" ) ) { + print "Error: Could not copy building tarfile $tarfile \n"; + return 1; + } } + } else { + my $mykitdir=$::deploy_dir."/"."build_input"; + if ( -d $mykitdir ) { + system("cd $mykitdir; cd ..; rm -r build_input" ); + } } print "Creating tar file $tarfile.\n";