From f9c4402e9defcc4209b7e371780da86127131d46 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 29 Nov 2006 18:10:28 +0000 Subject: create /dev/null in chroot --- urpm/media.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm') 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') { -- cgit v1.2.1