From: Eli Schwartz <eschwartz@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] --depclean and openrc [Was: Wayland! Beware of!]
Date: Sat, 26 Oct 2024 21:53:15 -0400 [thread overview]
Message-ID: <bd28056b-c321-49ca-aff0-750069842a92@gentoo.org> (raw)
In-Reply-To: <Zxvv2SzoADjBLwkE@MAC.fritz.box>
[-- Attachment #1.1: Type: text/plain, Size: 5418 bytes --]
On 10/25/24 3:22 PM, Alan Mackenzie wrote:
>> Since it is "just a package", the solution should lie in fixing
>> ::gentoo, not in fixing the "emerge" command. That's what the re-opened
>> bug is about. :)
>
> What is getting fixed are the data. That leaves the same problem in the
> emerge code to bite again the next time there are faulty data.
I would argue the precise opposite, that the job of emerge is to
faithfully do what you tell it to do and the job of ::gentoo is to not
tell emerge to do stupid things.
We should fix bugs, not break tools by assuming bugs won't be fixed.
Especially when no clear proposal about how emerge should be changed
exists (ideally in the form of a detailed feature request on the Portage
bugtracker).
>> Recommending an option that can break your system is a workaround, not a
>> solution. Surely we want to end up in a good state of affairs, eventually?
>
> We've already established that --depclean can break one's system, not
> just theoretically but in real world use. --unmerge is surely safer -
> you're unmerging specific packages which, presumably, you've already
> checked for safety.
"we" have established no such thing. You claim that --depclean can break
one's system, I disputed this notion and claim that
virtual/service-manager can break one's system.
You may argue all you want -- I cannot provide any guarantees about
whether other people will agree with you that the problem is portage,
but I'm always open to hearing persuasive arguments.
On that note I am happy that there was reasonable discussion on the bug
report at https://bugs.gentoo.org/803878 but also somewhat disappointed
that despite what seems like a lot of support for making the proposed
fix, no one has actually stepped up and made that fix yet...
> There doesn't appear to be anything better in emerge - I've looked but
> not found an emerge action to unmerge specific packages only, apart from
> --unmerge. Why is there not a version of --unmerge which does safety
> checks first?
>
> The envisaged work flow seems to be doing things like --deselect,
> followed by --depclean, praying that the latter isn't going to break the
> system. Given how much safer --unmerge is than --depclean, I don't
> understand why the emerge man page puts a bold face warning right at the
> start of --unmerge, but not on --depclean.
I find this wording confusing and difficult to understand on your part.
There is no option to unmerge specific packages only, using "--unmerge".
I just tried it:
```
# emerge --unmerge
emerge unmerge can only be used with specific package names
```
Oops? Your claims are totally invalid.
I am nitpicking about this for an extremely good reason. Since --unmerge
requires you to *specify the package name* (and since you have used it a
lot, you surely know this fact) I don't think it should come as a shock that
```
# emerge --depclean CAT/MYPKG
```
also works. And, lo and behold -- it is a version of --unmerge that
unmerges specific packages only, which does safety checks first.
This is also how I use --depclean by the way. I generally never depclean
all packages, I take a look at what "emerge --depclean --pretend"
suggests can be depcleaned and then decide whether I want to selectively
depclean some of them by name.
I will say that I wish --depclean accepted glob patterns which would
then match only on packages which are eligible for default-depcleaning.
I have a small awk script that processes the output of "emerge -cpq" to
select packages that aren't required by @world which match specific
patterns such as language-specific categories for libraries, so e.g. I
can depclean "all dev-perl stuff unless another package needs it"...
>> The emerge manpage warns you against using --unmerge for good reason.
>
> But doesn't state that reason or give a workable alternative. Saying it
> can remove important packages is unhelpful if it doesn't give an
> alternative which can't.
>
> My current workflow for clearing out orphaned packages is to do emerge
> -p --depclean, then use emerge --unmerge on those packages listed which
> aren't critical system packages or needed application programs.
... again, it literally says to use --depclean, but I'm increasingly
getting the feeling that you are not *aware* that --depclean accepts
package names. I find this odd, since the manpage entry for --depclean
says it pretty clearly:
"""
Depclean serves as a dependency aware version of --unmerge. When given
one or more atoms, it will unmerge matched packages that have no reverse
dependencies.
"""
> --depclean is too clumsy. It assumes I want to unmerge nano, for reasons
> which are surely not intended UI, but just because that's the way it was
> implemented. I think a --ask flag only asks whether to delete all listed
> packages or none, not each package individually. What I would prefer is
> an interface by which _I_ specify which packages are to be removed.
Implementing a per-package ask seems like it would be challenging, as it
would have to go back and recalculate which packages can still be asked
about if you respond "no" to some package that other packages depend on.
It does sound like an interesting idea though -- maybe worth submitting
a feature request?
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2024-10-27 1:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 20:14 [gentoo-user] Wayland! Beware of! Alan Mackenzie
2024-09-23 21:11 ` Eli Schwartz
2024-09-23 22:08 ` Alan Mackenzie
2024-09-23 22:54 ` Eli Schwartz
2024-09-24 11:30 ` [gentoo-user] --depclean and openrc [Was: Wayland! Beware of!] Alan Mackenzie
2024-09-24 11:40 ` Arsen Arsenović
2024-09-24 12:34 ` [gentoo-user] --depclean and openrc Alan Mackenzie
2024-09-24 15:24 ` Eli Schwartz
2024-09-24 18:15 ` Alan Mackenzie
2024-09-27 0:09 ` [gentoo-user] --depclean and openrc [Was: Wayland! Beware of!] Mitchell Dorrell
2024-09-24 15:15 ` Eli Schwartz
2024-09-24 18:53 ` Alan Mackenzie
2024-09-24 19:36 ` Eli Schwartz
2024-10-25 19:22 ` Alan Mackenzie
2024-10-26 3:10 ` Walter Dnes
2024-10-27 1:53 ` Eli Schwartz [this message]
2024-10-27 22:52 ` Alan Mackenzie
2024-10-27 23:14 ` Eli Schwartz
2024-09-25 0:32 ` Matt Jolly
2024-09-24 0:43 ` [gentoo-user] Wayland! Beware of! Michael Orlitzky
2024-09-24 0:52 ` Mitchell Dorrell
2024-09-24 1:13 ` Matt Jolly
2024-09-24 1:52 ` Eli Schwartz
2024-09-24 9:46 ` Mitchell Dorrell
2024-09-25 0:14 ` Matt Jolly
2024-09-24 10:05 ` Dr Rainer Woitok
2024-09-24 22:00 ` Walter Dnes
2024-09-25 1:42 ` Eli Schwartz
2024-09-25 10:00 ` Walter Dnes
2024-09-25 11:53 ` Arsen Arsenović
2024-09-25 22:21 ` Walter Dnes
2024-09-26 0:25 ` Eli Schwartz
2024-09-26 5:08 ` Walter Dnes
2024-09-26 19:18 ` James Cloos
2024-09-25 14:26 ` Eli Schwartz
2024-09-25 14:40 ` jay
2024-09-26 0:19 ` Michael Orlitzky
2024-09-23 21:12 ` Arsen Arsenović
2024-09-23 21:20 ` Wol
2024-09-23 22:53 ` karl
2024-09-24 7:10 ` Wols Lists
2024-09-24 18:32 ` What is what (Re: [gentoo-user] Wayland! Beware of!) karl
2024-09-24 23:44 ` Wols Lists
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd28056b-c321-49ca-aff0-750069842a92@gentoo.org \
--to=eschwartz@gentoo.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox