mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Merge branch 'pbuilder-dist_more_archs' of git+ssh://git.launchpad.net/~misterc/ubuntu-dev-tools
MR: https://code.launchpad.net/~misterc/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/379692 Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
commit
9d7ce2745f
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -27,6 +27,13 @@ ubuntu-dev-tools (0.178) UNRELEASED; urgency=medium
|
|||||||
enabling pull-lp-debs to work with ports architectures, and inside
|
enabling pull-lp-debs to work with ports architectures, and inside
|
||||||
launchpad builds too.
|
launchpad builds too.
|
||||||
|
|
||||||
|
[ Michael R. Crusoe ]
|
||||||
|
* pbuilder-dist:
|
||||||
|
+ Use `arch-test` to determine whether the current system can run binaries
|
||||||
|
of the requested architecture, instead of hardcoding an ever-growing
|
||||||
|
list of whether something requires qemu or not. Add the "arch-test"
|
||||||
|
package to Recommends to that effect.
|
||||||
|
|
||||||
-- Mattia Rizzolo <mattia@debian.org> Tue, 22 Dec 2020 17:50:52 +0100
|
-- Mattia Rizzolo <mattia@debian.org> Tue, 22 Dec 2020 17:50:52 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.177) unstable; urgency=medium
|
ubuntu-dev-tools (0.177) unstable; urgency=medium
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -76,6 +76,7 @@ Recommends:
|
|||||||
quilt,
|
quilt,
|
||||||
reportbug (>= 3.39ubuntu1),
|
reportbug (>= 3.39ubuntu1),
|
||||||
ubuntu-keyring | ubuntu-archive-keyring,
|
ubuntu-keyring | ubuntu-archive-keyring,
|
||||||
|
arch-test
|
||||||
Suggests:
|
Suggests:
|
||||||
qemu-user-static,
|
qemu-user-static,
|
||||||
Description: useful tools for Ubuntu developers
|
Description: useful tools for Ubuntu developers
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
# configurations. For example, a symlink called pbuilder-hardy will assume
|
# configurations. For example, a symlink called pbuilder-hardy will assume
|
||||||
# that the target distribution is always meant to be Ubuntu Hardy.
|
# that the target distribution is always meant to be Ubuntu Hardy.
|
||||||
|
|
||||||
|
import distutils.spawn
|
||||||
import os
|
import os
|
||||||
|
import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -440,11 +442,26 @@ def main():
|
|||||||
|
|
||||||
if len(parts) > 2:
|
if len(parts) > 2:
|
||||||
requested_arch = parts[2]
|
requested_arch = parts[2]
|
||||||
elif len(args) > 0 and args[0] in (
|
elif len(args) > 0:
|
||||||
'alpha', 'amd64', 'arm', 'armeb', 'armel', 'armhf', 'arm64',
|
if distutils.spawn.find_executable('arch-test'):
|
||||||
'i386', 'lpia', 'm68k', 'mips', 'mipsel', 'powerpc', 'ppc64',
|
if subprocess.run(
|
||||||
'ppc64el', 'riscv64', 's390x', 'sh4', 'sh4eb', 'sparc', 'sparc64'):
|
['arch-test', args[0]],
|
||||||
requested_arch = args.pop(0)
|
stdout=subprocess.DEVNULL).returncode == 0:
|
||||||
|
requested_arch = args.pop(0)
|
||||||
|
elif (os.path.isdir('/usr/lib/arch-test')
|
||||||
|
and args[0] in os.listdir('/usr/lib/arch-test/')):
|
||||||
|
Logger.error('Architecture "%s" is not supported on your '
|
||||||
|
'currently running kernal. Consider installing '
|
||||||
|
'the qemu-user-static package to enable the use of '
|
||||||
|
'foreign architectures.', args[0])
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
requested_arch = None
|
||||||
|
else:
|
||||||
|
Logger.error('Cannot determine if "%s" is a valid architecture. '
|
||||||
|
'Please install the arch-test package and retry.',
|
||||||
|
args[0])
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
requested_arch = None
|
requested_arch = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user