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

Re: lots of dpkg ideas for discussion (was Re: GCC frepo (continue))



On Fri, 9 Aug 1996, Ian Jackson wrote:

> > if dpkg were to keep a list of all selected files and a list of
> > pathnames to available deb files, then it could simply iterate
> > through the list of selected packages.
>
> The information is already in dpkg's status areas.
>
> If you take the first word from each Status: line in
> /var/lib/dpkg/status and copy it to the corresponding place on another
> machine you'll have copied the selectedness or otherwise of all the
> packages.

Extracting the status line is easy.  finding where the files are located
isn't so easy.

maybe it's simpler to just leave the job of finding where the files are to
dselect...

it's still not clear what fields are actually needed by dpkg - if I do
something like: 

    grep -i "^$\|^Package:\|^Status:" /var/lib/dpkg/status | \
        sed -e 's/\(^Status:\)\([ 	]\)*\([^ ]*\)\(.*\)/\1 \3/'

or use an awk script like: 

    #! /usr/bin/awk -f

    /^Package:/ { print } 
    /^Status:/  { print $1 " " $2 } 
    /^$/    { print } 


both of which produce a list like:

        Package: vim
        Status: install

        Package: xterm-color
        Status: install

        Package: gnushogi
        Status: purge

        Package: xpaint
        Status: install


for obvious reasons, i'm a bit reluctant to experiment with the live
data in /var/lib/dpkg on my working system, so i have a few questions...

If i take this output and copy it to /var/lib/dpkg/status on a machine
which has just had base installed, then what will dselect do with it?
Will it get the remaining information (Version, Section etc) next time
[U]pdate is run?

How will dselect handle the fact that the "install" keyword is there
on the Status: line, but nothing else)? Is that acceptable/normal to
dselect?




As for the other ideas, it seems obvious that no one at all is even
vaguely interested in discussing ideas for improvements to or changes to
the way dpkg works.


> (Wild crossposting and CCs removed.)

(obnoxious comment left in)

Craig




Reply to: