Debian bug report logs - #581
Replacement & conflicting packages

Package: dpkg; Reported by: iwj10@cus.cam.ac.uk (Ian Jackson); 105 days old.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Wed Mar  8 07:40:16 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rmNqR-0005oFC; Wed, 8 Mar 95 07:40 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA27729
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Wed, 8 Mar 1995 07:39:29 -0800
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #30) id m0rmNoQ-000C0BC; Wed, 8 Mar 95 15:38 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rmLXH-0002gOZ; Wed, 8 Mar 95 13:12 GMT
Message-Id: <m0rmLXH-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Wed, 8 Mar 95 13:12 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@Pixar.com
Subject: Re: Bug#581: Replacement & conflicting packages
In-Reply-To: <199503072218.QAA10008@hp-90.cae.wisc.edu>
References: <199503072218.QAA10008@hp-90.cae.wisc.edu>
	<m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>

Carl V Streeter writes ("Re: Bug#581: Replacement & conflicting packages"):
> I'm thinking something along these lines:
> emacs depends on 'emacs-x | emacs-nox'
> emacs-x conflicts with emacs-nox (and vice versa)
> dpkg -r emacs-nox puts emacs-nox on hold: target deinstall
> dpkg -i emacs-x sees that it conflicts with emacs-nox which is installed,
> but we're trying to remove it.  What's stopping it?  The fact that emacs 
> depends on emacs depends on emacs-nox.  BUT, emacs-x also fulfills that 
> dependency.  At this point, you should be able to get rid of the old one, 
> and put in the new one.  

Yes, that's almost exactly what I was proposing.

Ian.

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#581: Info received (was Bug#581: Replacement & conflicting packages)
In-Reply-To: <m0rmLXH-0002gOZ.ijackson@nyx.cs.du.edu>
References: <m0rmLXH-0002gOZ.ijackson@nyx.cs.du.edu>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#581" or "Re: Bug#581" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#581: Replacement & conflicting packages
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Wed, 08 Mar 1995 16:03:04 GMT
Resent-Message-ID: <debian-bugs-handler.581.03081550082176@pixar.com>
X-Debian-PR-Package: dpkg
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Wed, 08 Mar 1995 16:03:04 GMT
Received: with rfc822 via encapsulated-mail id 03081550082176;
          Wed, 08 Mar 1995 15:50:09 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rmNqR-0005oFC; Wed, 8 Mar 95 07:40 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA27729
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Wed, 8 Mar 1995 07:39:29 -0800
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #30) id m0rmNoQ-000C0BC; Wed, 8 Mar 95 15:38 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rmLXH-0002gOZ; Wed, 8 Mar 95 13:12 GMT
Message-Id: <m0rmLXH-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Wed, 8 Mar 95 13:12 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@Pixar.com
In-Reply-To: <199503072218.QAA10008@hp-90.cae.wisc.edu>
References: <199503072218.QAA10008@hp-90.cae.wisc.edu>
	<m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>

Carl V Streeter writes ("Re: Bug#581: Replacement & conflicting packages"):
> I'm thinking something along these lines:
> emacs depends on 'emacs-x | emacs-nox'
> emacs-x conflicts with emacs-nox (and vice versa)
> dpkg -r emacs-nox puts emacs-nox on hold: target deinstall
> dpkg -i emacs-x sees that it conflicts with emacs-nox which is installed,
> but we're trying to remove it.  What's stopping it?  The fact that emacs
> depends on emacs depends on emacs-nox.  BUT, emacs-x also fulfills that
> dependency.  At this point, you should be able to get rid of the old one,
> and put in the new one.

Yes, that's almost exactly what I was proposing.

Ian.


Message received at debian-bugs:


From cae.wisc.edu!streeter Tue Mar  7 14:17:51 1995
Return-Path: <streeter@cae.wisc.edu>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm7Ze-0006MeC; Tue, 7 Mar 95 14:17 PST
Received: from serv0.cae.wisc.edu by pixar.com with SMTP id AA08182
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Tue, 7 Mar 1995 14:17:47 -0800
Received: from hp-90.cae.wisc.edu (streeter@hp-90.cae.wisc.edu [144.92.93.33]) by serv0.cae.wisc.edu (8.6.10 CAE/8.6.10) with ESMTP id QAA19396; Tue, 7 Mar 1995 16:17:45 -0600
From: Carl V Streeter <streeter@cae.wisc.edu>
Received: (streeter@localhost) by hp-90.cae.wisc.edu (8.6.10 CAE/8.6.9) id QAA10008; Tue, 7 Mar 1995 16:18:16 -0600
Message-Id: <199503072218.QAA10008@hp-90.cae.wisc.edu>
Subject: Re: Bug#581: Replacement & conflicting packages
To: iwj10@cus.cam.ac.uk, debian-bugs@Pixar.com
Date: Tue, 07 Mar 1995 16:18:16 CST
In-Reply-To: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>; from "Ian Jackson" at Mar 7, 95 12:14 (noon)
Reply-To: streeter@cae.wisc.edu
X-Wisdom: Beer and pizza *do* contain all 4 food groups.
X-Thought: Better dead than mellow
X-Mailer: Elm [revision: 109.14]

> 
> At the moment, if say dpkg --remove and dpkg refuses because of
> dependencency problems it puts the package in `hold', so that the
> removal won't be reattempted until something has reset the flag, but
> it does change its desired state from `install' to `deinstall' just as
> dselect would have done if you'd used it to deselect the package.

I'm thinking something along these lines:
emacs depends on 'emacs-x | emacs-nox'
emacs-x conflicts with emacs-nox (and vice versa)
dpkg -r emacs-nox puts emacs-nox on hold: target deinstall
dpkg -i emacs-x sees that it conflicts with emacs-nox which is installed,
but we're trying to remove it.  What's stopping it?  The fact that emacs 
depends on emacs depends on emacs-nox.  BUT, emacs-x also fulfills that 
dependency.  At this point, you should be able to get rid of the old one, 
and put in the new one.  

--
Carl Streeter             |  "Nothing is more frightening than 
streeter@cae.wisc.edu     |    ignorance in action"   --Goethe 
Just another Perl hacker  |  ...Have you seen my saltshaker?
CAE Consultant            |  http://www.engr.wisc.edu/~streeter/

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: streeter@cae.wisc.edu
Subject: Bug#581: Info received (was Bug#581: Replacement & conflicting packages)
In-Reply-To: <199503072218.QAA10008@hp-90.cae.wisc.edu>
References: <199503072218.QAA10008@hp-90.cae.wisc.edu>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#581" or "Re: Bug#581" so that
we can identify it as relating to the same problem.

Please do not to reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#581: Replacement & conflicting packages
Reply-To: streeter@cae.wisc.edu, debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: Carl V Streeter <streeter@cae.wisc.edu>
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Tue, 07 Mar 1995 22:33:02 GMT
Resent-Message-ID: <debian-bugs-handler.581.030722221023779@pixar.com>
X-Debian-PR-Package: dpkg
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 07 Mar 1995 22:33:02 GMT
Received: with rfc822 via encapsulated-mail id 030722221023779;
          Tue, 07 Mar 1995 22:22:10 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm7Ze-0006MeC; Tue, 7 Mar 95 14:17 PST
Received: from serv0.cae.wisc.edu by pixar.com with SMTP id AA08182
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Tue, 7 Mar 1995 14:17:47 -0800
Received: from hp-90.cae.wisc.edu (streeter@hp-90.cae.wisc.edu [144.92.93.33]) by serv0.cae.wisc.edu (8.6.10 CAE/8.6.10) with ESMTP id QAA19396; Tue, 7 Mar 1995 16:17:45 -0600
From: Carl V Streeter <streeter@cae.wisc.edu>
Received: (streeter@localhost) by hp-90.cae.wisc.edu (8.6.10 CAE/8.6.9) id QAA10008; Tue, 7 Mar 1995 16:18:16 -0600
Message-Id: <199503072218.QAA10008@hp-90.cae.wisc.edu>
To: iwj10@cus.cam.ac.uk, debian-bugs@Pixar.com
Date: Tue, 07 Mar 1995 16:18:16 CST
In-Reply-To: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>; from "Ian Jackson" at Mar 7, 95 12:14 (noon)
X-Wisdom: Beer and pizza *do* contain all 4 food groups.
X-Thought: Better dead than mellow
X-Mailer: Elm [revision: 109.14]

>
> At the moment, if say dpkg --remove and dpkg refuses because of
> dependencency problems it puts the package in `hold', so that the
> removal won't be reattempted until something has reset the flag, but
> it does change its desired state from `install' to `deinstall' just as
> dselect would have done if you'd used it to deselect the package.

I'm thinking something along these lines:
emacs depends on 'emacs-x | emacs-nox'
emacs-x conflicts with emacs-nox (and vice versa)
dpkg -r emacs-nox puts emacs-nox on hold: target deinstall
dpkg -i emacs-x sees that it conflicts with emacs-nox which is installed,
but we're trying to remove it.  What's stopping it?  The fact that emacs
depends on emacs depends on emacs-nox.  BUT, emacs-x also fulfills that
dependency.  At this point, you should be able to get rid of the old one,
and put in the new one.

--
Carl Streeter             |  "Nothing is more frightening than
streeter@cae.wisc.edu     |    ignorance in action"   --Goethe
Just another Perl hacker  |  ...Have you seen my saltshaker?
CAE Consultant            |  http://www.engr.wisc.edu/~streeter/


Message received at debian-bugs:


From legislate.com!rdr Tue Mar  7 11:03:52 1995
Return-Path: <rdr@legislate.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm4Xv-0005kbC; Tue, 7 Mar 95 11:03 PST
Received: from [192.77.155.4] by pixar.com with SMTP id AA03224
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Tue, 7 Mar 1995 11:03:46 -0800
Received: by [192.77.155.4]
	id m0rm4Q9-0004i6C
	(Debian /\oo/\ Smail3.1.29.1 #29.26); Tue, 7 Mar 95 13:55 EST
Message-Id: <m0rm4Q9-0004i6C@[192.77.155.4]>
Date: Tue, 7 Mar 95 13:55 EST
From: rdr@legislate.com (Raul Miller)
To: iwj10@cus.cam.ac.uk, debian-bugs@Pixar.com
In-Reply-To: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu> (iwj10@cus.cam.ac.uk)
Subject: Re: Bug#581: Replacement & conflicting packages

Ian Jackson:
...
   At the moment, if say dpkg --remove and dpkg refuses because of
   dependencency problems it puts the package in `hold', so that the
   removal won't be reattempted until something has reset the flag,
   but it does change its desired state from `install' to `deinstall'
   just as dselect would have done if you'd used it to deselect the
   package.

   I don't want to have dpkg not put a package on hold when the removal
   fails for this reason, but I could have it ignore the hold flag when
   it considers whether to do an automatic deinstall during a replacement
   operation.  If the removal part of the replacement fails the hold flag
   would be set on the package being installed.

   What do people think of the scheme described above ?

I think that there should be a warning after dpkg -r that the package
is on hold.  More generally, I think there should be a warning any
time a package is moved to a final state other than fully installed or
fully removed.

Also, I think I'd want an option on dpkg which goes through all the
motions except installation/removal, so I can get a better feel for
what's going to be happening when I use dpkg.  Basically, it should
list the changes that would be introduced in package status as a
result of my other command line.  Ideally, it might also include the
reasons for making these decisions.

This sort of option would be somewhat different in scope from -D -- it
is intended for use by potential system administrators in
understanding the essential nature of the package system.  Presumably,
no locking should be used for this option (so you needn't be root to
use it) though it should warn if a dpkg update of the system is in
progress when it makes its analysis.

Invisible state is hard to manage.  Rarely used software is hard to
manage.  The combination is even worse.

Raul

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: rdr@legislate.com (Raul Miller)
Subject: Bug#581: Info received (was Bug#581: Replacement & conflicting packages)
In-Reply-To: <m0rm4Q9-0004i6C@[192.77.155.4]>
References: <m0rm4Q9-0004i6C@[192.77.155.4]>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#581" or "Re: Bug#581" so that
we can identify it as relating to the same problem.

Please do not to reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#581: Replacement & conflicting packages
Reply-To: rdr@legislate.com (Raul Miller), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: rdr@legislate.com (Raul Miller)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Tue, 07 Mar 1995 19:18:02 GMT
Resent-Message-ID: <debian-bugs-handler.581.030719065712465@pixar.com>
X-Debian-PR-Package: dpkg
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 07 Mar 1995 19:18:02 GMT
Received: with rfc822 via encapsulated-mail id 030719065712465;
          Tue, 07 Mar 1995 19:06:57 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm4Xv-0005kbC; Tue, 7 Mar 95 11:03 PST
Received: from [192.77.155.4] by pixar.com with SMTP id AA03224
  (5.65c/IDA-1.4.4 for <debian-bugs@Pixar.com>); Tue, 7 Mar 1995 11:03:46 -0800
Received: by [192.77.155.4]
	id m0rm4Q9-0004i6C
	(Debian /\oo/\ Smail3.1.29.1 #29.26); Tue, 7 Mar 95 13:55 EST
Message-Id: <m0rm4Q9-0004i6C@[192.77.155.4]>
Date: Tue, 7 Mar 95 13:55 EST
From: rdr@legislate.com (Raul Miller)
To: iwj10@cus.cam.ac.uk, debian-bugs@Pixar.com
In-Reply-To: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu> (iwj10@cus.cam.ac.uk)

Ian Jackson:
...
   At the moment, if say dpkg --remove and dpkg refuses because of
   dependencency problems it puts the package in `hold', so that the
   removal won't be reattempted until something has reset the flag,
   but it does change its desired state from `install' to `deinstall'
   just as dselect would have done if you'd used it to deselect the
   package.

   I don't want to have dpkg not put a package on hold when the removal
   fails for this reason, but I could have it ignore the hold flag when
   it considers whether to do an automatic deinstall during a replacement
   operation.  If the removal part of the replacement fails the hold flag
   would be set on the package being installed.

   What do people think of the scheme described above ?

I think that there should be a warning after dpkg -r that the package
is on hold.  More generally, I think there should be a warning any
time a package is moved to a final state other than fully installed or
fully removed.

Also, I think I'd want an option on dpkg which goes through all the
motions except installation/removal, so I can get a better feel for
what's going to be happening when I use dpkg.  Basically, it should
list the changes that would be introduced in package status as a
result of my other command line.  Ideally, it might also include the
reasons for making these decisions.

This sort of option would be somewhat different in scope from -D -- it
is intended for use by potential system administrators in
understanding the essential nature of the package system.  Presumably,
no locking should be used for this option (so you needn't be root to
use it) though it should warn if a dpkg update of the system is in
progress when it makes its analysis.

Invisible state is hard to manage.  Rarely used software is hard to
manage.  The combination is even worse.

Raul


Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Tue Mar  7 06:37:57 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm0Oa-0006MVC; Tue, 7 Mar 95 06:37 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA27411
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Tue, 7 Mar 1995 06:37:39 -0800
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #30) id m0rm0OH-000C02C; Tue, 7 Mar 95 14:37 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rlyA4-0002gOZ; Tue, 7 Mar 95 12:14 GMT
Message-Id: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Tue, 7 Mar 95 12:14 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: Replacement & conflicting packages

Package: dpkg
Version: 0.93.31

Raul Miller writes ("the state of things"):
> [...]
> editors/emacs-x-19.28-2.deb
> 
> This was annoying.  I'd already installed <emacs-nox>, and <emacs-x>
> conflicts with <emacs-nox>.  But I couldn't remove <emacs-x> because
> <emacs> requires either <emacs-x> or <emacs-nox>.  And I couldn't
> remove <emacs> because <emacs-el> requires <emacs>.  So, I had to
> remove all traces of emacs from the system to re-install.   There
> ought to be a better way (but I'll wait till I see dselect before I
> think about reporting this as a bug).

dselect can't do anything to packages that dpkg can't - it will use
dpkg to do the actual work of installing and removing packages.  This
is therefore a bug.

I propose the following solution:

Under some circumstances (see below) when you try to install a package
that conflicts with one that's already installed dpkg could try
treating it something like an upgrade.  Ie, automatically remove the
old conflicting package, but keep its files around until the new
package is successfully unpacked in case the new installation fails.

Now, when should dpkg do this ?  How about if it did it automatically
if the package(s) it might want to remove are already deselected ?

At the moment, if say dpkg --remove and dpkg refuses because of
dependencency problems it puts the package in `hold', so that the
removal won't be reattempted until something has reset the flag, but
it does change its desired state from `install' to `deinstall' just as
dselect would have done if you'd used it to deselect the package.

I don't want to have dpkg not put a package on hold when the removal
fails for this reason, but I could have it ignore the hold flag when
it considers whether to do an automatic deinstall during a replacement
operation.  If the removal part of the replacement fails the hold flag
would be set on the package being installed.

What do people think of the scheme described above ?


BTW, you could have worked around the problem using --force-depends,
ie dpkg -r --force-depends emacs-nox followed by dpkg -i emacs-x.deb.

Ian.

Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#581: Acknowledgement (was: Replacement & conflicting packages)
In-Reply-To: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>
References: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#581" or "Re: Bug#581" so that
we can identify it as relating to the same problem.

Please do not to reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#581: Replacement & conflicting packages
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Tue, 07 Mar 1995 14:48:10 GMT
Resent-Message-ID: <debian-bugs-handler.581.030714414215514@pixar.com>
X-Debian-PR-Package: dpkg
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 07 Mar 1995 14:48:10 GMT
Received: with rfc822 via encapsulated-mail id 030714414215514;
          Tue, 07 Mar 1995 14:41:42 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rm0Oa-0006MVC; Tue, 7 Mar 95 06:37 PST
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA27411
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Tue, 7 Mar 1995 06:37:39 -0800
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #30) id m0rm0OH-000C02C; Tue, 7 Mar 95 14:37 GMT
Received: by chiark (Smail3.1.28.1 #3)
	id m0rlyA4-0002gOZ; Tue, 7 Mar 95 12:14 GMT
Message-Id: <m0rlyA4-0002gOZ.ijackson@nyx.cs.du.edu>
Date: Tue, 7 Mar 95 12:14 GMT
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar.com>

Package: dpkg
Version: 0.93.31

Raul Miller writes ("the state of things"):
> [...]
> editors/emacs-x-19.28-2.deb
>
> This was annoying.  I'd already installed <emacs-nox>, and <emacs-x>
> conflicts with <emacs-nox>.  But I couldn't remove <emacs-x> because
> <emacs> requires either <emacs-x> or <emacs-nox>.  And I couldn't
> remove <emacs> because <emacs-el> requires <emacs>.  So, I had to
> remove all traces of emacs from the system to re-install.   There
> ought to be a better way (but I'll wait till I see dselect before I
> think about reporting this as a bug).

dselect can't do anything to packages that dpkg can't - it will use
dpkg to do the actual work of installing and removing packages.  This
is therefore a bug.

I propose the following solution:

Under some circumstances (see below) when you try to install a package
that conflicts with one that's already installed dpkg could try
treating it something like an upgrade.  Ie, automatically remove the
old conflicting package, but keep its files around until the new
package is successfully unpacked in case the new installation fails.

Now, when should dpkg do this ?  How about if it did it automatically
if the package(s) it might want to remove are already deselected ?

At the moment, if say dpkg --remove and dpkg refuses because of
dependencency problems it puts the package in `hold', so that the
removal won't be reattempted until something has reset the flag, but
it does change its desired state from `install' to `deinstall' just as
dselect would have done if you'd used it to deselect the package.

I don't want to have dpkg not put a package on hold when the removal
fails for this reason, but I could have it ignore the hold flag when
it considers whether to do an automatic deinstall during a replacement
operation.  If the removal part of the replacement fails the hold flag
would be set on the package being installed.

What do people think of the scheme described above ?


BTW, you could have worked around the problem using --force-depends,
ie dpkg -r --force-depends emacs-nox followed by dpkg -i emacs-x.deb.

Ian.


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 06:43:02 GMT Wed 21 Jun