mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
builder: normalize architectures
Normalize the target architecture, and also each architecture when
checking for a compatible image.
This sort of reverts the effects of
commit 8864c47b94, but at least it is
possible to build e.g. Debian-based amd64 images on any x86_64 system
without being considered as foreign architecture.
This commit is contained in:
@@ -238,7 +238,7 @@ let main () =
|
||||
let item =
|
||||
try List.find (
|
||||
fun (name, { Index.arch = a }) ->
|
||||
name = arg && arch = a
|
||||
name = arg && arch = normalize_arch a
|
||||
) index
|
||||
with Not_found ->
|
||||
error (f_"cannot find os-version '%s' with architecture '%s'.\nUse --list to list available guest types.")
|
||||
|
||||
@@ -295,6 +295,7 @@ read the man page virt-builder(1).
|
||||
match arch with
|
||||
| "" -> Config.host_cpu
|
||||
| arch -> arch in
|
||||
let arch = normalize_arch arch in
|
||||
|
||||
(* If user didn't elect any root password, that means we set a random
|
||||
* root password.
|
||||
|
||||
Reference in New Issue
Block a user