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

Re: lie to apt

On Wed, Feb 21, 2001 at 06:16:22PM -0500, xsdg wrote:
> On Wed, Feb 21, 2001 at 10:13:23AM +0000, Jacob Meuser wrote:
> > Is there a way to manually edit the database that says which packages
> > are installed?  I set up a small system, using potato, and am adding
> > several packages from source.  I added stuff like glib-1.2.8, tcl-8.32,
> > tk8.3.2, etc.  How can I tell apt that these packages are installed?
> > Or at least make it think the potato version is installed.
> You may want to take a close(r) look at apt-cache.  I have no idea if I'm correct, or if so, how to use it in this method, but it seems like the right tool for the job...
Well, that lead me to the files I was looking for: /var/lib/dpkg/*
I guess this would be better asked on the devel list *1, but does anyone have
experience hacking /var/lib/dpkg/status ?  I was wondering about the
differences in "Replaces:", "Provides:", and "Conflicts:".  For example, 
I installed glib-1.2.8 from source. I added an entry to the status file:

Package: libglig1.2-all
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 99
Maintainer: <jakemsr@localhost>
Version: 1.2.8-99
Replaces: libglib1.2 (<= 1.2.8-99), libglib1.2-dev (<= 1.2.8-99), libglib1.2-dbg (<= 1.2.8-99)
Conflicts: libglib1.2 (<= 1.2.8-99), libglib1.2-dev (<= 1.2.8-99), libglib1.2-dbg (<= 1.2.8-99)

Do I need to add a "Provides:" line also?  Or is the "Replaces:" line enough by itself?

I used stow to organize /usr/local, which made the file list easy to get:
# find /usr/local/stow/glib -name \* -print > /var/lib/dpkg/info/libglib1.2-all.list


*1 I looked on the mailing list page and found debian-dpkg.  For
those reading this from debian-dpkg, please email me direct, or
to debian-laptop.  I would also like to know if there is a more 
elegant way of doing this.  I saw a few packages for making .debs, 
are there any that work well for converting a stow heierarchy into

Reply to: