diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-11-05 15:16:46 +0100 |
---|---|---|
committer | kensington <kensington@gentoo.org> | 2017-11-07 11:03:01 +1100 |
commit | 9980e0076f6acc7afaa7dd63f013d9031ffc74cd (patch) | |
tree | 81358e5e02d0fca7f064a8fbb5a759285f3f2f3f | |
parent | try ~arch for keywording bugs if searching for arch gives no packages (diff) | |
download | tatt-9980e0076f6acc7afaa7dd63f013d9031ffc74cd.tar.gz tatt-9980e0076f6acc7afaa7dd63f013d9031ffc74cd.tar.bz2 tatt-9980e0076f6acc7afaa7dd63f013d9031ffc74cd.zip |
avoid needless spaces in USE specification for rdeps
-rw-r--r-- | tatt/scriptwriter.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index 2ab66f5..93cb517 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -83,8 +83,16 @@ def rdepTestString(rdep, config): sys.exit(1) rdepsnippet=rdepsnippetfile.read() snip = rdepsnippet.replace("@@FEATURES@@", "FEATURES=\"${FEATURES} test\"") - ustring = "USE=\'" + " ".join([st for st in rdep[1] if not st[0] == "!"]) + " " - ustring = ustring + " ".join(["-" + st[1:] for st in rdep[1] if st[0] == "!"]) + "\'" + uflags = [] + for st in rdep[1]: + st = st.strip() + if len(st) == 0: + continue + if st[0] == "!": + uflags.append("-" + st[1:]) + else: + uflags.append(st) + ustring = "USE=\'" + " ".join(uflags) + "\'" snip = snip.replace("@@USE@@", ustring) snip = snip.replace("@@CPV@@", rdep[0] ) snip = snip.replace("@@EMERGEOPTS@@", config['emergeopts']) |