summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-02 05:21:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-02 05:21:21 +0000
commit6e9c6ce48159d3df1cb69788bebc503ff8697e26 (patch)
tree0c369d4eb7ee55bbb6872cb446f0d3946c62e52b /perl-install/install_any.pm
parent8b52ae4b578e117a7135fe17f542af3714068851 (diff)
downloaddrakx-backup-do-not-use-6e9c6ce48159d3df1cb69788bebc503ff8697e26.tar
drakx-backup-do-not-use-6e9c6ce48159d3df1cb69788bebc503ff8697e26.tar.gz
drakx-backup-do-not-use-6e9c6ce48159d3df1cb69788bebc503ff8697e26.tar.bz2
drakx-backup-do-not-use-6e9c6ce48159d3df1cb69788bebc503ff8697e26.tar.xz
drakx-backup-do-not-use-6e9c6ce48159d3df1cb69788bebc503ff8697e26.zip
allow upgrading a chroot (using drakx-in-chroot)
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 70ab8285f..371de8790 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1429,11 +1429,18 @@ sub suggest_mount_points {
sub find_root_parts {
my ($fstab, $prefix) = @_;
+
+ if ($::local_install) {
+ my $f = common::release_file('/mnt') or return;
+ chomp(my $s = cat_("/mnt$f"));
+ $s =~ s/\s+for\s+\S+//;
+ return { release => $s, release_file => $f };
+ }
+
map {
my $handle = any::inspect($_, $prefix);
if (my $f = $handle && common::release_file($handle->{dir})) {
- my $s = cat_("$handle->{dir}$f");
- chomp($s);
+ chomp(my $s = cat_("$handle->{dir}$f"));
$s =~ s/\s+for\s+\S+//;
log::l("find_root_parts found $_->{device}: $s");
{ release => $s, part => $_, release_file => $f };
@@ -1530,7 +1537,7 @@ sub use_root_part {
my ($all_hds, $part, $o_in) = @_;
my $migrate_device_names;
{
- my $handle = any::inspect($part, $::prefix) or die;
+ my $handle = any::inspect($part, $::prefix) or internal_error();
my @from_fstab = fs::read_fstab($handle->{dir}, '/etc/fstab', 'keep_default');