summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-09-15 13:29:50 +0000
committerOlivier Blin <oblin@mandriva.com>2009-09-15 13:29:50 +0000
commit47342b291c129fd6ef253dd4bb3dd6d2376b0405 (patch)
tree1c217b4daec5e59cbc42758fcc131a0f020e5a1a /lib/MDV/Draklive
parent37dbc1632ff00c0be201686adc4e0515d194f26c (diff)
downloaddraklive-47342b291c129fd6ef253dd4bb3dd6d2376b0405.tar
draklive-47342b291c129fd6ef253dd4bb3dd6d2376b0405.tar.gz
draklive-47342b291c129fd6ef253dd4bb3dd6d2376b0405.tar.bz2
draklive-47342b291c129fd6ef253dd4bb3dd6d2376b0405.tar.xz
draklive-47342b291c129fd6ef253dd4bb3dd6d2376b0405.zip
extract MDV::Draklive::Live::get_lib_prefix
Diffstat (limited to 'lib/MDV/Draklive')
-rw-r--r--lib/MDV/Draklive/Initrd.pm4
-rw-r--r--lib/MDV/Draklive/Live.pm7
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index 3bc4713..dcba8d2 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -76,9 +76,7 @@ sub create_media_specific_initrd {
require_list_modules_chroot($live);
- my $lib_prefix = find { glob($root . $_ . '/libc.so.*') } qw(/lib64 /lib);
- $lib_prefix or die 'unable to find system libraries in /lib or /lib64';
-
+ my $lib_prefix = $live->get_lib_prefix;
my $initrd_tree = $live->get_builddir . $live->{prefix}{build}{initrd} . '/' . $media->{storage};
rm_rf($initrd_tree) if -e $initrd_tree;
diff --git a/lib/MDV/Draklive/Live.pm b/lib/MDV/Draklive/Live.pm
index c8839c2..0242658 100644
--- a/lib/MDV/Draklive/Live.pm
+++ b/lib/MDV/Draklive/Live.pm
@@ -39,4 +39,11 @@ sub find_kernel {
$kernel;
}
+sub get_lib_prefix {
+ my ($live) = @_;
+ my $lib_prefix = find { glob($live->get_system_root . $_ . '/libc.so.*') } qw(/lib64 /lib);
+ $lib_prefix or die 'unable to find system libraries in /lib or /lib64';
+ $lib_prefix;
+}
+
1;