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

Re: Bug#218861: apt: apt-get should warn about removing required packages



On Sun, Nov 02, 2003 at 08:34:13PM -0500, Andres Salomon wrote:

> dilinger@spiral:~$ apt-cache show procps | grep Priority
> Priority: required
> dilinger@spiral:~$ sudo apt-get remove procps
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following packages will be REMOVED:
>   keychain ppp pppconfig pppoe pppoeconf procps
> 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
> Need to get 0B of archives.
> After unpacking 1885kB disk space will be freed.
> Do you want to continue? [Y/n]
> 
> According to policy (section 2.5), required packages are:
>     Packages which are necessary for the proper functioning of the
>     system. You must not remove these packages or your system may become
>     totally broken and you may not even be able to use dpkg to put
>     things back. Systems with only the required packages are probably
>     unusable, but they do have enough functionality to allow the
>     sysadmin to boot and install more software.
>  
> Given the description, I'm of the opinion that apt should warn about
> removal of required packages.  This could be done similar to the way
> removal of essential packages are handled:

Given the description, perhaps, but in practice apt's behaviour is correct.
The only packages that apt is unusually cautious about are Essential
packages, because other packages will have undeclared dependencies on them.
If any package on your system has a dependency on a Priority: required
package, it must be declared, and so apt can handle things fine.

I don't know why the policy manual says that you may not be able to use
dpkg, because it certainly should be possible to use dpkg without any
non-essential packages.  That paragraph even goes on to say that there is
enough functionality to allow the sysadmin to boot and install more
software.

The complete list of packages with Priority: required which are not
Essential: yes (for woody) is:

dijkstra:[~/src/apt] apt-cache dumpavail | grep-dctrl -FPriority required | grep-dctrl -v -FEssential -nsPackage yes
libcap1
libdb2
libdb3
libncurses5
libpam-modules
libpam-runtime
libpam0g
libreadline4
libstdc++2.10-glibc2.2
makedev
mawk
mbr
modutils
passwd
procps
slang1
libc6
libperl5.6

I'm not sure why libc6 is not essential, but since it is depended upon by
essential packages, it is promoted to essential status anyway.  Nothing else
on that list would prevent things like dpkg from working.

I'm copying debian-policy to see if there is some rationale for that
definition that I am not aware of.

> dilinger@spiral:~$ sudo apt-get remove apt
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following packages will be REMOVED:
>   apt apt-utils base-config gnome gnome-apt
> WARNING: The following essential packages will be removed
> This should NOT be done unless you know exactly what you are doing!
>   apt
> 0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
> Need to get 0B of archives.
> After unpacking 4366kB disk space will be freed.
> You are about to do something potentially harmful
> To continue type in the phrase 'Yes, do as I say!'
> ?]

I believe apt internally promotes its own status, so that it isn't
inadvertently broken.

-- 
 - mdz



Reply to: