Skip to content

Commit 3952f87

Browse files
runInLinuxVM: clean up
Those were left-over after 97ed6b4. This also cleans up some confusion around TMPDIR. We had the following lines: mkdir xchg ... cd $TMPDIR ... path=$TMPDIR/xchg Those only worked because the **current directory** is the same as $TMPDIR. Both are /build by default. To refer to the same directory in two different ways is very confusing at best.
1 parent de7867c commit 3952f87

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pkgs/build-support/vm/default.nix

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ rec {
8888
set -- $(IFS==; echo $o)
8989
command=$2
9090
;;
91-
out=*)
92-
set -- $(IFS==; echo $o)
93-
export out=$2
94-
;;
9591
esac
9692
done
9793
@@ -153,7 +149,7 @@ rec {
153149
fi
154150
155151
echo "starting stage 2 ($command)"
156-
exec switch_root /fs $command $out
152+
exec switch_root /fs $command
157153
'';
158154

159155

@@ -225,7 +221,6 @@ rec {
225221
-device virtio-rng-pci \
226222
-virtfs local,path=${storeDir},security_model=none,mount_tag=store \
227223
-virtfs local,path=/build,security_model=none,mount_tag=sa \
228-
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
229224
''${diskImage:+-drive file=$diskImage,if=virtio,cache=unsafe,werror=report} \
230225
-kernel ${kernel}/${img} \
231226
-initrd ${initrd}/initrd \
@@ -261,8 +256,6 @@ rec {
261256
cat > ./run-vm <<EOF
262257
#! ${bash}/bin/sh
263258
''${diskImage:+diskImage=$diskImage}
264-
TMPDIR=$TMPDIR
265-
cd $TMPDIR
266259
${qemuCommand}
267260
EOF
268261

0 commit comments

Comments
 (0)