an apt wrapper for dependency resolving
Hi
So far I've been unable to find a simple debian tool to get "a list of
packages and their dependencies". So here's a small wrapper around
apt-get/apt-cache/aptitude to use a separate tree. This lets me use
'apt-get -d' to get all the missing packages and add them as an extra
directory ( /pool/debian , a sibling of /pool/main) of my source.
Replicating debian-cd? true. Still seems simpler than figuring what
exactly I need to fix there. And it actually works (for me).
The script:
===============================================
#!/bin/sh
CMD=`basename $0`
APT_DIR=Aptdir
case "$CMD" in
apt-get|apt-cache|aptitude)
exec $CMD \
-o Dir=$PWD/$APT_DIR \
-o Dir::State::status=$PWD/$APT_DIR/var/lib/dpkg/status \
"$@"
;;
setup)
for dir in \
etc/apt var/lib/apt/lists/partial var/lib/dpkg \
var/cache/apt/archives/partial
do mkdir -p $APT_DIR/$dir
done
;;
esac
===============================================
Aptdir/etc/sources.list here has:
deb file:///path/to/local/source sarge main
deb http://mirror.hamakor.org.il/pub/mirrors/debian/ sarge main
It is important to use a preferences file to give files from your local
source a priority. My Aptdir/etc/apt/preferences is:
Package: *
Pin: release o=Xorcom
Pin-Priority: 600
--
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen@xorcom.com http://www.xorcom.com
Reply to: