summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-29 18:10:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-29 18:10:28 +0000
commitf9c4402e9defcc4209b7e371780da86127131d46 (patch)
treebed002a351d2694ca8b1d873e3f4da796acc518a /urpm
parent793ffb634a65a9f1ddd6037b4997637dc36d8562 (diff)
downloadurpmi-f9c4402e9defcc4209b7e371780da86127131d46.tar
urpmi-f9c4402e9defcc4209b7e371780da86127131d46.tar.gz
urpmi-f9c4402e9defcc4209b7e371780da86127131d46.tar.bz2
urpmi-f9c4402e9defcc4209b7e371780da86127131d46.tar.xz
urpmi-f9c4402e9defcc4209b7e371780da86127131d46.zip
create /dev/null in chroot
Diffstat (limited to 'urpm')
-rw-r--r--urpm/media.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index d2134128..cb4f1a9d 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -482,8 +482,10 @@ sub configure {
$urpm->{root} = $options{root} if $options{root};
}
- $urpm->{root} && ! -c "$urpm->{root}/dev/null"
- and $urpm->{error}(N("there doesn't seem to be devices in the chroot in \"%s\"", $urpm->{root}));
+ if ($urpm->{root} && ! -c "$urpm->{root}/dev/null") {
+ mkdir "$urpm->{root}/dev";
+ system("/bin/cp", "-a", '/dev/null', "$urpm->{root}/dev");
+ }
if ($options{synthesis}) {
if ($options{synthesis} ne 'none') {