Subject: bug#44306: package-delete exiting on encountering system/dependency packages

From: Stefan Kangas <[email-masked]>
Date: Fri, 30 Oct 2020 13:34:55 +0000

Lars Ingebrigtsen <[email-masked]> writes:

> Boruch Baum <[email-masked]> writes:
>
>> When attempting to perform package-autoremove to clean up obsolete
>> packages, my emacs would abort with an error that `foo' is a system
>> package. Thus, it had become impossible to perform the operation. I
>> altered function package-delete to replace its two calls to function
>> `error' with simple `message' and can now clean up the packages.
>
> It kinda sounds like there something wrong in what package-autoremove is
> trying to delete.

Indeed.  The question is why these packages are considered for removal
at all.

If we can avoid doing that, the error "Package `%s' is used by `%s' as
dependency, not deleting" seems correct to me - it will catch bugs.