mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-17 03:41:28 +00:00
Merge with trunk
This commit is contained in:
commit
8090782049
11
debian/changelog
vendored
11
debian/changelog
vendored
@ -6,14 +6,17 @@ ubuntu-dev-tools (0.35) intrepid; urgency=low
|
|||||||
* requestsync:
|
* requestsync:
|
||||||
- If the email interface is used, check if DEBEMAIL is set before anything
|
- If the email interface is used, check if DEBEMAIL is set before anything
|
||||||
else (LP: #254632).
|
else (LP: #254632).
|
||||||
|
* massfile, examples/massfile.instructions:
|
||||||
|
- Make it possible to give the created bugs a determined status.
|
||||||
|
|
||||||
[ Iain Lane ]
|
[ Iain Lane ]
|
||||||
* Add pull-lp-source: Get source packages from LP to avoid mirror lag.
|
* Add pull-lp-source, which get source packages from LP to avoid mirror lag.
|
||||||
* pbuilder-dist.new:
|
* pbuilder-dist.new:
|
||||||
- Set mirror and componente for debian distros
|
- Set mirror and component for Debian distros.
|
||||||
- Use local apt cache if available
|
- Use local apt cache if available.
|
||||||
* massfile:
|
* massfile:
|
||||||
- Modify to work with Firefox 3 cookies
|
- Modify it to work with Firefox 3 cookies, taking code from requestsync.
|
||||||
|
- Set the status to Confirmed, by default.
|
||||||
|
|
||||||
-- Iain Lane <iain@orangesquash.org.uk> Mon, 04 Aug 2008 18:43:10 +0100
|
-- Iain Lane <iain@orangesquash.org.uk> Mon, 04 Aug 2008 18:43:10 +0100
|
||||||
|
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
.TH PULL-LP-SOURCE "1" "4 August 2008" "ubuntu-dev-tools"
|
.TH PULL-LP-SOURCE "1" "4 August 2008" "ubuntu-dev-tools"
|
||||||
.SH NAME
|
|
||||||
pull-lp-source \- Download a source package from Launchpad
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B pull-lp-source <\fBsource package\fR> [\fItarget release\fR]
|
|
||||||
|
|
||||||
.B pull-lp-source -h
|
.SH NAME
|
||||||
|
pull-lp-source \- download a source package from Launchpad
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B pull-lp-source [-h] <\fBsource package\fR> [\fItarget release\fR]
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.PP
|
.PP
|
||||||
\fBpull-lp-source\fR downloads and extracts the latest version of
|
\fBpull-lp-source\fR downloads and extracts the latest version of
|
||||||
<\fBsource package\fR> from Launchpad. If the optional parameter
|
<\fBsource package\fR> from Launchpad. If the optional parameter
|
||||||
[\fItarget release\fR] is specified, the latest version in that release
|
[\fItarget release\fR] is specified, the latest version in that release
|
||||||
will be downloaded instead.
|
will be downloaded instead.
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.PP
|
.PP
|
||||||
Listed below are the command line options for requestsync:
|
Listed below are the command line options for requestsync:
|
||||||
@ -24,6 +26,14 @@ This is the source package that you would like to be downloaded from Launchpad.
|
|||||||
.B [target release]
|
.B [target release]
|
||||||
This is the release that you would like the source package to be downloaded from.
|
This is the release that you would like the source package to be downloaded from.
|
||||||
This value defaults to the current development release.
|
This value defaults to the current development release.
|
||||||
|
|
||||||
|
.SH ENVIRONMENT VARIABLES
|
||||||
|
.TP
|
||||||
|
DIST
|
||||||
|
Specifies the default target.
|
||||||
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
This manual page was written by Iain Lane
|
\fBpull-lp-source\fR and this manual page were written by Iain Lane
|
||||||
|
<iain@orangesquash.org.uk>. Both are released under the GNU General Public
|
||||||
|
License, version 3 or later.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
subject: [UNMETDEPS] $pack has unmet dependencies
|
subject: [UNMETDEPS] $pack has unmet dependencies
|
||||||
assignee:
|
assignee:
|
||||||
|
status: confirmed
|
||||||
subscribers: motu
|
subscribers: motu
|
||||||
tags: unmetdeps
|
tags: unmetdeps
|
||||||
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
||||||
@ -13,4 +14,3 @@ text:
|
|||||||
installable (on AMD64) at the moment.
|
installable (on AMD64) at the moment.
|
||||||
.
|
.
|
||||||
Please have a look and make sure it's installable again.
|
Please have a look and make sure it's installable again.
|
||||||
|
|
||||||
|
21
massfile
21
massfile
@ -2,9 +2,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# (C) Canonical, 2007, GPL v3
|
# (C) Canonical, 2007, GPL v3
|
||||||
# Authors:
|
#
|
||||||
# Iain Lane <iain@orangesquash.org.uk>, taking some code written by:
|
# Modified by Iain Lane <iain@orangesquash.org.uk>, taking some code written by
|
||||||
# Daniel Hahler <ubuntu-launchpad@thequod.de>
|
# Daniel Hahler <ubuntu@thequod.de>
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -22,7 +22,7 @@ def read_config():
|
|||||||
instr = dict()
|
instr = dict()
|
||||||
|
|
||||||
for field in "subject", "assignee", "subscribers", "tags", "text", \
|
for field in "subject", "assignee", "subscribers", "tags", "text", \
|
||||||
"buglist-url":
|
"buglist-url", "status":
|
||||||
instr[field] = instructions.get(field)
|
instr[field] = instructions.get(field)
|
||||||
|
|
||||||
return instr
|
return instr
|
||||||
@ -89,7 +89,10 @@ def file_bug(config):
|
|||||||
if tag.strip("\n").strip():
|
if tag.strip("\n").strip():
|
||||||
bug.tags.append(tag.strip("\n").strip())
|
bug.tags.append(tag.strip("\n").strip())
|
||||||
bug.assignee = config["assignee"]
|
bug.assignee = config["assignee"]
|
||||||
bug.status = "Confirmed"
|
if config["status"]:
|
||||||
|
bug.status = config["status"].capitalize()
|
||||||
|
else:
|
||||||
|
bug.status = "Confirmed"
|
||||||
bug.commit()
|
bug.commit()
|
||||||
except:
|
except:
|
||||||
"Bug for '%s' was not filed." % config["sourcepackage"]
|
"Bug for '%s' was not filed." % config["sourcepackage"]
|
||||||
@ -123,10 +126,10 @@ def lp_cookie():
|
|||||||
break
|
break
|
||||||
|
|
||||||
if cookie == None:
|
if cookie == None:
|
||||||
raise RuntimeError('''Could not find cookie file for Launchpad (looked in %s)
|
raise RuntimeError("Could not find cookie file for Launchpad \
|
||||||
You should be able to create a valid file by logging into Launchpad with Firefox''') % ", ".join(try_globs)
|
(looked in %s). You should be able to create a valid file by logging into \
|
||||||
|
Launchpad with Firefox") % ", ".join(try_globs)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if not check_configfiles():
|
if not check_configfiles():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
debian_distros = ["etch", "lenny", "sid", "stable", "testing", "unstable"]
|
debian_distros = ['etch', 'lenny', 'sid', 'stable', 'testing', 'unstable']
|
||||||
|
|
||||||
class pbuilder_dist:
|
class pbuilder_dist:
|
||||||
|
|
||||||
@ -184,18 +184,19 @@ class pbuilder_dist:
|
|||||||
'--logfile "%(logfile)s"' % self,
|
'--logfile "%(logfile)s"' % self,
|
||||||
'--aptcache "/var/cache/apt/archives/"',
|
'--aptcache "/var/cache/apt/archives/"',
|
||||||
### --mirror "${ARCHIVE}" \
|
### --mirror "${ARCHIVE}" \
|
||||||
'--bindmounts /var/cache/archive/ --override-config'
|
'--bindmounts "/var/cache/archive/"',
|
||||||
|
'--override-config',
|
||||||
]
|
]
|
||||||
|
|
||||||
localrepo = '/var/cache/archive/%(target_distro)s' % self
|
localrepo = '/var/cache/archive/%(target_distro)s' % self
|
||||||
|
|
||||||
if os.path.exists(localrepo):
|
if os.path.exists(localrepo):
|
||||||
arguments.append('--othermirror "deb file:///var/cache/archive/ %(target_distro)s/"' % self)
|
arguments.append('--othermirror ' +\
|
||||||
|
'"deb file:///var/cache/archive/ %(target_distro)s/"' % self)
|
||||||
|
|
||||||
if self.target_distro in debian_distros:
|
if self.target_distro in debian_distros:
|
||||||
arguments.append('--mirror "ftp://ftp.debian.org/debian"')
|
arguments.append('--mirror "ftp://ftp.debian.org/debian"')
|
||||||
arguments.append('--components "main contrib non-free"')
|
arguments.append('--components "main contrib non-free"')
|
||||||
|
|
||||||
if self.build_architecture != self.system_architecture:
|
if self.build_architecture != self.system_architecture:
|
||||||
arguments.append('--debootstrapopts --arch')
|
arguments.append('--debootstrapopts --arch')
|
||||||
arguments.append('--debootstrapopts "%(build_architecture)s"' % self)
|
arguments.append('--debootstrapopts "%(build_architecture)s"' % self)
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
# pull-lp-source -- pull a source package from Launchpad
|
# pull-lp-source -- pull a source package from Launchpad
|
||||||
# Basic usage: pull-lp-source <source package> [<distro>]
|
# Basic usage: pull-lp-source <source package> [<distro>]
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Iain Lane, BackportFromLP class taken from
|
# Copyright (C) 2008 Iain Lane <iain@orangesquash.org.uk>
|
||||||
# prevu tool and:
|
#
|
||||||
# Copyright (C) 2006 John Dong <jdong@ubuntu.com>
|
# BackportFromLP class taken from prevu tool, which has
|
||||||
|
# copyright (C) 2006 John Dong <jdong@ubuntu.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -24,39 +25,44 @@
|
|||||||
# TODO: Determine before going to LP whether a source package and distro exist or not.
|
# TODO: Determine before going to LP whether a source package and distro exist or not.
|
||||||
# TODO: Determine current development distro programatically
|
# TODO: Determine current development distro programatically
|
||||||
|
|
||||||
import sys,os
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
class BackportFromLP():
|
class BackportFromLP:
|
||||||
|
|
||||||
def __getitem__(self, name):
|
def __getitem__(self, name):
|
||||||
return getattr(self, name)
|
return getattr(self, name)
|
||||||
|
|
||||||
def __init__(self, package, target_distro):
|
def __init__(self, package, target_distro):
|
||||||
self.package=package
|
self.package = package
|
||||||
self.target_distro=target_distro
|
self.target_distro = target_distro
|
||||||
self.__prepare_sources()
|
self.__prepare_sources()
|
||||||
|
|
||||||
def __prepare_sources(self):
|
def __prepare_sources(self):
|
||||||
# Scrape from Launchpad the source package :)
|
# Scrape the source package from Launchpad :)
|
||||||
import re
|
import re
|
||||||
|
|
||||||
contents = os.popen('wget -q https://launchpad.net/ubuntu/%(target_distro)s/+source/%(package)s -O-' % self).read()
|
contents = os.popen('wget -q https://launchpad.net/ubuntu/%(target_distro)s/+source/%(package)s -O-' % self).read()
|
||||||
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
||||||
|
|
||||||
if len(links) == 1 and (os.system("dget -xu http://launchpad.net%s" % links[0])) == 0:
|
if len(links) == 1 and \
|
||||||
print 'Success'
|
(os.system('dget -x http://launchpad.net%s' % links[0])) == 0:
|
||||||
|
print '\nSuccess!'
|
||||||
else:
|
else:
|
||||||
raise ValueError, "Failed to fetch and extract source. Ensure that the package specified is a valid source package name and Launchpad is not down."
|
raise ValueError, '\nFailed to fetch and extract the source. ' +\
|
||||||
|
'Ensure that the package specified is a valid source ' +\
|
||||||
|
'package name and that Launchpad is not down.'
|
||||||
|
|
||||||
default_distro = 'intrepid'
|
default_distro = 'intrepid'
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print 'Usage: %s <package> [distro]' % sys.argv[0]
|
print 'Usage: %s <package> [distro]' % sys.argv[0]
|
||||||
|
|
||||||
if __name__=='__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
args = sys.argv[1:] or []
|
args = sys.argv[1:] or []
|
||||||
|
|
||||||
if args == [] or args[0] in ['-h', '--help']:
|
if args == [] or args[0] in ('-h', '--help'):
|
||||||
usage()
|
usage()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
@ -66,15 +72,16 @@ if __name__=='__main__':
|
|||||||
if len(args) == 2:
|
if len(args) == 2:
|
||||||
distro = args[1]
|
distro = args[1]
|
||||||
elif len(args) == 1:
|
elif len(args) == 1:
|
||||||
distro=os.getenv('DIST') or default_distro
|
distro = os.getenv('DIST') or default_distro
|
||||||
else: # incorrect args
|
else: # incorrect args
|
||||||
usage()
|
usage()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Correct-ish args, can proceed
|
# Correct-ish args, can proceed
|
||||||
try:
|
try:
|
||||||
print 'Attempting to get %s from distro %s' % (package, distro)
|
print 'Attempting to get %s from distro %s...' % \
|
||||||
|
(package, distro.capitalize())
|
||||||
BackportFromLP(package, distro)
|
BackportFromLP(package, distro)
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
print "Error when downloading package %s from distro %s: %s" % (package, distro, e)
|
print 'Error when downloading package %s from distro %s: %s' % \
|
||||||
|
(package, distro, e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user