From 5d84da2f8783b23f4c87c5e1e2f0135c8bcabc14 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Fri, 13 Apr 2018 15:43:58 +0200 Subject: [PATCH] fixed cache file creation on CentOS 7 --- blueprint/deps.py | 5 ++++- blueprint/rules.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/blueprint/deps.py b/blueprint/deps.py index d50d01e..afbd998 100644 --- a/blueprint/deps.py +++ b/blueprint/deps.py @@ -74,7 +74,10 @@ def yum(s): except OSError: continue for line in p.stdout: - cap = line.rstrip()[0:line.find(' ')] + if line.find(' ') > -1: + cap = line.rstrip()[0:line.find(' ')] + else: + cap = line.rstrip() if 'rpmlib' == cap[0:6]: continue try: diff --git a/blueprint/rules.py b/blueprint/rules.py index a511a5d..85b48ff 100644 --- a/blueprint/rules.py +++ b/blueprint/rules.py @@ -221,7 +221,7 @@ def _yum(): # Start with a few groups that install common packages. s = set(['gpg-pubkey']) - pattern = re.compile(r'^ (\S+)') + pattern = re.compile(r'^ (?: |\+)?(\S+)') try: p = subprocess.Popen(['yum', 'groupinfo', 'core','base', 'gnome-desktop'],