diff --git a/chroma-bundles/install b/chroma-bundles/install index 85373353ba..55575fb0e2 100755 --- a/chroma-bundles/install +++ b/chroma-bundles/install @@ -305,7 +305,7 @@ def _new_profiles(upgrade): def _old_bundles(): bundles = {} log.debug("Bundles currently installed:") - for bundle_meta_path in glob.glob(os.path.join(BUNDLE_ROOT, "*/meta")): + for bundle_meta_path in glob.glob(os.path.join(BUNDLE_ROOT, "*/*/meta")): meta = json.load(open(bundle_meta_path)) log.debug("{name}-{version}: {description}".format( @@ -449,6 +449,7 @@ def _backup_repo(old_bundles, bundle, meta): # repos if os.path.exists(os.path.join(BUNDLE_ROOT, meta['name'])): for path in os.listdir(os.path.join(BUNDLE_ROOT, meta['name'])): + path = os.path.join(BUNDLE_ROOT, meta['name'], path) if os.path.isdir(path): shutil.rmtree(path) else: @@ -507,6 +508,15 @@ def _install_or_upgrade_bundles(old_bundles, new_bundles): # repo will already have been moved to backup location log.debug("Removing retired bundle %s" % meta['name']) _run(['chroma-config', 'bundle', 'delete', install_location]) + # agents will still have the repo we just deleted configured + # and be getting errors trying to find the metadata + # create an empty repo for this retired bundle + try: + os.makedirs(install_location) + except OSError as e: + if e.errno != errno.EEXIST: + raise SystemExit("Failed to create %s" % install_location) + _run(['createrepo', install_location]) def _install_or_upgrade_profiles(new_profiles): diff --git a/chroma-manager/chroma-manager.spec b/chroma-manager/chroma-manager.spec index 1ccffcf452..d3d096cbd8 100644 --- a/chroma-manager/chroma-manager.spec +++ b/chroma-manager/chroma-manager.spec @@ -57,6 +57,7 @@ Requires: iml-supervisor-status Requires: iml-gui Requires: iml-srcmap-reverse Requires: iml-online-help +Requires: createrepo Conflicts: chroma-agent Requires(post): selinux-policy-targeted Obsoletes: httpd