summaryrefslogtreecommitdiffstats
path: root/urpm/util.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2019-05-25 11:42:54 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2019-05-27 10:55:22 +0100
commit95b705797d4f5eb3c3102633baa87e72d3affd34 (patch)
tree035ed097ae6eea2c6e22f0d3b6dfdfc656c98db1 /urpm/util.pm
parent3dfb4c7f7cb5d33cbc15f12041dc5d3ef4153294 (diff)
downloadurpmi-95b705797d4f5eb3c3102633baa87e72d3affd34.tar
urpmi-95b705797d4f5eb3c3102633baa87e72d3affd34.tar.gz
urpmi-95b705797d4f5eb3c3102633baa87e72d3affd34.tar.bz2
urpmi-95b705797d4f5eb3c3102633baa87e72d3affd34.tar.xz
urpmi-95b705797d4f5eb3c3102633baa87e72d3affd34.zip
On systems with 32-bit EFI, enable the Core 32bit media by default.
Diffstat (limited to 'urpm/util.pm')
-rw-r--r--urpm/util.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/urpm/util.pm b/urpm/util.pm
index c786227b..4dbad1cc 100644
--- a/urpm/util.pm
+++ b/urpm/util.pm
@@ -30,6 +30,7 @@ our @EXPORT = qw(add2hash_
reduce_pathname
remove_internal_name
same_size_and_mtime
+ uefi_type
uniq
uniq_
unquotespace
@@ -215,6 +216,16 @@ sub append_to_file {
1;
}
+#- return the UEFI machine type short name
+sub uefi_type() {
+ if (-e '/sys/firmware/efi/fw_platform_size') {
+ # No support for ARM yet
+ cat_('/sys/firmware/efi/fw_platform_size') =~ /32/ ? 'ia32' : 'x64';
+ } else {
+ 'none';
+ }
+}
+
1;