summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Hajdan, Jr <phajdan.jr@gentoo.org>2011-10-21 17:14:28 +0200
committerPawel Hajdan, Jr <phajdan.jr@gentoo.org>2011-10-21 17:14:28 +0200
commit9b8ef056ffe123fdd90e5c156f8c6ce532376db9 (patch)
tree31b2e2699bb0f507b59fb8cceaed6884b61cad4b
parentImplement limit option for reverse dependencies. (diff)
downloadarch-tools-9b8ef056ffe123fdd90e5c156f8c6ce532376db9.tar.gz
arch-tools-9b8ef056ffe123fdd90e5c156f8c6ce532376db9.tar.bz2
arch-tools-9b8ef056ffe123fdd90e5c156f8c6ce532376db9.zip
Fix bugs:
- open log in append mode to avoid losing logs on retry - delete old ChangeLogs to avoid adding the same entry multiple times - re-Manifest after ekeyword to avoid manifest error on dependent packages
-rwxr-xr-xbatch-stabilize.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/batch-stabilize.py b/batch-stabilize.py
index b76bac7..0289c42 100755
--- a/batch-stabilize.py
+++ b/batch-stabilize.py
@@ -100,19 +100,29 @@ if __name__ == "__main__":
print 'Sanity check failed. Please make sure your CVS repo is up to date (cvs up).'
sys.exit(1)
- with open('batch-stabilize.log', 'w') as log_file:
+ with open('batch-stabilize.log', 'a') as log_file:
for bug_id in stabilization_dict:
print_and_log('Working on bug %d...' % bug_id, log_file)
commit_message = "%s stable wrt bug #%d" % (options.arch, bug_id)
for (pn, ebuild_name) in stabilization_dict[bug_id]:
cvs_path = os.path.join(options.repo, pn)
print_and_log('Working in %s...' % cvs_path, log_file)
+
+ # Remove existing changelog to avoid adding duplicate entries.
+ try:
+ os.remove(os.path.join(cvs_path, 'ChangeLog'))
+ except OSError:
+ pass
+
if run_command(["cvs", "up"], cvs_path, log_file)[0] != 0:
print '!!! cvs up failed'
sys.exit(1)
if run_command(["ekeyword", options.arch, ebuild_name], cvs_path, log_file)[0] != 0:
print '!!! ekeyword failed'
sys.exit(1)
+ if run_command(["repoman", "manifest"], cvs_path, log_file)[0] != 0:
+ print '!!! repoman manifest failed'
+ sys.exit(1)
for (pn, ebuild_name) in stabilization_dict[bug_id]:
cvs_path = os.path.join(options.repo, pn)
print_and_log('Working in %s...' % cvs_path, log_file)