mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Wrap any extra (user) arguments appended to the pbuilder command with
quotation marks, when needed (LP: #398989).
This commit is contained in:
parent
4ca97770da
commit
8fda1ebdc1
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -16,6 +16,8 @@ ubuntu-dev-tools (0.103) UNRELEASED; urgency=low
|
||||
* pbuilder-dist:
|
||||
- Do not show a warning when "experimental" is used; there is no
|
||||
debootstrap file for it but it should just work anyway.
|
||||
- Wrap any extra (user) arguments appended to the pbuilder command with
|
||||
quotation marks, when needed (LP: #398989).
|
||||
* bash_completion/pbuilder-dist:
|
||||
- Enable auto-completion for "pbuilder-experimental".
|
||||
|
||||
|
@ -245,8 +245,22 @@ class pbuilder_dist:
|
||||
if remaining_arguments:
|
||||
arguments.extend(remaining_arguments)
|
||||
|
||||
def quote(argument):
|
||||
""" quote(argument) -> string
|
||||
|
||||
Try to guess any missing quotes around the arguments so that
|
||||
their meaning doesn't get lost (see LP: #398989).
|
||||
|
||||
"""
|
||||
|
||||
if argument.startswith('--'):
|
||||
if '=' in argument:
|
||||
return '%s="%s"' % tuple(argument.split('=', 1))
|
||||
return argument
|
||||
return '"%s"' % argument
|
||||
|
||||
return '%s /usr/sbin/%s %s' % (self.auth, self.builder,
|
||||
' '.join(arguments))
|
||||
' '.join(map(quote, arguments)))
|
||||
|
||||
def ask(question):
|
||||
""" ask(question) -> string
|
||||
|
Loading…
x
Reference in New Issue
Block a user