mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-17 03:41:28 +00:00
Remove massfile. Neglected and unused (LP: #145598)
This commit is contained in:
parent
fdd01746fe
commit
4750a90f80
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -3,6 +3,7 @@ ubuntu-dev-tools (0.134) UNRELEASED; urgency=low
|
|||||||
[ Stefano Rivera ]
|
[ Stefano Rivera ]
|
||||||
* mk-sbuild: Correct typo in variable name. Thanks Laurent Declercq.
|
* mk-sbuild: Correct typo in variable name. Thanks Laurent Declercq.
|
||||||
(Closes: #645917)
|
(Closes: #645917)
|
||||||
|
* Remove massfile. Neglected and unused (LP: #145598)
|
||||||
|
|
||||||
[ Benjamin Drung ]
|
[ Benjamin Drung ]
|
||||||
* syncpackage: Catch user abort.
|
* syncpackage: Catch user abort.
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -81,7 +81,6 @@ Description: useful tools for Ubuntu developers
|
|||||||
http://harvest.ubuntu.com
|
http://harvest.ubuntu.com
|
||||||
- hugdaylist - compile HugDay lists from bug list URLs.
|
- hugdaylist - compile HugDay lists from bug list URLs.
|
||||||
- import-bug-from-debian - copy a bug from the Debian BTS to Launchpad
|
- import-bug-from-debian - copy a bug from the Debian BTS to Launchpad
|
||||||
- massfile - fill multiple bugs using a template.
|
|
||||||
- merge-changelog - manually merges two Debian changelogs with the same base
|
- merge-changelog - manually merges two Debian changelogs with the same base
|
||||||
version.
|
version.
|
||||||
- mk-sbuild - script to create LVM snapshot chroots via schroot and
|
- mk-sbuild - script to create LVM snapshot chroots via schroot and
|
||||||
|
2
debian/copyright
vendored
2
debian/copyright
vendored
@ -82,7 +82,6 @@ Files: doc/bitesize.1
|
|||||||
doc/grab-merge.1
|
doc/grab-merge.1
|
||||||
doc/harvest.1
|
doc/harvest.1
|
||||||
doc/hugdaylist.1
|
doc/hugdaylist.1
|
||||||
doc/massfile.1
|
|
||||||
doc/merge-changelog.1
|
doc/merge-changelog.1
|
||||||
doc/setup-packaging-environment.1
|
doc/setup-packaging-environment.1
|
||||||
doc/syncpackage.1
|
doc/syncpackage.1
|
||||||
@ -90,7 +89,6 @@ Files: doc/bitesize.1
|
|||||||
grab-merge
|
grab-merge
|
||||||
harvest
|
harvest
|
||||||
hugdaylist
|
hugdaylist
|
||||||
massfile
|
|
||||||
merge-changelog
|
merge-changelog
|
||||||
setup-packaging-environment
|
setup-packaging-environment
|
||||||
syncpackage
|
syncpackage
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
.TH MASSFILE "1" "June 2010" "ubuntu-dev-tools"
|
|
||||||
.SH NAME
|
|
||||||
\fBmassfile\fR \- script for massfiling bugs against Ubuntu packages
|
|
||||||
|
|
||||||
.SH SYNOPSIS
|
|
||||||
\fBmassfile\fR [\fIoptions\fR]
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
\fBmassfile\fR is a script for massfiling bugs against Ubuntu packages in Launchpad. It requires an instructions file describing the contents of the bug report and a list file which lists the packages which the bug will be filed against.
|
|
||||||
|
|
||||||
Templates for both files can be found in /usr/share/doc/ubuntu-dev-tools/examples.
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
.B \-l \fIINSTANCE\fR, \fB\-\-lpinstance\fR=\fIINSTANCE\fR
|
|
||||||
Use the specified instance of Launchpad (e.g. "staging"), instead of
|
|
||||||
the default of "production".
|
|
||||||
.TP
|
|
||||||
.B \-\-no\-conf
|
|
||||||
Do not read any configuration files, or configuration from environment
|
|
||||||
variables.
|
|
||||||
|
|
||||||
.SH EXAMPLES
|
|
||||||
\fBinstructions\fR - file designating the contents of the bug report
|
|
||||||
|
|
||||||
subject: [UNMETDEPS] $pack has unmet dependencies
|
|
||||||
assignee:
|
|
||||||
status: confirmed
|
|
||||||
subscribers: motu
|
|
||||||
tags: unmetdeps
|
|
||||||
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
|
||||||
text:
|
|
||||||
A run of
|
|
||||||
.
|
|
||||||
LC_ALL=C apt-cache \-i unmet | grep ^Package | cut \-d' ' \-f2 | grep
|
|
||||||
\-v dbgsym | sort \-u | xargs apt-cache showsrc | grep ^Directory |
|
|
||||||
sed 's/Package\:\ //g' | grep verse | cut \-d'/' \-f4
|
|
||||||
indicates that the source package $pack has binary packages that are
|
|
||||||
not installable (on AMD64) at the moment.
|
|
||||||
.
|
|
||||||
Please have a look and make sure it's installable again.
|
|
||||||
|
|
||||||
\fBlist\fR - file designating the packages affected
|
|
||||||
|
|
||||||
Each package should be listed on a new line as follows:
|
|
||||||
|
|
||||||
z88dk
|
|
||||||
zope-quotafolder
|
|
||||||
|
|
||||||
.SH ENVIRONMENT
|
|
||||||
All of the \fBCONFIGURATION VARIABLES\fR below are also supported as
|
|
||||||
environment variables.
|
|
||||||
Variables in the environment take precedence to those in configuration
|
|
||||||
files.
|
|
||||||
|
|
||||||
.SH CONFIGURATION VARIABLES
|
|
||||||
The following variables can be set in the environment or in
|
|
||||||
.BR ubuntu\-dev\-tools (5)
|
|
||||||
configuration files.
|
|
||||||
In each case, the script\-specific variable takes precedence over the
|
|
||||||
package\-wide variable.
|
|
||||||
.TP
|
|
||||||
.BR MASSFILE_LPINSTANCE ", " UBUNTUTOOLS_LPINSTANCE
|
|
||||||
The default value for \fB--lpinstance\fR.
|
|
||||||
|
|
||||||
.SH AUTHORS
|
|
||||||
\fBmassfile\fR was written by Iain Lane <iain@orangesquash.org.uk>, Daniel Hahler <ubuntu@thequod.de>. and Markus Korn <thekorn@gmx.de>.
|
|
||||||
|
|
||||||
This manual page was written by Andrew Starr-Bochicchio <a.starr.b@gmail.com>.
|
|
||||||
.PP
|
|
||||||
Both are released under the terms of the GNU General Public License, version 3.
|
|
@ -1,16 +0,0 @@
|
|||||||
subject: [UNMETDEPS] $pack has unmet dependencies
|
|
||||||
assignee:
|
|
||||||
status: confirmed
|
|
||||||
subscribers: motu
|
|
||||||
tags: unmetdeps
|
|
||||||
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
|
||||||
text:
|
|
||||||
A run of
|
|
||||||
.
|
|
||||||
LC_ALL=C apt-cache -i unmet | grep ^Package | cut -d' ' -f2 | grep
|
|
||||||
-v dbgsym | sort -u | xargs apt-cache showsrc | grep ^Directory |
|
|
||||||
sed 's/Package\:\ //g' | grep verse | cut -d'/' -f4
|
|
||||||
indicates that the source package $pack has binary packages that are not
|
|
||||||
installable (on AMD64) at the moment.
|
|
||||||
.
|
|
||||||
Please have a look and make sure it's installable again.
|
|
@ -1,2 +0,0 @@
|
|||||||
z88dk
|
|
||||||
zope-quotafolder
|
|
180
massfile
180
massfile
@ -1,180 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Canonical Ltd.
|
|
||||||
#
|
|
||||||
# Modified by Iain Lane <iain@orangesquash.org.uk>, taking some code written by
|
|
||||||
# Daniel Hahler <ubuntu@thequod.de>
|
|
||||||
#
|
|
||||||
# python-launchpadlib support was added by Markus Korn <thekorn@gmx.de>.
|
|
||||||
#
|
|
||||||
# ##################################################################
|
|
||||||
#
|
|
||||||
# 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; version 3.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# See file /usr/share/common-licenses/GPL-3 for more details.
|
|
||||||
#
|
|
||||||
# ##################################################################
|
|
||||||
|
|
||||||
import optparse
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import email
|
|
||||||
|
|
||||||
from launchpadlib.launchpad import Launchpad
|
|
||||||
|
|
||||||
from ubuntutools.config import UDTConfig
|
|
||||||
from ubuntutools.lp.libsupport import translate_web_api
|
|
||||||
|
|
||||||
def read_config():
|
|
||||||
instructions_file = open("instructions")
|
|
||||||
instructions = email.message_from_file(instructions_file)
|
|
||||||
instructions_file.close()
|
|
||||||
instr = dict()
|
|
||||||
|
|
||||||
for field in "subject", "assignee", "subscribers", "tags", "text", \
|
|
||||||
"buglist-url", "status":
|
|
||||||
instr[field] = instructions.get(field)
|
|
||||||
|
|
||||||
return instr
|
|
||||||
|
|
||||||
def read_list():
|
|
||||||
pack_list = set()
|
|
||||||
|
|
||||||
listfile = open("list")
|
|
||||||
for line in listfile.readlines():
|
|
||||||
if line.strip()!="":
|
|
||||||
pack_list.add(line.strip("\n"))
|
|
||||||
|
|
||||||
listfile.close()
|
|
||||||
return pack_list
|
|
||||||
|
|
||||||
def check_configfiles():
|
|
||||||
result = True
|
|
||||||
|
|
||||||
bin_path = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
if bin_path == "/usr/bin":
|
|
||||||
example_dir = "/usr/share/doc/ubuntu-dev-tools/examples"
|
|
||||||
else:
|
|
||||||
example_dir = "%s/examples" % bin_path
|
|
||||||
|
|
||||||
if not os.path.exists("instructions"):
|
|
||||||
os.system("cp %s/massfile.instructions instructions" % example_dir)
|
|
||||||
print >> sys.stderr, \
|
|
||||||
"No 'instructions' file found. Copied template from %s." % \
|
|
||||||
example_dir
|
|
||||||
result = False
|
|
||||||
|
|
||||||
if not os.path.exists("list"):
|
|
||||||
os.system("cp %s/massfile.list list" % example_dir)
|
|
||||||
print >> sys.stderr, \
|
|
||||||
"No 'list' file found. Copied template from %s." % example_dir
|
|
||||||
result = False
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def file_bug(config, launchpad):
|
|
||||||
try:
|
|
||||||
summary = config["subject"].replace("$pack", config["sourcepackage"])
|
|
||||||
description = config["text"].replace("$pack", config["sourcepackage"])
|
|
||||||
|
|
||||||
product_url = "%subuntu/+source/%s" % \
|
|
||||||
(launchpad._root_uri, config["sourcepackage"])
|
|
||||||
tags = [t for t in [t.strip("\n").strip() for t in
|
|
||||||
config["tags"].split(",")] if t]
|
|
||||||
bug = launchpad.bugs.createBug(description=description, title=summary,
|
|
||||||
target=product_url, tags=tags)
|
|
||||||
|
|
||||||
print "Successfully filed bug %i: %s" % \
|
|
||||||
(bug.id, bug.web_link)
|
|
||||||
|
|
||||||
subscribers = [s for s in [s.strip("\n").strip() for s in
|
|
||||||
config["subscribers"].split(",")] if s]
|
|
||||||
for sub in subscribers:
|
|
||||||
subscribe_url = "%s~%s" % (launchpad._root_uri, sub)
|
|
||||||
bug.subscribe(person=subscribe_url)
|
|
||||||
|
|
||||||
#newly created bugreports have one task
|
|
||||||
task = bug.bug_tasks[0]
|
|
||||||
|
|
||||||
if config["status"]:
|
|
||||||
status = config["status"].capitalize()
|
|
||||||
else:
|
|
||||||
status = "Confirmed"
|
|
||||||
task.status = status
|
|
||||||
|
|
||||||
assignee = config["assignee"]
|
|
||||||
if assignee:
|
|
||||||
assignee_url = "%s~%s" % (launchpad._root_uri, assignee)
|
|
||||||
task.assignee = assignee_url
|
|
||||||
task.lp_save()
|
|
||||||
except:
|
|
||||||
print >> sys.stderr, "Bug for '%s' was not filed." % \
|
|
||||||
config["sourcepackage"]
|
|
||||||
|
|
||||||
def read_buglist(url, launchpad):
|
|
||||||
if not url:
|
|
||||||
return set()
|
|
||||||
|
|
||||||
if len(url.split("?", 1)) == 2:
|
|
||||||
# search options not supported, because there is no mapping
|
|
||||||
# web ui options <-> API options
|
|
||||||
print >> sys.stderr, "Options in url are not supported, url: %s" % url
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
packages = set()
|
|
||||||
|
|
||||||
api_url = translate_web_api(url, launchpad)
|
|
||||||
# workaround LP #303414
|
|
||||||
# if this is fixed it should simply be: buglist = launchpad.load(api_url)
|
|
||||||
api_url = api_url.split("?", 1)[0]
|
|
||||||
project = launchpad.load(api_url)
|
|
||||||
buglist = project.searchTasks()
|
|
||||||
|
|
||||||
for bug in buglist:
|
|
||||||
packages.add(bug.bug_target_name)
|
|
||||||
|
|
||||||
return packages
|
|
||||||
|
|
||||||
def main():
|
|
||||||
description = ('Files bugs against multiple packages in Ubuntu. '
|
|
||||||
'Reads the bug from "instructions" and files them against '
|
|
||||||
'packages listed in "list". '
|
|
||||||
"If these files aren't preset they are created.")
|
|
||||||
parser = optparse.OptionParser(description=description)
|
|
||||||
parser.add_option('-l', '--lpinstance', metavar='INSTANCE',
|
|
||||||
dest='lpinstance', default=None,
|
|
||||||
help='Launchpad instance to connect to '
|
|
||||||
'(default: production)')
|
|
||||||
parser.add_option('--no-conf',
|
|
||||||
dest='no_conf', default=False, action='store_true',
|
|
||||||
help="Don't read config files or environment variables")
|
|
||||||
options = parser.parse_args()[0]
|
|
||||||
udtconfig = UDTConfig(options.no_conf)
|
|
||||||
if options.lpinstance is None:
|
|
||||||
options.lpinstance = udtconfig.get_value('LPINSTANCE')
|
|
||||||
|
|
||||||
if not check_configfiles():
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
launchpad = Launchpad.login_with('ubuntu-dev-tools', options.lpinstance)
|
|
||||||
config = read_config()
|
|
||||||
pack_list = read_list()
|
|
||||||
buglist = read_buglist(config["buglist-url"], launchpad)
|
|
||||||
|
|
||||||
for pack in pack_list:
|
|
||||||
if pack not in buglist:
|
|
||||||
config["sourcepackage"] = pack
|
|
||||||
file_bug(config, launchpad)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
3
setup.py
3
setup.py
@ -25,7 +25,6 @@ scripts = ['404main',
|
|||||||
'harvest',
|
'harvest',
|
||||||
'hugdaylist',
|
'hugdaylist',
|
||||||
'import-bug-from-debian',
|
'import-bug-from-debian',
|
||||||
'massfile',
|
|
||||||
'merge-changelog',
|
'merge-changelog',
|
||||||
'mk-sbuild',
|
'mk-sbuild',
|
||||||
'pbuilder-dist',
|
'pbuilder-dist',
|
||||||
@ -57,8 +56,6 @@ if __name__ == '__main__':
|
|||||||
],
|
],
|
||||||
data_files=[('/etc/bash_completion.d',
|
data_files=[('/etc/bash_completion.d',
|
||||||
glob.glob("bash_completion/*")),
|
glob.glob("bash_completion/*")),
|
||||||
('share/doc/ubuntu-dev-tools/examples',
|
|
||||||
glob.glob('examples/*')),
|
|
||||||
('share/man/man1', glob.glob("doc/*.1")),
|
('share/man/man1', glob.glob("doc/*.1")),
|
||||||
('share/man/man5', glob.glob("doc/*.5")),
|
('share/man/man5', glob.glob("doc/*.5")),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user