git: 9front

Download patch

ref: 1e1845c1b4b88a902adf98b39a97e590c357b1c3
parent: b4182d1ff828d9b1603406cfcd71f983d189f632
author: stanley lieber <stanley.lieber@gmail.com>
date: Tue Jan 3 15:14:27 EST 2012

pkg(1): put source files in /sys/src/pkg/

--- a/sys/man/1/pkg
+++ b/sys/man/1/pkg
@@ -43,7 +43,12 @@
 .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.
--- a/sys/src/cmd/pkg/create
+++ b/sys/src/cmd/pkg/create
@@ -5,14 +5,14 @@
 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
--- a/sys/src/cmd/pkg/remove
+++ b/sys/src/cmd/pkg/remove
@@ -14,5 +14,6 @@
 			echo M $fs($i) NOT DELETING
 		}
 	}
+	rm -rf /sys/src/pkg/$1
 	rm /sys/lib/pkg/$1
 }
--