Re: what files does dselect/dpkg use to discern choices?
Craig Sanders <cas@taz.net.au> writes:
> I need to do something similar. i asked Ian Jackson (dpkg's author) about
> it but he seems quite disinterested in the idea.
Mmm, no I think he's just got plenty of other things to worry about at the
moment. He seemed to give you the information you needed to try getting
this to work - but of course if you want any support for this in dpkg you'll
have to do it yourself. :-)
> 5. take a copy of the file /var/lib/dpkg/status.
>
> cp /var/lib/dpkg/status /tmp
>
> 6. now this is where it gets tricky.
> for every package listed in the status file, there will be a "Status:"
> line. You need to change every line which contains "Status: install
> ....." so that it reads "Status: install ok not-installed".
>
> the following sed script is a good starting point for doing this
> automatically.
>
> sed -e 's/^Status: install..*/Status: install ok not-installed/' </tmp/stats >/tmp/status.new
Mmm, why should they all be "not-installed"? Won't some of them be
installed by the base system on the new machine? I don't know what will
happen if you tell dpkg that something that's already installed now isn't -
e.g. what will happen with all its files, etc.? Shouldn't be too hard to
write a slightly more sophisticated script that just alters the relevant
desired state (first) fields of the new status file.
Anyway, if you give this a try, I'd be interested to know how it goes. I'd
be interested in giving it a try myself sometime, but time, time... :-)
Warwick
----------------------------------------------------------------------------
Warwick Harvey email: warwick@cs.mu.OZ.AU
Department of Computer Science phone: +61-3-9287-9171
University of Melbourne fax: +61-3-9348-1184
Parkville, Victoria, AUSTRALIA 3052 web: http://www.cs.mu.OZ.AU/~warwick
Reply to: