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

Re: New pre-depends: python pre-depends python-minimal



On Sat, Nov 22, 2014 at 05:06:25PM +0100, Jakub Wilk wrote:
> * Wouter Verhelst <wouter@debian.org>, 2014-11-22, 08:25:
> >>It appears that the appropriate resolution of  #769106 [1] is to add a
> >>new pre-depends on python-minimal in python.
> >>
> >>This issue at hand is that at the time python2.7-minimal is configured,
> >>python is unpacked, but python-minimal is not.  Since python-2.7-minimal
> >>doesn't have a direct depends on python-minimal, this is allowable
> >>(policy 7.2, Depends).
> >>
> >>In order for python2.7-minimal to configure, python-minimal needs to be
> >>at least unpacked to provide /usr/bin/pycompile.  The only way for
> >>python to ensure this is the case is to declare a pre-depends relation
> >>(also policy 7.2).
> >
> >This is inaccurate.
> 
> s/inaccurate/confusing as hell/ :-P

Right :-)

> >A python2.7-minimal pre-depends on python-minimal ensures that
> >python-minimal is unpackaged _and configured_ before python2.7-minimal is
> >unpacked.
> 
> There are three packages involved is this mess:
> 
> python2.7-minimal
> python-minimal
> python
> 
> python depends on python-minimal.
> python2.7-minimal does NOT depend on python or python-minimal (that'd be a
> dependency loop).
> python2.7-minimal tries to run a hook shipped by python, which might not
> work when python is not configured yet.
> 
> Hence the proposed Pre-Depends: python -> python-minimal.

As I understand the situation, that won't solve your problem.

If python pre-depends on python-minimal (and the rest of the dependencies stay
in place), then you have the following situation:

- python2.7-minimal and python-minimal are unpacked (in undefined order)
- python2.7-minimal is configured
- python-minimal is configured
- python can now be unpacked

As such, rather than fixing your problem, it would make matters worse;
today it sometimes fails, depending on the exact decisions that apt and
dpkg take when installing packages. With a pre-depends, it would
*always* fail on new installs, because python would then not be
*allowed* to be unpacked if python2.7-minimal isn't on the system, whose
postinst would fail, which would forbid the installation of python (the
step necessary to configure python2.7-minimal).

It looks to me like the only solution here is to split off whatever it
is that python2.7-minimal needs from the python package into a separate
package, and have python2.7-minimal depend on that separate package.
Call it "python-base" or "python-common" or something.

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26

Attachment: signature.asc
Description: Digital signature


Reply to: