Your message dated Wed, 7 Aug 2024 10:51:34 +0200
with message-id <[email protected]>
and subject line Re: Bug#1076511: dpkg: should --force-remove-essential imply 
--force-remove-protected?
has caused the Debian Bug report #1076511,
regarding dpkg: should --force-remove-essential imply --force-remove-protected?
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1076511: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076511
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.21.22
Severity: wishlist

Before Debian trixie, login was Essential; now it's merely Protected
(included in normal installations, but removable).

In minimal container environments where logins and package management
are not required functionality, it can be useful to remove Essential and
Protected packages. For example, https://salsa.debian.org/smcv/flatdeb
(used in Valve's Steam Runtime) is intended for single-user, Flatpak-like
app containers with an immutable /usr, so it removes login, passwd
and eventually dpkg to save some space in the container, using dpkg
--force-remove-essential to make that happen. (Obviously this breaks some
normal things in that container, but that's OK for my particular use-case.)

When login became non-Essential, this regressed: now that login is
Protected, `dpkg --force-remove-essential --purge login` refuses to
remove it, even though being Protected is "weaker" than being Essential:

2024/07/15 04:30:34 platformize | dpkg: error processing package login 
(--purge):
2024/07/15 04:30:34 platformize |  this is a protected package; it should not 
be removed

and even though it does allow Essential packages to be removed:

2024/07/15 04:30:34 platformize | dpkg: warning: overriding problem because 
--force enabled:
2024/07/15 04:30:34 platformize | dpkg: warning: this is an essential package; 
it should not be removed

I think it might make sense for --force-remove-essential to automatically
enable the "weaker" option --force-remove-protected - if we're in a
scenario where removing Essential packages is OK, then it's certainly OK
to remove packages like login that are only Protected.

A workaround is to detect the dpkg version in use, and if it's >= 1.20.1,
add --force-remove-protected to the dpkg command-line.

    smcv

--- End Message ---
--- Begin Message ---
Hi!

On Thu, 2024-07-18 at 01:30:47 +0200, Guillem Jover wrote:
> I assume part of the rationale for filing this report might have been so
> that the logic in the caller can be simplified, by making it not care
> about the support in dpkg *and* the state of packages that change over
> releases. But the semantics of the requested change does not seem ideal,
> and a tool that explicitly removes a list of packages is going to be
> somewhat distro/release specific anyway. So I'm inclined to close this
> report.

Ok, doing this now then.

Thanks,
Guillem

--- End Message ---

Reply via email to