From 930635e22d722a1ddaab20272cc485e5c47f27d9 Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Tue, 3 Jan 2012 20:14:27 -0600 Subject: [PATCH] pkg(1): put source files in /sys/src/pkg/ --- sys/man/1/pkg | 7 ++++++- sys/src/cmd/pkg/create | 16 ++++++++-------- sys/src/cmd/pkg/remove | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sys/man/1/pkg b/sys/man/1/pkg index 8ffed75f2..0becf667e 100644 --- a/sys/man/1/pkg +++ b/sys/man/1/pkg @@ -43,7 +43,12 @@ repository. The source directory should be provided as a full path. .I Pkg/install Install the package .I name -from the current repository. +from the current repository, unpacking the executables in +.B /$cputype/bin/ +or +.B /rc/bin/ +and the source in +.B /sys/src/pkg/. .TP .I Pkg/list List packages available from the current repository. diff --git a/sys/src/cmd/pkg/create b/sys/src/cmd/pkg/create index b251c1b21..525d3b7fe 100755 --- a/sys/src/cmd/pkg/create +++ b/sys/src/cmd/pkg/create @@ -5,14 +5,14 @@ d=$1 echo Creating $i C=`{pwd} @{ -rfork en -mkdir -p /tmp/$i/files/sys/src/cmd/$i -dircp $d /tmp/$i/files/sys/src/cmd/$i -cd $d -mk -divergefs -p /tmp/$i / -mk install clean -unmount / + rfork en + mkdir -p /tmp/$i/files/sys/src/pkg/$i + dircp $d /tmp/$i/files/sys/src/pkg/$i + cd $d + mk + divergefs -p /tmp/$i / + mk install clean + unmount / } cd /tmp/$i/files rm -r env diff --git a/sys/src/cmd/pkg/remove b/sys/src/cmd/pkg/remove index 349d18410..641d041aa 100755 --- a/sys/src/cmd/pkg/remove +++ b/sys/src/cmd/pkg/remove @@ -14,5 +14,6 @@ if(test -s /sys/lib/pkg/$1) { echo M $fs($i) NOT DELETING } } + rm -rf /sys/src/pkg/$1 rm /sys/lib/pkg/$1 }