* bash-completion/pbuilder-dist: recognize cowbuilder- and -jaunty.

* pbuilder-dist:
   - Fixed a bug which broke pbuilder-dist when "build" was omited; just
     giving a .dsc works now.
   - {p,cow}builder-dist will now complain if you try to build a .changes
     file (or anything else that isn't a .dsc).
This commit is contained in:
Siegfried-Angel Gevatter Pujals 2009-02-05 16:50:19 +01:00
parent aed22db4c0
commit 18f87873a4
3 changed files with 14 additions and 2 deletions

View File

@ -31,5 +31,5 @@ _pbuilder-dist()
return 0
}
[ "$have" ] && complete -F _pbuilder-dist -o filenames \
pbuilder-{dist,dapper,edgy,feisty,gutsy,hardy,intrepid,sarge,etch,lenny,sid}
{pbuilder,cowbuilder}-{dist,dapper,edgy,feisty,gutsy,hardy,intrepid,jaunty,sarge,etch,lenny,sid}
# Make it pbuilder-* if you know how to do it

6
debian/changelog vendored
View File

@ -1,6 +1,12 @@
ubuntu-dev-tools (0.63) UNRELEASED; urgency=low
* debian/links: add it (forgot to do so before).
* bash-completion/pbuilder-dist: recognize cowbuilder- and -jaunty.
* pbuilder-dist:
- Fixed a bug which broke pbuilder-dist when "build" was omited; just
giving a .dsc works now.
- {p,cow}builder-dist will now complain if you try to build a .changes
file (or anything else that isn't a .dsc).
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Thu, 05 Feb 2009 16:19:03 +0100

View File

@ -149,6 +149,7 @@ class pbuilder_dist:
if operation.endswith('.dsc'):
if os.path.isfile(operation):
self.operation = 'build'
return operation
else:
print 'Error: Could not find file «%s».' % operation
sys.exit(1)
@ -158,6 +159,7 @@ class pbuilder_dist:
sys.exit(1)
else:
self.operation = operation
return ''
def get_command(self, remaining_arguments = None):
""" pbuilder_dist.get_command -> string
@ -327,7 +329,11 @@ def main():
help(1)
# Parse the operation
app.set_operation(args.pop(0))
args = [app.set_operation(args.pop(0))] + args
if app.operation == 'build' and not '.dsc' in ' '.join(args):
print 'Error: You have to specify a .dsc file if you want to build.'
sys.exit(1)
# Execute the pbuilder command
sys.exit(os.system(app.get_command(args)))