From d4f47eda9923588044371f69ba926c9454b3ad62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 23 Aug 2016 15:57:43 +0200 Subject: [PATCH] Don't handle commented out dependencies --- fur | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fur b/fur index 6fff853..2959e6a 100755 --- a/fur +++ b/fur @@ -73,7 +73,13 @@ def fur_dependencies(name): spec_file = open("/home/" + user + "/.fur/" + name + "/" + name + ".spec", "r") print("Solving dependencies from Fedora User Repository...") for spec_line in spec_file: - if "BuildRequires" in spec_line: + if "#BuildRequires" in spec_line: + # Skip commented out BuildRequires + continue + elif "#Requires" in spec_line: + # Skip commented out Requires + continue + elif "BuildRequires" in spec_line: spec_line = re.sub(r"BuildRequires: ", "", spec_line) spec_line = spec_line.rstrip() fur_build_requires_array.append(spec_line)