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

Re: question about conflicts/dependencies



On 05/11/06 19:26:52, Kevin Coyner wrote:
On my sid box, I had apt-file v. 2.0.8 installed.  A new version
2.0.8.1 became available, but apt-get [dist-]upgrade did not install
it.

To resolve it not upgrading, I apt-get remove'd it.

Probably no need to remove it, just use install to update the existing installation. install always checks if a newer version exists and will install it if there is. The difference with upgrade is that upgrade will hold back packages that need user intervention (such as this situation with apt-file.)

It's very common in sid that apt-get upgrade has several packages held back. apt-get install tells you what needs to be done to complete the upgrade.

    kevin@scout:~/tmp$ sudo apt-get install apt-file
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
      libconfig-file-perl
    The following packages will be REMOVED:
      libconfigfile-perl
    The following NEW packages will be installed:
      apt-file libconfig-file-perl

That seems OK to me.

So now it seems the upgrade wouldn't occur because
libconfigfile-perl was installed on my sid box but needed to be
replaced by the newer libconfig-file-perl.

But that just means the user needs to be asked to check whether this is the right thing to do. The user may prefer to remove apt-file and not remove a different package that still depends on libconfigfile-perl, if any. (This can include local packages or packages from personal / unofficial repositories.)

It is *not* the right thing to do to simply force the removal of packages without user intervention.

The debian/control file in the apt-file package correctly calls for
libconfig-file-perl, which it Depends on.  But should there also be
a Conflicts: libconfigfile-perl in apt-file's control file to force
the removal of libconfigfile-perl on systems such as mine where it
already exists?

The conflict already exists in libconfig-file-perl:
+Conflicts: libconfigfile-perl

That's all that is needed. apt-file depends on libconfig-file-perl and therefore upgrade will hold back apt-file until libconfig-file-perl can be installed. The user needs to intervene to remove libconfigfile-perl, either manually or via apt-get install apt-file.

apt-file doesn't need a conflict because the conflict exists in a dependency of apt-file.

Consider a different perspective. Imagine one of the GUI libraries conflicts with a particular package. It is sufficient that the library conflicts with that package - there is no need for every single reverse dependency of the GUI library to also conflict. That could mean updating and uploading many dozens of packages in the case of something like libglib2.0 or kdelibs, just to add a Conflicts: line to each debian/control!

--

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpKHkCArhwXA.pgp
Description: PGP signature


Reply to: