pbuilder-dist: check if package debootstrap is installed (LP: #334848)

This commit is contained in:
Siegfried-Angel Gevatter Pujals 2009-03-04 19:13:29 +01:00
parent 68e7eafe79
commit 0fecbc40ba

View File

@ -137,9 +137,14 @@ class pbuilder_dist:
sys.exit(1)
if not os.path.isfile(os.path.join('/usr/share/debootstrap/scripts/', distro)):
answer = ask('Warning: Unknown distribution «%s». Do you want to continue [y/N]? ' % distro)
if answer not in ('y', 'Y'):
sys.exit(0)
if os.path.isdir('/usr/share/debootstrap/scripts/'):
answer = ask('Warning: Unknown distribution «%s». Do you '\
'want to continue [y/N]? ' % distro)
if answer not in ('y', 'Y'):
sys.exit(0)
else:
print 'Please install package "debootstrap".'
sys.exit(1)
self.target_distro = distro