mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
* pbuilder-dist:
- Fallback to calling lsb_release if /etc/lsb-release doesn't exist; this makes it possible to run pbuilder-dist on Debian.
This commit is contained in:
parent
4d314779fd
commit
ad0ee7b350
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,8 +1,10 @@
|
||||
ubuntu-dev-tools (0.73) UNRELEASED; urgency=low
|
||||
|
||||
*
|
||||
* pbuilder-dist:
|
||||
- Fallback to calling lsb_release if /etc/lsb-release doesn't
|
||||
exist; this makes it possible to run pbuilder-dist on Debian.
|
||||
|
||||
-- Scott Kitterman <scott@kitterman.com> Wed, 15 Apr 2009 23:06:54 -0400
|
||||
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Sat, 18 Apr 2009 23:37:55 +0200
|
||||
|
||||
ubuntu-dev-tools (0.72) jaunty; urgency=low
|
||||
|
||||
|
@ -101,15 +101,20 @@ class pbuilder_dist:
|
||||
if not self.system_architecture or 'not found' in self.system_architecture:
|
||||
print 'Error: Not running on a Debian based system; could not detect its architecture.'
|
||||
|
||||
if not os.path.isfile('/etc/lsb-release'):
|
||||
print 'Error: Not running on a Debian based system; could not find /etc/lsb-release.'
|
||||
exit(1)
|
||||
|
||||
for line in open('/etc/lsb-release'):
|
||||
line = line.strip()
|
||||
if line.startswith('DISTRIB_CODENAME'):
|
||||
self.system_distro = line[17:]
|
||||
break
|
||||
if os.path.isfile('/etc/lsb-release'):
|
||||
for line in open('/etc/lsb-release'):
|
||||
line = line.strip()
|
||||
if line.startswith('DISTRIB_CODENAME'):
|
||||
self.system_distro = line[17:]
|
||||
break
|
||||
else:
|
||||
import commands
|
||||
output = commands.getoutput('lsb_release -c').split()
|
||||
if len(output) == 2:
|
||||
self.system_distro = output[1]
|
||||
else:
|
||||
print 'Error: Not running on a Debian based system; could not find lsb_release.'
|
||||
exit(1)
|
||||
|
||||
if not self.system_distro:
|
||||
print 'Error: Could not determine what distribution you are running.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user