all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44306@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>
Subject: bug#44306: package-delete exiting on encountering system/dependency packages
Date: Sun, 1 Nov 2020 09:33:46 -0500	[thread overview]
Message-ID: <20201101143346.ujtjrnyondllx3mp@E15-2016.optimum.net> (raw)
In-Reply-To: <877dr5dz5y.fsf@gnus.org>

On 2020-11-01 13:44, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum@gmx.com> writes:
>
> > That's not really my point. My point in the bug report is that while
> > technically the use of function 'error' is correct in this case, it works
> > out to be counter-productive and should be replaced with a simple use of
> > the function 'message' logging the condition to the *Messages* buffer.
>
> Since it sounds like package-autoremove is making a list of candidates
> that includes packages that should not be removed, the `error' there
> sounds like exactly the right thing?  Because it's uncovering a bug in
> package-autoremove.

But it shouldn't prevent the user from auto-removing all the other
legitimate packages! I had been ignoring this for a long time until the
accumulated list exceeded 40 packages. In the end, this bug denied
removal of 28, which were all removed when I replaced the 'error' with a
'message'. With my approach, users still get the notification of the
problem, and are able to perform the legitimate parts of the operation.

Another way of thinking about the issue it to imagine offering the user
to auto-remove packages individually, selecting one package at a time.
In that imaginary (and burdensome) case would you also deny the user to
remove package F because some other package B was improperly on some
list?

Yet another way of thinking about the issue is to think of the
consequences. In this case, the error function isn't stopping anything
bad from happening (the system package wouldn't get removed even without
the abort), it only stops other good things from happening (legitimate
packages don't get removed).

If you absolutely insist on using the 'error' function, you can delay it
until processing *all* the packages, accumulating the names of the system
ones. That approach will also generate a more informative error message
than is currently done because it could report all the packages
wrongfully on the list (currently, only the first is reported).


--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





  reply	other threads:[~2020-11-01 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 12:52 bug#44306: package-delete exiting on encountering system/dependency packages Boruch Baum
2020-10-30 13:12 ` Lars Ingebrigtsen
2020-10-30 13:34   ` Stefan Kangas
2020-11-01  2:48     ` Boruch Baum
2020-11-01 12:44       ` Lars Ingebrigtsen
2020-11-01 14:33         ` Boruch Baum [this message]
2020-11-01  2:35   ` Boruch Baum
2020-11-01  2:50     ` Stefan Kangas

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=20201101143346.ujtjrnyondllx3mp@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=44306@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=stefankangas@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.