in fakechroot mode, do not create symlinks to non-existing /proc
This commit is contained in:
parent
a5866a347c
commit
70c1468453
1 changed files with 12 additions and 0 deletions
12
mmdebstrap
12
mmdebstrap
|
@ -698,6 +698,10 @@ sub setup {
|
|||
} elsif ($type == 1) { # hardlink
|
||||
die "type 1 not implemented";
|
||||
} elsif ($type == 2) { # symlink
|
||||
if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) {
|
||||
# there is no /proc in fakechroot mode
|
||||
next;
|
||||
}
|
||||
symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname";
|
||||
next; # chmod cannot work on symlinks
|
||||
} elsif ($type == 3) { # character special
|
||||
|
@ -1110,6 +1114,10 @@ sub setup {
|
|||
die "type 1 not implemented";
|
||||
} elsif ($type == 2) { # symlink
|
||||
if (!$options->{havemknod}) {
|
||||
if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) {
|
||||
# there is no /proc in fakechroot mode
|
||||
next;
|
||||
}
|
||||
symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname";
|
||||
}
|
||||
} elsif ($type == 3 or $type == 4) { # character/block special
|
||||
|
@ -1179,6 +1187,10 @@ sub setup {
|
|||
die "type 1 not implemented";
|
||||
} elsif ($type == 2) { # symlink
|
||||
if (!$options->{havemknod}) {
|
||||
if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) {
|
||||
# there is no /proc in fakechroot mode
|
||||
next;
|
||||
}
|
||||
unlink "$options->{root}/$fname" or die "cannot unlink $fname: $!";
|
||||
}
|
||||
} elsif ($type == 3 or $type == 4) { # character/block special
|
||||
|
|
Loading…
Reference in a new issue