summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbatch-stabilize.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/batch-stabilize.py b/batch-stabilize.py
index 0289c42..e2c4976 100755
--- a/batch-stabilize.py
+++ b/batch-stabilize.py
@@ -62,7 +62,10 @@ if __name__ == "__main__":
stabilization_dict = {}
bug_id = -1
for line in input_file:
- if line == "\n":
+ line = line.strip()
+
+ # Skip empty/whitespace lines.
+ if not line:
continue
if line.startswith("#"):
@@ -78,9 +81,9 @@ if __name__ == "__main__":
print 'Could not recognize bug id'
sys.exit(1)
- if not line.endswith("\n"):
- line += "\n"
- cpv = line[1:-1]
+ # Drop the leading '='.
+ cpv = line[1:]
+
p = portage.versions.catsplit(cpv)[1]
pn = portage.versions.pkgsplit(cpv)[0]
ebuild_name = p + ".ebuild"