From 774b85d42db1d81936d4e4af4f6fb2c57cb51d2c Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 31 Mar 2016 21:53:33 +1300 Subject: oe-publish-sdk: exclude sstate-cache if publishing minimal SDK If SDK_EXT_TYPE is set to "minimal" then the SDK won't contain many sstate artifacts, and you're required to set up an sstate mirror in this case anyway so there's no point publishing the "stub" sstate-cache directory from within the SDK since it won't be useful for update purposes and may be confused with the real sstate-cache. There is however a possibility that people might publish the real sstate-cache directory under the same output directory provided to oe-publish-sdk, thus deleting it after extracting (as we were doing with other files we wanted to clean up at the end) would be problematic, besides which extracting it and then deleting it is wasteful. Thus, introduce a "-p" command line option to the SDK installer that we can use to tell tar not to extract the items we don't want when publishing. This has the added benefit of mostly keeping references to these in the place they belong i.e. in populate_sdk_ext.bbclass. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/oe-publish-sdk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk index 992de19955..e6cb7af861 100755 --- a/scripts/oe-publish-sdk +++ b/scripts/oe-publish-sdk @@ -94,19 +94,17 @@ def publish(args): # Unpack the SDK logger.info("Unpacking SDK") - cleanupfiles = [dest_sdk, os.path.join(destdir, 'ext-sdk-prepare.py')] if not is_remote: - cmd = "sh %s -n -y -d %s" % (dest_sdk, destination) + cmd = "sh %s -p -y -d %s" % (dest_sdk, destination) ret = subprocess.call(cmd, shell=True) if ret == 0: logger.info('Successfully unpacked %s to %s' % (dest_sdk, destination)) - for cleanupfile in cleanupfiles: - os.remove(cleanupfile) + os.remove(dest_sdk) else: logger.error('Failed to unpack %s to %s' % (dest_sdk, destination)) return ret else: - cmd = "ssh %s 'sh %s -n -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, ' '.join(cleanupfiles)) + cmd = "ssh %s 'sh %s -p -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, dest_sdk) ret = subprocess.call(cmd, shell=True) if ret == 0: logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir)) -- cgit 1.2.3-korg