[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

an apt wrapper for dependency resolving


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:

CMD=`basename $0`


case "$CMD" in
                exec $CMD \
                        -o Dir=$PWD/$APT_DIR \
                        -o Dir::State::status=$PWD/$APT_DIR/var/lib/dpkg/status \
                for dir in \
                        etc/apt var/lib/apt/lists/partial var/lib/dpkg \
                do mkdir -p $APT_DIR/$dir

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: