[kernel-team] 16/47: Update for renaming of linux-latest-2.6 and prepare for renaming of linux-2.6
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Dec 21 00:30:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository kernel-team.
commit fa22c20d5bcb20aa1c3ed44fe5d8c36305469c7a
Author: Ben Hutchings <benh at debian.org>
Date: Thu Jun 7 05:17:52 2012 +0000
Update for renaming of linux-latest-2.6 and prepare for renaming of linux-2.6
svn path=/people/benh/; revision=19091
---
scripts/benh/bts-reassign-to-linux-2.6 | 102 ---------------------------------
1 file changed, 102 deletions(-)
diff --git a/scripts/benh/bts-reassign-to-linux-2.6 b/scripts/benh/bts-reassign-to-linux-2.6
deleted file mode 100755
index f2904fc..0000000
--- a/scripts/benh/bts-reassign-to-linux-2.6
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-
-# Copyright 2010 Ben Hutchings
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import debianbts # for query only
-import os
-import re
-
-DRY_RUN = False
-VERBOSE = True
-
-# Simple wrapper for the bts command
-class BtsTransaction(object):
- def __init__(self):
- self._cmds = []
- def execute(self, *args):
- cmd = ' '.join("'%s'" % arg for arg in args)
- self._cmds.append(cmd)
- if VERBOSE:
- print cmd
- def commit(self):
- if not DRY_RUN:
- pipe = os.popen('bts 2>&1 >/dev/null ' + ' , '.join(self._cmds),
- 'r')
- message = pipe.read()
- if pipe.close():
- raise BtsError(message.rstrip())
- self._cmds = []
- def rollback(self):
- self._cmds = []
- def reassign(self, *args):
- self.execute('reassign', *args)
- def found(self, *args):
- self.execute('found', *args)
- def fixed(self, *args):
- self.execute('fixed', *args)
-class BtsError(EnvironmentError):
- pass
-
-def reassign(txn, report):
- if (report.source.startswith('linux-2.6') or
- (report.source == '' and report.package.startswith('linux-image-'))):
- if report.found_versions:
- txn.reassign(report.bug_num, 'linux-2.6', report.found_versions[0])
- else:
- txn.reassign(report.bug_num, 'linux-2.6')
- for i in range(1, len(report.found_versions)):
- txn.found(report.bug_num, report.found_versions[i])
- for i in range(0, len(report.fixed_versions)):
- txn.fixed(report.bug_num, report.fixed_versions[i])
- elif report.source == 'linux-latest-2.6' or \
- report.source == 'linux-2.6, linux-latest-2.6':
- log = debianbts.get_bug_log(report.bug_num)
- match = re.search(r'\n'
- r'Versions of packages %s depends on:\n'
- r'(?:.+\n)*'
- r'ii\s+linux-\w+-2.6.\d+-[\w\-]+\s+(\S+)'
- % report.package,
- log[0]['body'])
- if match:
- txn.reassign(report.bug_num, 'linux-2.6', match.group(1))
- else:
- txn.reassign(report.bug_num, 'linux-2.6')
- else:
- raise ValueError('source package for report %d is "%s"'
- % (report.bug_num, report.source))
-
-def reassign_numbered(nn):
- txn = BtsTransaction()
- for report in debianbts.get_status(nn):
- reassign(txn, report)
- txn.commit()
-
-if __name__ == '__main__':
- import getopt, sys
- opts, args = getopt.getopt(sys.argv[1:], 'hnqv',
- ['help', 'dry-run', 'quiet', 'verbose'])
- for opt, _ in opts:
- if opt == '-h' or opt == '--help':
- print 'Usage: bts-reassign-to-linux-2.6 [--verbose|--quiet] [--dry-run] <bug#> ...'
- sys.exit(0)
- elif opt == '-n' or opt == '--dry-run':
- DRY_RUN = True
- elif opt == '-q' or opt == '--quiet':
- VERBOSE = False
- elif opt == '-v' or opt == '--verbose':
- VERBOSE = True
- reassign_numbered([int(arg) for arg in args])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git
More information about the Kernel-svn-changes
mailing list