Don't pass --logfile if logging in

pbuilder-dist: Don't pass --logfile if we are trying to log in to the
chrootthe logfile option swallows the prompt, and we probably don't
want to log if we are using login anyway.
This commit is contained in:
Iain Lane 2009-11-05 14:18:29 +00:00
parent 25ec8a9092
commit 2c4db266b4
2 changed files with 8 additions and 3 deletions

5
debian/changelog vendored
View File

@ -3,6 +3,9 @@ ubuntu-dev-tools (0.82) UNRELEASED; urgency=low
[ Iain Lane ] [ Iain Lane ]
* debian/control: Re-add XS-Python-Version - this is more standard * debian/control: Re-add XS-Python-Version - this is more standard
* debian/pyversions: Drop * debian/pyversions: Drop
* pbuilder-dist: Don't pass --logfile if we are trying to log in to the
chroot - the logfile option swallows the prompt, and we probably don't
want to log if we are using login anyway.
[ Nathan Handler ] [ Nathan Handler ]
* debian/control: Mention lp-project-upload in Description * debian/control: Mention lp-project-upload in Description
@ -31,7 +34,7 @@ ubuntu-dev-tools (0.82) UNRELEASED; urgency=low
back to 'unstable' for lucid+1) back to 'unstable' for lucid+1)
* pull-debian-source: change default release to pull from to 'testing' * pull-debian-source: change default release to pull from to 'testing'
-- Michael Bienia <geser@ubuntu.com> Mon, 02 Nov 2009 19:23:15 +0100 -- Iain Lane <laney@ubuntu.com> Thu, 05 Nov 2009 14:17:21 +0000
ubuntu-dev-tools (0.81) karmic; urgency=low ubuntu-dev-tools (0.81) karmic; urgency=low

View File

@ -178,7 +178,7 @@ class pbuilder_dist:
prefix = os.path.join(self.base, self.chroot_string) prefix = os.path.join(self.base, self.chroot_string)
result = '%s_result/' % prefix result = '%s_result/' % prefix
if not self.logfile: if not self.logfile and self.operation != 'login':
self.logfile = os.path.normpath('%s/last_operation.log' % result) self.logfile = os.path.normpath('%s/last_operation.log' % result)
if not os.path.isdir(result): if not os.path.isdir(result):
@ -198,11 +198,13 @@ class pbuilder_dist:
base, base,
'--distribution "%(target_distro)s"' % self, '--distribution "%(target_distro)s"' % self,
'--buildresult "%s"' % result, '--buildresult "%s"' % result,
'--logfile "%s"' % self.logfile,
'--aptcache "/var/cache/apt/archives/"', '--aptcache "/var/cache/apt/archives/"',
### --mirror "${ARCHIVE}" \ ### --mirror "${ARCHIVE}" \
'--override-config', '--override-config',
] ]
if self.logfile:
arguments.append('--logfile %s' % self.logfile)
if os.path.exists('/var/cache/archive/'): if os.path.exists('/var/cache/archive/'):
arguments.append('--bindmounts "/var/cache/archive/"') arguments.append('--bindmounts "/var/cache/archive/"')