Fix #90: noarch: create symlinks for all supported architectures

* The supported architectures are inside the config now
* Symlinks get created for that list of supported architectures now.
* During initialization, the architecture from the selected device
  gets checked against the list of supported architectures. When
  it is not included, a meaningful exception gets raised.
* the aportgen and (cross-compiler) build tests make use of the
  new variable now (they had armhf and aarch64 hardcoded previously).
This commit is contained in:
Oliver Smith 2017-06-15 02:26:32 +02:00
parent 9ab3270b2a
commit 1adeee70b6
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 31 additions and 14 deletions

View file

@ -194,8 +194,18 @@ def arguments():
# Add convinience shortcuts
setattr(args, "arch_native", pmb.parse.arch.alpine_native())
# Add the deviceinfo (only after initialization)
# Add and verify the deviceinfo (only after initialization)
if args.action != "init":
setattr(args, "deviceinfo", pmb.parse.deviceinfo(args))
arch = args.deviceinfo["arch"]
if (arch != args.arch_native and
arch not in pmb.config.build_device_architectures):
raise ValueError("Arch '" + arch + "' is not officially enabled"
" in postmarketOS yet. However, this should be straight"
" forward. Simply enable it in pmb/config/__init__.py"
" in build_device_architectures, zap your package cache"
" (otherwise you will have issues with noarch packages)"
" and try again. Some other things might break, but"
" they should be easy to fix them.")
return args