SPT - Simple Ports Tracker ========================== Goal: build the simplest ports tracker which could possibly work Usage ----- 1. Tracking a port $ cd ~/crux/amd64/ports $ spt fetch /data/spt-repos/opt-x86/htop htop Three weeks later: $ cd ~/crux/amd64/ports/htop $ spt diff Files .spt-state-dir/port/Pkgfile and /usr/ports/opt/htop/Pkgfile differ Files .spt-state-dir/port/.md5sum and /usr/ports/opt/htop/.md5sum differ Only in /usr/ports/opt/htop: htop-1.1.patch $ spt diff Pkgfile [oh, new version] $ spt cat htop-1.1.patch [mmmh, Makefile patch] $ spt fetch-file htop-1.1.patch $ vi Pkgfile [update version] $ fakeroot pkgmk -d $ pkgmk -um $ fakeroot pkgmk [svn st; svn add htop-1.1.patch] $ svn ci -m "htop/amd64: merged with x86" $ spt merged $ spt diff [yay, no output] $ 2. checking what's going on $ cd ~/crux/amd64/ports $ spt check M htop D xbindkeys $ cd htop $ spt diff [email change of maintainer $ spt merged $ cd ../xbindkeys $ spt untrack Master tree management ---------------------- $ cat ~/.sptrc base_dir=/data/spt-repos repo core-x86 rsync crux.nu ports/crux-2.2/core/ repo opt-x86 rsync crux.nu ports/crux-2.2/opt/ repo jw httpup http://jw.tks6.net/files/crux/ports $ To sync, run $ spt sync-masters TODO ---- Currently, the spt data is scattered in base_dir and within the ports directories. It would be nicer to have one directory containing this info, like + - ports_amd64/ + - .spt-state/ + - core_gcc/ + - port/ + - parent + - core/ + gcc/ ... This would allow to backup one directory, i.e. when manipulating the ports tree. Code wise, this basically means four things: 1. add code to find the base state dir 2. add code to determine path to port relatively to base dir 3. transform path from #2: s|/|_|g = port state dir 4. user port state dir from #3 for parent and port state