Bug 761 - apt-get remove request doesn\'t resolve in a removal of the specified package
Summary: apt-get remove request doesn\'t resolve in a removal of the specified package
Status: CLOSED WORKSFORME
Alias: None
Product: Sisyphus
Classification: Development
Component: apt (show other bugs)
Version: unstable
Hardware: all Linux
: P4 major
Assignee: placeholder@altlinux.org
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-29 20:13 MSK by imz
Modified: 2009-01-10 01:55 MSK (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description imz 2002-03-29 20:13:53 MSK
The following pkgs are installed: apt-0.3.19cnc55-alt3,
emacs-common-21.1-alt13
emacsen-startscripts-0.0.1-alt2
emacs-mode-auctex-11.11-alt1
emacs-nox-21.1-alt13
maxima-5.6-alt2
TeXmacs-1.0-alt1

maxima depends on emacs (virtual) and emacs-mode-auctex; emacs is provided by either emacs-nox or (not installed) emacs-X11. And they both depend on emacs-common.

When running `apt-get remove emacs-common\', I expect the whole group of emacs related packages to be removed; at least, I expect that the specified package \'emacs-common\' is actually removed. But here is how apt-get resolves this request:

$ apt-get -o Debug::pkgProblemResolver=yes remove emacs-common
Processing File Dependencies... Done
Reading Package Lists... Done
Building Dependency Tree... Done
Starting
Starting 2
Package emacs-nox has broken dep on emacs-common
  Considering emacs-common 10001 as a solution to emacs-nox 2
  Removing emacs-nox rather than change emacs-common
Package emacs-mode-auctex has broken dep on emacs
  Considering emacs-nox 2 as a solution to emacs-mode-auctex 7
  Considering emacs-X11 0 as a solution to emacs-mode-auctex 7
  Fixing emacs-mode-auctex via install of emacs-X11
Done
The following extra packages will be installed:
  emacs-X11
The following packages will be REMOVED:
  emacs-nox
The following NEW packages will be installed:
  emacs-X11
0 packages upgraded, 1 newly installed, 1 to remove(replace) and 23 not upgraded.
Need to get 0B/1489kB of archives. After unpacking 372kB will be used.
Do you want to continue? [Y/n]

So the requested removal is not performed.





---

---
Adding more arguments makes what I wanted:

$ apt-get -o Debug::pkgProblemResolver=yes remove emacs-common emacs-mode-auctex emacsen-startscripts
Processing File Dependencies... Done
Reading Package Lists... Done
Building Dependency Tree... Done
Starting
Starting 2
Package maxima has broken dep on emacs-mode-auctex
  Considering emacs-mode-auctex 10001 as a solution to maxima 5
  Removing maxima rather than change emacs-mode-auctex
Package emacs-nox has broken dep on emacs-common
  Considering emacs-common 10001 as a solution to emacs-nox 2
  Removing emacs-nox rather than change emacs-common
Package TeXmacs has broken dep on maxima
  Considering maxima 5 as a solution to TeXmacs 2
  Removing TeXmacs rather than change maxima
Done
The following packages will be REMOVED:
  TeXmacs emacs-common emacs-mode-auctex emacs-nox emacsen-startscripts maxima
0 packages upgraded, 0 newly installed, 6 to remove(replace) and 23 not upgraded.
Need to get 0B of archives. After unpacking 53,6MB will be freed.
Do you want to continue? [Y/n]

Comment 1 imz 2002-03-29 20:22:55 MSK
The case can be simplified.

Consider only three emacs-related pkgs installed: emacs-common, emacs-nox,  emacsen-startscripts.

`apt-get remove emacs-common\' doesn\'t remove it actually (the same behaviour as in the report).
`apt-get remove emacs-common emacsen-startscripts\' removes all the three pkgs as expected.
Comment 2 imz 2002-03-29 20:22:55 MSK
The case can be simplified.

Consider only three emacs-related pkgs installed: emacs-common, emacs-nox,  emacsen-startscripts.

`apt-get remove emacs-common\' doesn\'t remove it actually (the same behaviour as in the report).
`apt-get remove emacs-common emacsen-startscripts\' removes all the three pkgs as expected.
Comment 3 Vitaly Lipatov 2006-01-30 22:33:26 MSK
Не воспроизводится: 
# apt-get remove emacs-common 
Reading Package Lists... Done 
Building Dependency Tree... Done 
Selecting emacs21-common for 'emacs-common' 
The following packages will be REMOVED: 
  emacs-cedet emacs-cedet-speedbar emacs-mode-auctex emacs-preview-latex 
  emacs-preview-latex-el emacs21-X11 emacs21-common lincvs 
0 upgraded, 0 newly installed, 8 removed and 0 not upgraded. 
Need to get 0B of archives. 
After unpacking 39.5MB disk space will be freed. 
Do you want to continue? [Y/n] 
 
Надо либо обновить testcase, либо закрыть как решённое. 
Речь шла о том, что при удалении одной альтернативы APT подставляет другую, 
тогда как человек хочет просто удалить и всё? 
Comment 4 Mikhail Gusarov 2009-01-10 01:27:05 MSK
Баг всё ещё актуален, или можно закрывать как worksforme?
Comment 5 Dmitry V. Levin 2009-01-10 01:55:26 MSK
Видимо, за несколько лет исправилось...