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

Re: holding packages (dpkg/apt split)



>>>>> "Colin" == Colin Watson <cjw44@flatline.org.uk> writes:

    Colin> Drew Parsons <dparsons@emerall.com> wrote:
    >> Yes!  Precisely!  The suggested method of piping hold into dpkg is quite
    >> ridiculous in my opinion, when it is dpkg's responsibility to perform the
    >> hold.

    Colin> But dpkg is doing the hold - what else would be doing so?

No, it if you run apt, it does the hold, before dpkg even sees the
package.

IMHO, I don't like the current split between dpkg and apt. Too many
tasks need to be done by both programs, even though they only need to
be done *once*. (eg dependency checking). This slows the process down,
because dpkg must do stuff that apt has already done. Similarly, it
means the user sees these horrible messages when apt-get passes
--force parameters to dpkg, because dpkg does checks that aren't
required.

How about having a low level package installation (eg. dpkg-lowlevel)
and removal program, that does nothing except low level operations
"preinst package x", "install package x", "postinst package x", "prerm
package x", "remove package x", "postrm package x", "purge package x"
(there might be some problems here, I haven't put a lot of thought
into the exact operations required).

Both apt and dpkg would do normal dependency checking, hold checking,
etc, but instead of apt-get using dpkg as the backend, both programs
would use dpkg-low as the backend, which has been optimised to do the
required task and nothing else.

Then having the hold database (not /var/lib/dpkg/status!) shared by
dpkg and apt would be better, as both programs would be at the same
level.



Then the next (long term) steps could be:

1. ensure that no programs access the package database
(/var/lib/dpkg/status and /var/lib/dpkg/info/*), but instead uses the
*fast* interface defined by dpkg-lowlevel.

2. Move above files away from /var/lib/dpkg, since they are no longer
"owned" by dpkg.

3. allow dpkg-lowlevel to use other back ends, eg database backend,
instead of text based back end. Should support both to keep everyone
happy.
-- 
Brian May <bam@debian.org>



Reply to: