summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/Live.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-18 17:03:15 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-18 17:11:05 +0000
commit3f2b59604f7b6e6fcbec282b86f5fea618955b4b (patch)
tree83a2622ff553053cb620252d8c149ed50ba20a57 /lib/MGA/DrakISO/Live.pm
parent296dc5bb53c430c8842ab7327d8a76b5750c64b4 (diff)
downloaddrakiso-3f2b59604f7b6e6fcbec282b86f5fea618955b4b.tar
drakiso-3f2b59604f7b6e6fcbec282b86f5fea618955b4b.tar.gz
drakiso-3f2b59604f7b6e6fcbec282b86f5fea618955b4b.tar.bz2
drakiso-3f2b59604f7b6e6fcbec282b86f5fea618955b4b.tar.xz
drakiso-3f2b59604f7b6e6fcbec282b86f5fea618955b4b.zip
Split draklive2 into submodules.
Diffstat (limited to 'lib/MGA/DrakISO/Live.pm')
-rw-r--r--lib/MGA/DrakISO/Live.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/MGA/DrakISO/Live.pm b/lib/MGA/DrakISO/Live.pm
index e92fc2c..6fa32af 100644
--- a/lib/MGA/DrakISO/Live.pm
+++ b/lib/MGA/DrakISO/Live.pm
@@ -26,6 +26,14 @@ sub get_set_suffix {
$live->{settings}{set} ? "-$live->{settings}{set}" : "";
}
+sub get_langs {
+ my ($live) = @_;
+ uniq(
+ (ref $live->{regions} ? @{$live->{regions}{$live->{settings}{region}}} : ()),
+ @{$live->{system}{langs_always}}
+ );
+}
+
sub get_builddir {
my ($live) = @_;
$live->{settings}{builddir} . '/' . $live->get_name . $live->get_set_suffix;
@@ -67,4 +75,13 @@ sub get_lib_prefix {
$lib_prefix;
}
+sub get_absolute_path {
+ my ($live, $path) = @_;
+ if (defined $path && substr($path, 0, 1) ne '/') {
+ $live->{settings}{config_root} . '/' . $path;
+ } else {
+ $path;
+ }
+}
+
1;