Packages which cant be find/removed by guix remove

  • Open
  • quality assurance status badge
Details
5 participants
  • bo0od
  • Julien Lepiller
  • Leo Famulari
  • Maxime Devos
  • Mark H Weaver
Owner
unassigned
Submitted by
bo0od
Severity
normal
B
(address . bug-guix@gnu.org)
efef684a-7ca9-cfb7-2335-b7ebf13b0f4e@riseup.net
Hi There,

I saw some packages installed by default with guix like wpa-supplicant
and avahi..., But if i type 'guix remove av' and i press tab nothing
will complete the word and if i type 'guix remove avahi' or 'guix remove
wpa-supplicant' ... just give error message. (check the uploaded txt file)
Attachment: cantremove
J
J
Julien Lepiller wrote on 14 Apr 2021 02:28
(name . bo0od)(address . bo0od@riseup.net)(address . 47748@debbugs.gnu.org)
20210414022859.3c98e08d@tachikoma.lepiller.eu
Le Tue, 13 Apr 2021 12:46:19 +0000,
bo0od <bo0od@riseup.net> a écrit :

Toggle quote (8 lines)
> Hi There,
>
> I saw some packages installed by default with guix like
> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
> press tab nothing will complete the word and if i type 'guix remove
> avahi' or 'guix remove wpa-supplicant' ... just give error message.
> (check the uploaded txt file)

Guix has a different notion of "installed" and "not installed" from
other distros because of its model (and because it lets us use (but not
"install") incompatible packages). In particular, there are multiple
profiles, and each of them could contain avahi or a reference to avahi.
In your case, I think avahi comes from two places:

First, guix itself depends on guile-avahi, which brings in avahi.
That's because substitution can use avahi to get substitutes from your
local network.

Second, your operating-system declaration apparently is running
the avahi server. Since you didn't share it, I don't know if it comes
from a service dependency or if it's declared explicitely, but if you
don't want it to be running, that's where you'd remove it (either
remove the explicit service, or the dependent service (guix publish?))

Avahi is added by the installer if you enable "Substitute server
discovery" in the installer.

Similarly, wpa-supplicant is probably part of another profile, or maybe
declared in your config.scm. Once you change it, you should reconfigure
(guix system reconfigure /etc/config.scm). This will not remove files
from the store, until you run guix gc.

When you run "guix remove" as user, it only affects your user profile,
in which there is no avahi or wpa-supplicant package. Also note that, if
any of your user's profile had a dependency on avahi, "guix remove
avahi" would not have any effect on it either, because it's not
installed explicitely, it's only present in the store to satisfy a
dependency.

You can find out about these dependencies with guix graph, for instance:

guix graph -t references --path `readlink -f \
$HOME/.config/guix/current` `guix build avahi`

/gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
/gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
/gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
/gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
/gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
/gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8

I hope this is helpful :)
M
M
Mark H Weaver wrote on 14 Apr 2021 04:44
(address . 47748@debbugs.gnu.org)
87sg3tr3dh.fsf@netris.org
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (4 lines)
> Second, your operating-system declaration apparently is running
> the avahi server. Since you didn't share it, I don't know if it comes
> from a service dependency or if it's declared explicitely,

The avahi service is included in '%desktop-services'.


I don't know off-hand what is the current recommended way to remove
unwanted services from convenience variables like '%desktop-services'.
I suppose something like this (untested) in place of
'%desktop-services':

__ (remove (lambda (svc)
____________ (eq? (service-kind svc) avahi-service-type))
__________ %desktop-services)

with at least the following modules included at the top of the file:

__ (use-modules (gnu services)
_______________ (gnu services avahi)
_______________ (srfi srfi-1))

My own longstanding (and questionable) approach has been to avoid using
'%desktop-services', and instead to inline its contents into my OS
config, minus the stuff I don't want. However, if you choose to use
that method, it's probably a good idea to periodically check for changes
to '%desktop-services', and to integrate those changes into your own
config where appropriate.

Mark
J
J
Julien Lepiller wrote on 14 Apr 2021 12:34
(address . 47748@debbugs.gnu.org)
21094992-5632-4D68-B051-2A13AE61AC1C@lepiller.eu
Le 13 avril 2021 22:44:31 GMT-04:00, Mark H Weaver <mhw@netris.org> a écrit :
Toggle quote (35 lines)
>Julien Lepiller <julien@lepiller.eu> writes:
>
>> Second, your operating-system declaration apparently is running
>> the avahi server. Since you didn't share it, I don't know if it comes
>> from a service dependency or if it's declared explicitely,
>
>The avahi service is included in '%desktop-services'.
>
>https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm?id=a758a8a3c20052c5f1228e1ec80068652bbc3849#n1267
>
>I don't know off-hand what is the current recommended way to remove
>unwanted services from convenience variables like '%desktop-services'.
>I suppose something like this (untested) in place of
>'%desktop-services':
>
>__ (remove (lambda (svc)
>____________ (eq? (service-kind svc) avahi-service-type))
>__________ %desktop-services)
>
>with at least the following modules included at the top of the file:
>
>__ (use-modules (gnu services)
>_______________ (gnu services avahi)
>_______________ (srfi srfi-1))
>
>My own longstanding (and questionable) approach has been to avoid using
>'%desktop-services', and instead to inline its contents into my OS
>config, minus the stuff I don't want. However, if you choose to use
>that method, it's probably a good idea to periodically check for
>changes
>to '%desktop-services', and to integrate those changes into your own
>config where appropriate.
>
> Mark

The manual suggests modify-services in some places:

(modify-services %desktop-services
(delete avahi-service-type))
M
M
Mark H Weaver wrote on 14 Apr 2021 18:07
(address . 47748@debbugs.gnu.org)
87fszsrgs9.fsf@netris.org
Hi Julien,

Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (5 lines)
> The manual suggests modify-services in some places:
>
> (modify-services %desktop-services
> (delete avahi-service-type))

I don't see how this can work. (modify-services ...) expands into a
call to 'map', which is incapable of deleting elements. Also, the
'modify-services' docstring states:

"Each clause must have the form: (TYPE VARIABLE => BODY)"

Am I missing something?

Mark
B
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 47748@debbugs.gnu.org)
cd89b752-1d41-0179-9111-a1eb9b03c173@riseup.net
Toggle quote (1 lines)
> In particular, there are multiple
> profiles, and each of them could contain avahi or a reference to avahi.

That doesnt address the issue im talking about, why guix remove doesnt
recognize the package that number 1 , number 2 if the package will break
something important guix should say that after processing the command
guix remove x package then show warning message this x package is
dependency of xyz which might break your system would you like to
proceed? <- something like that.

> Second, your operating-system declaration apparently is running
> the avahi server. Since you didn't share it, I don't know if it comes
> from a service dependency or if it's declared explicitely

do you mean config.scm? if you need something type the command or where
and i will bring it to you.


> When you run "guix remove" as user, it only affects your user profile,
> in which there is no avahi or wpa-supplicant package. Also note that, if
> any of your user's profile had a dependency on avahi, "guix remove
> avahi" would not have any effect on it either, because it's not
> installed explicitely, it's only present in the store to satisfy a
> dependency.

You dont consider that an issue when someone use guix remove x then ops
guess what nothing indicate something can be done, and guess what no
error message gonna tell you what the hell going on. Least can be said
about this bad usability.

> I hope this is helpful :)

Appreciated :)

Julien Lepiller:
Toggle quote (56 lines)
> Le Tue, 13 Apr 2021 12:46:19 +0000,
> bo0od <bo0od@riseup.net> a écrit :
>
>> Hi There,
>>
>> I saw some packages installed by default with guix like
>> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
>> press tab nothing will complete the word and if i type 'guix remove
>> avahi' or 'guix remove wpa-supplicant' ... just give error message.
>> (check the uploaded txt file)
>
> Guix has a different notion of "installed" and "not installed" from
> other distros because of its model (and because it lets us use (but not
> "install") incompatible packages). In particular, there are multiple
> profiles, and each of them could contain avahi or a reference to avahi.
> In your case, I think avahi comes from two places:
>
> First, guix itself depends on guile-avahi, which brings in avahi.
> That's because substitution can use avahi to get substitutes from your
> local network.
>
> Second, your operating-system declaration apparently is running
> the avahi server. Since you didn't share it, I don't know if it comes
> from a service dependency or if it's declared explicitely, but if you
> don't want it to be running, that's where you'd remove it (either
> remove the explicit service, or the dependent service (guix publish?))
>
> Avahi is added by the installer if you enable "Substitute server
> discovery" in the installer.
>
> Similarly, wpa-supplicant is probably part of another profile, or maybe
> declared in your config.scm. Once you change it, you should reconfigure
> (guix system reconfigure /etc/config.scm). This will not remove files
> from the store, until you run guix gc.
>
> When you run "guix remove" as user, it only affects your user profile,
> in which there is no avahi or wpa-supplicant package. Also note that, if
> any of your user's profile had a dependency on avahi, "guix remove
> avahi" would not have any effect on it either, because it's not
> installed explicitely, it's only present in the store to satisfy a
> dependency.
>
> You can find out about these dependencies with guix graph, for instance:
>
> guix graph -t references --path `readlink -f \
> $HOME/.config/guix/current` `guix build avahi`
>
> /gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
> /gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
> /gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
> /gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
> /gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
> /gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8
>
> I hope this is helpful :)
>
M
M
Mark H Weaver wrote on 14 Apr 2021 20:42
(address . 47748@debbugs.gnu.org)
87czuwr9l5.fsf@netris.org
Hi,

bo0od <bo0od@riseup.net> writes:

Toggle quote (10 lines)
> > In particular, there are multiple
> > profiles, and each of them could contain avahi or a reference to avahi.
>
> That doesnt address the issue im talking about, why guix remove doesnt
> recognize the package that number 1 , number 2 if the package will break
> something important guix should say that after processing the command
> guix remove x package then show warning message this x package is
> dependency of xyz which might break your system would you like to
> proceed? <- something like that.

This seems to be based on a misunderstanding about what "guix remove" is
intended to do. As Julien indicated, it is _only_ meant to remove the
given packages from the set of *explicitly-requested* packages installed
in your user profile. More precisely, it creates a _new_ user profile
that's the same as the previous one, but with some packages removed from
the set of explicitly-requested packages. It _never_ deletes anything.

You seem to want it to do something different than it was intended to
do, although I'm not precisely sure what that is. Do you want it to try
to purge all copies of the given package from /gnu/store? If so, that
might require deleting (or modifying) older system generations and older
user profiles, which would interfere with rollback functionality. Or
perhaps you want it to automatically update all user profiles, as well
as the system, to avoid depending on that package, directly or
indirectly? If so, there are a couple of problems with that: (1) on
multi-user systems (which is admittedly becoming an edge case) it would
violate the principle that each user should have control over their own
profiles, and (2) it would apparently involve automagically editing your
OS configuration file to remove any packages or services that depend
(directly or indirectly) on the specified packages.

From my perspective, it seems that you have expectations about how
package managers should work based on your experience with traditional
GNU/Linux distributions. Guix is based on a radically different
approach which takes some time to become acquainted with. Perhaps our
documentation needs to be improved to better manage user expectations.

It reminds me of how many developers responded when asked to switch to
Git from CVS or Subversion. Many developers found that transition
difficult, and considered it a flaw in Git that it failed to conform to
their expectations.

Nonetheless, I very much appreciate your feedback. I suspect that many
other people experimenting with Guix feel as you do, but that some of
them are simply walking away in silence. Thanks for making a
constructive effort to engage with us on these issues.

Regards,
Mark
M
M
Maxime Devos wrote on 14 Apr 2021 20:44
(address . 47748@debbugs.gnu.org)
a20a71bc57e53720759804ac5d4037d92aabb723.camel@telenet.be
On Wed, 2021-04-14 at 16:31 +0000, bo0od wrote:
Toggle quote (6 lines)
> > Second, your operating-system declaration apparently is running
> > the avahi server. Since you didn't share it, I don't know if it comes
> > from a service dependency or if it's declared explicitely
>
> do you mean config.scm?

I'm not Julien Lepiller, but I believe that's wat asked for
-- the file with the (operating-system ...) declaration.

Toggle quote (2 lines)
> if you need something type the command or where
> and i will bring it to you.
It's the *file* ‘we’ need. (Well, the file JL needs.)
It's not a command you need to type, it's a file you need
to attach to the e-mail.

Toggle quote (12 lines)
> > When you run "guix remove" as user, it only affects your user profile,
> > in which there is no avahi or wpa-supplicant package. Also note that, if
> > any of your user's profile had a dependency on avahi, "guix remove
> > avahi" would not have any effect on it either, because it's not
> > installed explicitely, it's only present in the store to satisfy a
> > dependency.
>
> You dont consider that an issue when someone use guix remove x then ops
> guess what nothing indicate something can be done, and guess what no
> error message gonna tell you what the hell going on. Least can be said
> about this bad usability.

Currently the error message when removing a package not existing in the profile
is:

$ guix remove m17n-lib
guix remove: error: package 'm17n-lib' not found in profile

What do you think of adding a few hints? Some ideas:

guix remove: error: package 'm17n-lib' not found in profile
Hint: All users have their own profiles. To remove packages from the profile
of the root user, run "sudo guix remove PACKAGES" or equivalent.
Hint: On Guix System, packages can defined in the operating system declaration.
These are not affected by "guix remove PACKAGES".

and, when applicable:

Hint: 'm17n-lib' is propagated from 'MANUALLY-INSTALLED-PACKAGE', via N intermediate
packages. Consider running "guix remove MANUALLY-INSTALLED-PACKAGE" instead.

Would that have been helpful to you?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHc4HhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kb9AQCa8R7VyRqvpSppZzd8/EnmAj71
FwFSamGkacfHpa/xegEAo1sZ+348+6Eo3DIG8c7sjeqwUmb/scDbegN//0y2Aw0=
=mMjr
-----END PGP SIGNATURE-----


J
J
Julien Lepiller wrote on 14 Apr 2021 20:48
(name . bo0od)(address . bo0od@riseup.net)(address . 47748@debbugs.gnu.org)
609E45C8-122E-4894-A9E4-C5F12B3BD39A@lepiller.eu
Le 14 avril 2021 12:31:31 GMT-04:00, bo0od <bo0od@riseup.net> a écrit :
Toggle quote (12 lines)
> > In particular, there are multiple
>> profiles, and each of them could contain avahi or a reference to
>avahi.
>
>That doesnt address the issue im talking about, why guix remove doesnt
>recognize the package that number 1 , number 2 if the package will
>break
>something important guix should say that after processing the command
>guix remove x package then show warning message this x package is
>dependency of xyz which might break your system would you like to
>proceed? <- something like that.

guix removc only operates on your user profile, which doesn't contain avahi. That's what it's telling you.

You can check that you do not have avahi installed in your profile with

guix package -l

And that none of your installed packages depend on it:

guix size `readlink -f ~/.guix-profile`

Guix operates only on explicitely installed packages, which I think is much cleaner and allows it to be more predictable. Compare, if A depends on B and C, initially you have all three.

apt install B then apt remove A -> nothing
apt remove A then apt install B -> only B

guix install B then guix remove A -> B and C
guix remove A then guix install B -> B and C

guix operates on explicitely installed packages, dependencies are implementation details. It just doesn't work like apt or other package managers. New tool, new usages.

Toggle quote (9 lines)
>
> > Second, your operating-system declaration apparently is running
>> the avahi server. Since you didn't share it, I don't know if it comes
> > from a service dependency or if it's declared explicitely
>
>do you mean config.scm? if you need something type the command or where
>
>and i will bring it to you.

Yes, I meant /etc/config.scm (well, by convention, as you can always create the file elsewhere). But I don't need it anymore, since I learned it's actually part of the default %desktop-services.

Toggle quote (16 lines)
>
>> When you run "guix remove" as user, it only affects your user
>profile,
>> in which there is no avahi or wpa-supplicant package. Also note that,
>if
> > any of your user's profile had a dependency on avahi, "guix remove
> > avahi" would not have any effect on it either, because it's not
> > installed explicitely, it's only present in the store to satisfy a
> > dependency.
>
>You dont consider that an issue when someone use guix remove x then ops
>
>guess what nothing indicate something can be done, and guess what no
>error message gonna tell you what the hell going on. Least can be said
>about this bad usability.

It's not "no message", is it? I lust tried "guix remove hello", and I don't have hello in my profile. It told me (in red): error: package 'hello' not found in profile.

Not sure how it could be more explicit.

Toggle quote (72 lines)
>
> > I hope this is helpful :)
>
>Appreciated :)
>
>Julien Lepiller:
>> Le Tue, 13 Apr 2021 12:46:19 +0000,
>> bo0od <bo0od@riseup.net> a écrit :
>>
>>> Hi There,
>>>
>>> I saw some packages installed by default with guix like
>>> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
>>> press tab nothing will complete the word and if i type 'guix remove
>>> avahi' or 'guix remove wpa-supplicant' ... just give error message.
>>> (check the uploaded txt file)
>>
>> Guix has a different notion of "installed" and "not installed" from
>> other distros because of its model (and because it lets us use (but
>not
>> "install") incompatible packages). In particular, there are multiple
>> profiles, and each of them could contain avahi or a reference to
>avahi.
>> In your case, I think avahi comes from two places:
>>
>> First, guix itself depends on guile-avahi, which brings in avahi.
>> That's because substitution can use avahi to get substitutes from
>your
>> local network.
>>
>> Second, your operating-system declaration apparently is running
>> the avahi server. Since you didn't share it, I don't know if it comes
>> from a service dependency or if it's declared explicitely, but if you
>> don't want it to be running, that's where you'd remove it (either
>> remove the explicit service, or the dependent service (guix
>publish?))
>>
>> Avahi is added by the installer if you enable "Substitute server
>> discovery" in the installer.
>>
>> Similarly, wpa-supplicant is probably part of another profile, or
>maybe
>> declared in your config.scm. Once you change it, you should
>reconfigure
>> (guix system reconfigure /etc/config.scm). This will not remove files
>> from the store, until you run guix gc.
>>
>> When you run "guix remove" as user, it only affects your user
>profile,
>> in which there is no avahi or wpa-supplicant package. Also note that,
>if
>> any of your user's profile had a dependency on avahi, "guix remove
>> avahi" would not have any effect on it either, because it's not
>> installed explicitely, it's only present in the store to satisfy a
>> dependency.
>>
>> You can find out about these dependencies with guix graph, for
>instance:
>>
>> guix graph -t references --path `readlink -f \
>> $HOME/.config/guix/current` `guix build avahi`
>>
>> /gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
>> /gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
>> /gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
>> /gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
>>
>/gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
>> /gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8
>>
>> I hope this is helpful :)
>>
B
(address . 47748@debbugs.gnu.org)
ffa6c5ab-d4e9-1d96-2ee7-fdf8657abe8b@riseup.net
Toggle quote (1 lines)
> You seem to want it to do something different than it was intended to
> do, although I'm not precisely sure what that is. Do you want it to try
> to purge all copies of the given package from /gnu/store? If so, that
> might require deleting (or modifying) older system generations and older
> user profiles, which would interfere with rollback functionality.

Isnt this the standard understanding of deleting a package whether in
GNU/Linux or Windows or Mac? If user has the root rights he should be
able to delete software x, otherwise software x just hanging there
forever and to delete it someone needs a hell of steps to do that and if
so then this is can have usability issues , and so as security issues.
usability issues are clear like the example above which i want to delete
x using package manager (Thats gnu/linux way of deleting packages if
mistaken correct me) then it wont be deleted. For security issues if x
package is outdated and/or got widely exploited security vulnerability
it just wont be gone from the distro (least we can say easily) leading
to permanent vulnerability in the OS.

> Or perhaps you want it to automatically update all user profiles, as well
> as the system, to avoid depending on that package, directly or
> indirectly? If so, there are a couple of problems with that: (1) on
> multi-user systems (which is admittedly becoming an edge case) it would
> violate the principle that each user should have control over their own
> profiles, and (2) it would apparently involve automagically editing your
> OS configuration file to remove any packages or services that depend
> (directly or indirectly) on the specified packages.

So you see for example wpa-supplicant is not essential package for an OS
which doesnt use wifi, Yet in guix i cant just delete it using guix
remove it or sudo guix remove it, I find this annoying to have something
like this happening within my OS.

Check main distros like Debian or Fedora and i want to know where is
that avahi or wpa-supplicant (god know how many more) cant be removed?

Btw even packages which might break the distro you can delete them if
you have root rights using just the package manager with the same simple
command.

> Nonetheless, I very much appreciate your feedback. I suspect that many
> other people experimenting with Guix feel as you do, but that some of
> them are simply walking away in silence.

Sure anytime, Thanks to you 2 <f>

Mark H Weaver:
Toggle quote (54 lines)
> Hi,
>
> bo0od <bo0od@riseup.net> writes:
>
>> > In particular, there are multiple
>> > profiles, and each of them could contain avahi or a reference to avahi.
>>
>> That doesnt address the issue im talking about, why guix remove doesnt
>> recognize the package that number 1 , number 2 if the package will break
>> something important guix should say that after processing the command
>> guix remove x package then show warning message this x package is
>> dependency of xyz which might break your system would you like to
>> proceed? <- something like that.
>
> This seems to be based on a misunderstanding about what "guix remove" is
> intended to do. As Julien indicated, it is _only_ meant to remove the
> given packages from the set of *explicitly-requested* packages installed
> in your user profile. More precisely, it creates a _new_ user profile
> that's the same as the previous one, but with some packages removed from
> the set of explicitly-requested packages. It _never_ deletes anything.
>
> You seem to want it to do something different than it was intended to
> do, although I'm not precisely sure what that is. Do you want it to try
> to purge all copies of the given package from /gnu/store? If so, that
> might require deleting (or modifying) older system generations and older
> user profiles, which would interfere with rollback functionality. Or
> perhaps you want it to automatically update all user profiles, as well
> as the system, to avoid depending on that package, directly or
> indirectly? If so, there are a couple of problems with that: (1) on
> multi-user systems (which is admittedly becoming an edge case) it would
> violate the principle that each user should have control over their own
> profiles, and (2) it would apparently involve automagically editing your
> OS configuration file to remove any packages or services that depend
> (directly or indirectly) on the specified packages.
>
>>From my perspective, it seems that you have expectations about how
> package managers should work based on your experience with traditional
> GNU/Linux distributions. Guix is based on a radically different
> approach which takes some time to become acquainted with. Perhaps our
> documentation needs to be improved to better manage user expectations.
>
> It reminds me of how many developers responded when asked to switch to
> Git from CVS or Subversion. Many developers found that transition
> difficult, and considered it a flaw in Git that it failed to conform to
> their expectations.
>
> Nonetheless, I very much appreciate your feedback. I suspect that many
> other people experimenting with Guix feel as you do, but that some of
> them are simply walking away in silence. Thanks for making a
> constructive effort to engage with us on these issues.
>
> Regards,
> Mark
>
B
(address . 47748@debbugs.gnu.org)
f8e5135f-aead-29b9-34e6-106155d40a27@riseup.net
Toggle quote (1 lines)
> guix remove: error: package 'm17n-lib' not found in profile
> Hint: All users have their own profiles. To remove packages from the
profile
> of the root user, run "sudo guix remove PACKAGES" or equivalent.

yeah very nice one, except that "sudo guix remove package" doesnt work :(

This is how its done in debian/fedora, for e.g this is what debian error
give if apt needs root rights to delete a package:

"user@host:~$ apt remove hexchat
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13:
Permission denied)
E: Unable to acquire the dpkg frontend lock
(/var/lib/dpkg/lock-frontend), are you root?"

This is what it shows in Fedora:

"[user@host ~]$ dnf remove wpa-supplicant
Error: This command has to be run with superuser privileges (under the
root user on most systems)."

But like i said current situation in guix is not about using sudo guix
or guix alone.

Maxime Devos:
Toggle quote (52 lines)
> On Wed, 2021-04-14 at 16:31 +0000, bo0od wrote:
>> > Second, your operating-system declaration apparently is running
>> > the avahi server. Since you didn't share it, I don't know if it comes
>> > from a service dependency or if it's declared explicitely
>>
>> do you mean config.scm?
>
> I'm not Julien Lepiller, but I believe that's wat asked for
> -- the file with the (operating-system ...) declaration.
>
>> if you need something type the command or where
>> and i will bring it to you.
> It's the *file* ‘we’ need. (Well, the file JL needs.)
> It's not a command you need to type, it's a file you need
> to attach to the e-mail.
>
>> > When you run "guix remove" as user, it only affects your user profile,
>> > in which there is no avahi or wpa-supplicant package. Also note that, if
>> > any of your user's profile had a dependency on avahi, "guix remove
>> > avahi" would not have any effect on it either, because it's not
>> > installed explicitely, it's only present in the store to satisfy a
>> > dependency.
>>
>> You dont consider that an issue when someone use guix remove x then ops
>> guess what nothing indicate something can be done, and guess what no
>> error message gonna tell you what the hell going on. Least can be said
>> about this bad usability.
>
> Currently the error message when removing a package not existing in the profile
> is:
>
> $ guix remove m17n-lib
> guix remove: error: package 'm17n-lib' not found in profile
>
> What do you think of adding a few hints? Some ideas:
>
> guix remove: error: package 'm17n-lib' not found in profile
> Hint: All users have their own profiles. To remove packages from the profile
> of the root user, run "sudo guix remove PACKAGES" or equivalent.
> Hint: On Guix System, packages can defined in the operating system declaration.
> These are not affected by "guix remove PACKAGES".
>
> and, when applicable:
>
> Hint: 'm17n-lib' is propagated from 'MANUALLY-INSTALLED-PACKAGE', via N intermediate
> packages. Consider running "guix remove MANUALLY-INSTALLED-PACKAGE" instead.
>
> Would that have been helpful to you?
>
> Greetings,
> Maxime.
>
B
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 47748@debbugs.gnu.org)
56554d77-8ff5-f7a6-b5be-1302cf14ba9d@riseup.net
Toggle quote (1 lines)
> guix operates on explicitely installed packages, dependencies are
implementation details. It just doesn't work like apt or other package
managers. New tool, new usages.

So how user gonna delete preinstalled packages which are not installed
by guix install x?

wpa-supplicant is none essential package when there is no wifi, how user
gonna delete it?

no easy way to do it (i mean easy as similarly to apt/dnf..etc) thats
the whole issue

Maybe something like synapse should exist to do this job in guixos?

I dunno, But current idea of no clean,easy way to delete these packages
(or similar) just bad usability experience.




Julien Lepiller:
Toggle quote (137 lines)
> Le 14 avril 2021 12:31:31 GMT-04:00, bo0od <bo0od@riseup.net> a écrit :
>>> In particular, there are multiple
>>> profiles, and each of them could contain avahi or a reference to
>> avahi.
>>
>> That doesnt address the issue im talking about, why guix remove doesnt
>> recognize the package that number 1 , number 2 if the package will
>> break
>> something important guix should say that after processing the command
>> guix remove x package then show warning message this x package is
>> dependency of xyz which might break your system would you like to
>> proceed? <- something like that.
>
> guix removc only operates on your user profile, which doesn't contain avahi. That's what it's telling you.
>
> You can check that you do not have avahi installed in your profile with
>
> guix package -l
>
> And that none of your installed packages depend on it:
>
> guix size `readlink -f ~/.guix-profile`
>
> Guix operates only on explicitely installed packages, which I think is much cleaner and allows it to be more predictable. Compare, if A depends on B and C, initially you have all three.
>
> apt install B then apt remove A -> nothing
> apt remove A then apt install B -> only B
>
> guix install B then guix remove A -> B and C
> guix remove A then guix install B -> B and C
>
> guix operates on explicitely installed packages, dependencies are implementation details. It just doesn't work like apt or other package managers. New tool, new usages.
>
>>
>>> Second, your operating-system declaration apparently is running
>>> the avahi server. Since you didn't share it, I don't know if it comes
>>> from a service dependency or if it's declared explicitely
>>
>> do you mean config.scm? if you need something type the command or where
>>
>> and i will bring it to you.
>
> Yes, I meant /etc/config.scm (well, by convention, as you can always create the file elsewhere). But I don't need it anymore, since I learned it's actually part of the default %desktop-services.
>
>>
>>> When you run "guix remove" as user, it only affects your user
>> profile,
>>> in which there is no avahi or wpa-supplicant package. Also note that,
>> if
>>> any of your user's profile had a dependency on avahi, "guix remove
>>> avahi" would not have any effect on it either, because it's not
>>> installed explicitely, it's only present in the store to satisfy a
>>> dependency.
>>
>> You dont consider that an issue when someone use guix remove x then ops
>>
>> guess what nothing indicate something can be done, and guess what no
>> error message gonna tell you what the hell going on. Least can be said
>> about this bad usability.
>
> It's not "no message", is it? I lust tried "guix remove hello", and I don't have hello in my profile. It told me (in red): error: package 'hello' not found in profile.
>
> Not sure how it could be more explicit.
>
>>
>>> I hope this is helpful :)
>>
>> Appreciated :)
>>
>> Julien Lepiller:
>>> Le Tue, 13 Apr 2021 12:46:19 +0000,
>>> bo0od <bo0od@riseup.net> a écrit :
>>>
>>>> Hi There,
>>>>
>>>> I saw some packages installed by default with guix like
>>>> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
>>>> press tab nothing will complete the word and if i type 'guix remove
>>>> avahi' or 'guix remove wpa-supplicant' ... just give error message.
>>>> (check the uploaded txt file)
>>>
>>> Guix has a different notion of "installed" and "not installed" from
>>> other distros because of its model (and because it lets us use (but
>> not
>>> "install") incompatible packages). In particular, there are multiple
>>> profiles, and each of them could contain avahi or a reference to
>> avahi.
>>> In your case, I think avahi comes from two places:
>>>
>>> First, guix itself depends on guile-avahi, which brings in avahi.
>>> That's because substitution can use avahi to get substitutes from
>> your
>>> local network.
>>>
>>> Second, your operating-system declaration apparently is running
>>> the avahi server. Since you didn't share it, I don't know if it comes
>>> from a service dependency or if it's declared explicitely, but if you
>>> don't want it to be running, that's where you'd remove it (either
>>> remove the explicit service, or the dependent service (guix
>> publish?))
>>>
>>> Avahi is added by the installer if you enable "Substitute server
>>> discovery" in the installer.
>>>
>>> Similarly, wpa-supplicant is probably part of another profile, or
>> maybe
>>> declared in your config.scm. Once you change it, you should
>> reconfigure
>>> (guix system reconfigure /etc/config.scm). This will not remove files
>>> from the store, until you run guix gc.
>>>
>>> When you run "guix remove" as user, it only affects your user
>> profile,
>>> in which there is no avahi or wpa-supplicant package. Also note that,
>> if
>>> any of your user's profile had a dependency on avahi, "guix remove
>>> avahi" would not have any effect on it either, because it's not
>>> installed explicitely, it's only present in the store to satisfy a
>>> dependency.
>>>
>>> You can find out about these dependencies with guix graph, for
>> instance:
>>>
>>> guix graph -t references --path `readlink -f \
>>> $HOME/.config/guix/current` `guix build avahi`
>>>
>>> /gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
>>> /gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
>>> /gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
>>> /gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
>>>
>> /gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
>>> /gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8
>>>
>>> I hope this is helpful :)
>>>
>
J
J
Julien Lepiller wrote on 15 Apr 2021 13:03
(name . bo0od)(address . bo0od@riseup.net)(address . 47748@debbugs.gnu.org)
1A541367-BB79-4AC9-9444-BA85D5F38914@lepiller.eu
Le 15 avril 2021 06:16:51 GMT-04:00, bo0od <bo0od@riseup.net> a écrit :
Toggle quote (20 lines)
> > guix operates on explicitely installed packages, dependencies are
>implementation details. It just doesn't work like apt or other package
>managers. New tool, new usages.
>
>So how user gonna delete preinstalled packages which are not installed
>by guix install x?
>
>wpa-supplicant is none essential package when there is no wifi, how
>user
>gonna delete it?
>
>no easy way to do it (i mean easy as similarly to apt/dnf..etc) thats
>the whole issue
>
>Maybe something like synapse should exist to do this job in guixos?
>
>I dunno, But current idea of no clean,easy way to delete these packages
>
>(or similar) just bad usability experience.

Again, you have the wrong idea. wpa-supplicant is not installed, but its service is running, because it's part oh %desktop-services. No amount of guix remove will help you, because it can only wosk on user (or root) profiles, not the system services.

To remove it, you need to remove it from your os declaration (/etc/config.scm) with something like this:

(modify-services %desktop-services
(delete wpa-supplicant-service-type))

(Or something similar, the manual suggests the above for removing gdm for instance, but there seems to be doubts about whether that's actually correct or not)

Then reconfigure your new system:

sudo guix system reconfigure /etc/config.scm

Now, your new generation is not running wpa-supplicant anymore (you can check sudo herd status for that). Older generations still have wpa-supplicant, so it's still hanging around in the store. To purge it, you can delete those generations (loosing all possibility ofqrolling back to them):

sudo guix system delete-generations
guix gc # to effectively remove unnecessary store items

After that, you should not have wpa-supplicant in the store anymore.

HTH!

Toggle quote (168 lines)
>
>
>
>
>Julien Lepiller:
>> Le 14 avril 2021 12:31:31 GMT-04:00, bo0od <bo0od@riseup.net> a écrit
>:
>>>> In particular, there are multiple
>>>> profiles, and each of them could contain avahi or a reference to
>>> avahi.
>>>
>>> That doesnt address the issue im talking about, why guix remove
>doesnt
>>> recognize the package that number 1 , number 2 if the package will
>>> break
>>> something important guix should say that after processing the
>command
>>> guix remove x package then show warning message this x package is
>>> dependency of xyz which might break your system would you like to
>>> proceed? <- something like that.
>>
>> guix removc only operates on your user profile, which doesn't contain
>avahi. That's what it's telling you.
>>
>> You can check that you do not have avahi installed in your profile
>with
>>
>> guix package -l
>>
>> And that none of your installed packages depend on it:
>>
>> guix size `readlink -f ~/.guix-profile`
>>
>> Guix operates only on explicitely installed packages, which I think
>is much cleaner and allows it to be more predictable. Compare, if A
>depends on B and C, initially you have all three.
>>
>> apt install B then apt remove A -> nothing
>> apt remove A then apt install B -> only B
>>
>> guix install B then guix remove A -> B and C
>> guix remove A then guix install B -> B and C
>>
>> guix operates on explicitely installed packages, dependencies are
>implementation details. It just doesn't work like apt or other package
>managers. New tool, new usages.
>>
>>>
>>>> Second, your operating-system declaration apparently is running
>>>> the avahi server. Since you didn't share it, I don't know if it
>comes
>>>> from a service dependency or if it's declared explicitely
>>>
>>> do you mean config.scm? if you need something type the command or
>where
>>>
>>> and i will bring it to you.
>>
>> Yes, I meant /etc/config.scm (well, by convention, as you can always
>create the file elsewhere). But I don't need it anymore, since I
>learned it's actually part of the default %desktop-services.
>>
>>>
>>>> When you run "guix remove" as user, it only affects your user
>>> profile,
>>>> in which there is no avahi or wpa-supplicant package. Also note
>that,
>>> if
>>>> any of your user's profile had a dependency on avahi, "guix remove
>>>> avahi" would not have any effect on it either, because it's not
>>>> installed explicitely, it's only present in the store to satisfy a
>>>> dependency.
>>>
>>> You dont consider that an issue when someone use guix remove x then
>ops
>>>
>>> guess what nothing indicate something can be done, and guess what no
>>> error message gonna tell you what the hell going on. Least can be
>said
>>> about this bad usability.
>>
>> It's not "no message", is it? I lust tried "guix remove hello", and I
>don't have hello in my profile. It told me (in red): error: package
>'hello' not found in profile.
>>
>> Not sure how it could be more explicit.
>>
>>>
>>>> I hope this is helpful :)
>>>
>>> Appreciated :)
>>>
>>> Julien Lepiller:
>>>> Le Tue, 13 Apr 2021 12:46:19 +0000,
>>>> bo0od <bo0od@riseup.net> a écrit :
>>>>
>>>>> Hi There,
>>>>>
>>>>> I saw some packages installed by default with guix like
>>>>> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
>>>>> press tab nothing will complete the word and if i type 'guix
>remove
>>>>> avahi' or 'guix remove wpa-supplicant' ... just give error
>message.
>>>>> (check the uploaded txt file)
>>>>
>>>> Guix has a different notion of "installed" and "not installed" from
>>>> other distros because of its model (and because it lets us use (but
>>> not
>>>> "install") incompatible packages). In particular, there are
>multiple
>>>> profiles, and each of them could contain avahi or a reference to
>>> avahi.
>>>> In your case, I think avahi comes from two places:
>>>>
>>>> First, guix itself depends on guile-avahi, which brings in avahi.
>>>> That's because substitution can use avahi to get substitutes from
>>> your
>>>> local network.
>>>>
>>>> Second, your operating-system declaration apparently is running
>>>> the avahi server. Since you didn't share it, I don't know if it
>comes
>>>> from a service dependency or if it's declared explicitely, but if
>you
>>>> don't want it to be running, that's where you'd remove it (either
>>>> remove the explicit service, or the dependent service (guix
>>> publish?))
>>>>
>>>> Avahi is added by the installer if you enable "Substitute server
>>>> discovery" in the installer.
>>>>
>>>> Similarly, wpa-supplicant is probably part of another profile, or
>>> maybe
>>>> declared in your config.scm. Once you change it, you should
>>> reconfigure
>>>> (guix system reconfigure /etc/config.scm). This will not remove
>files
>>>> from the store, until you run guix gc.
>>>>
>>>> When you run "guix remove" as user, it only affects your user
>>> profile,
>>>> in which there is no avahi or wpa-supplicant package. Also note
>that,
>>> if
>>>> any of your user's profile had a dependency on avahi, "guix remove
>>>> avahi" would not have any effect on it either, because it's not
>>>> installed explicitely, it's only present in the store to satisfy a
>>>> dependency.
>>>>
>>>> You can find out about these dependencies with guix graph, for
>>> instance:
>>>>
>>>> guix graph -t references --path `readlink -f \
>>>> $HOME/.config/guix/current` `guix build avahi`
>>>>
>>>> /gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
>>>> /gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
>>>> /gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
>>>> /gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
>>>>
>>>
>/gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
>>>> /gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8
>>>>
>>>> I hope this is helpful :)
>>>>
>>
M
M
Maxime Devos wrote on 15 Apr 2021 20:04
(address . 47748@debbugs.gnu.org)
607e61d554b9eb6dedf6c9d3acf2ce414fe8d3c1.camel@telenet.be
On Thu, 2021-04-15 at 09:37 +0000, bo0od wrote:
Toggle quote (7 lines)
> > guix remove: error: package 'm17n-lib' not found in profile
> > Hint: All users have their own profiles. To remove packages from the
> profile
> > of the root user, run "sudo guix remove PACKAGES" or equivalent.
>
> yeah very nice one, except that "sudo guix remove package" doesnt work :(

I suggested two hints. What do you think of the second hint:

Hint: On Guix System, packages can defined in the operating system declaration.
These are not affected by "guix remove PACKAGES".

I don't know if it applies to your exact situation though (not following
the discussion very closely).
Toggle quote (11 lines)
> This is how its done in debian/fedora, for e.g this is what debian error
> give if apt needs root rights to delete a package:
>
> "user@host:~$ apt remove hexchat
> E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13:
> Permission denied)
> E: Unable to acquire the dpkg frontend lock
> (/var/lib/dpkg/lock-frontend), are you root?"
>
> This is what it shows in Fedora: [...]

In that case, my first hint would have been informative, no?
I don't see what you are trying to show here.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHiAIBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7unbAP0fixZePre0Z+7wxxIw4fsVqet1
hULgLaC8a6knu9wgggEAohczsKhA6Ruk3qBYhZBNx6oSQdepqZhig34IinCHMAc=
=XMoo
-----END PGP SIGNATURE-----


M
M
Mark H Weaver wrote on 15 Apr 2021 21:34
(address . 47748@debbugs.gnu.org)
87blafibp3.fsf@netris.org
bo0od <bo0od@riseup.net> writes:

Toggle quote (10 lines)
> > You seem to want it to do something different than it was intended to
> > do, although I'm not precisely sure what that is. Do you want it to try
> > to purge all copies of the given package from /gnu/store? If so, that
> > might require deleting (or modifying) older system generations and older
> > user profiles, which would interfere with rollback functionality.
>
> Isnt this the standard understanding of deleting a package whether in
> GNU/Linux or Windows or Mac? If user has the root rights he should be
> able to delete software x,

The command in Guix that most closely matches what you seem to be asking
for is "guix gc --delete", which will try to delete a given set of store
items. In your original bug report, it looks like 'avahi' was one of
the things you were trying to remove, so I'll use that as an example:

Toggle snippet (5 lines)
mhw@jojen ~$ guix gc --delete /gnu/store/…-avahi-0.8
finding garbage collector roots...
guix gc: error: cannot delete path `/gnu/store/…-avahi-0.8' since it is still alive

If you get this error, you can use "guix gc --referrers" to find out
what's keeping it alive:

Toggle snippet (11 lines)
mhw@jojen ~$ guix gc --referrers /gnu/store/…-avahi-0.8
/gnu/store/…-geoclue-2.5.7
/gnu/store/…-gvfs-1.40.2
/gnu/store/…-pulseaudio-14.0
/gnu/store/…-cups-filters-1.27.4
/gnu/store/…-guile-avahi-0.4.0-1.6d43caf
/gnu/store/…-avahi-0.8
/gnu/store/…-cups-2.3.3
/gnu/store/…-grilo-plugins-0.3.11

So, it looks like I won't be able to remove avahi from my store, at
least not if I want to keep GNOME, CUPS, or Pulseaudio.

For similar reasons, I can't remove Avahi from my Debian server either:

Toggle snippet (11 lines)
root@world:~# dpkg -r libavahi-client3
dpkg: dependency problems prevent removal of libavahi-client3:amd64:
libvirt0:amd64 depends on libavahi-client3 (>= 0.6.16).
libcups2:amd64 depends on libavahi-client3 (>= 0.6.16).

dpkg: error processing package libavahi-client3:amd64 (--remove):
dependency problems - not removing
Errors were encountered while processing:
libavahi-client3:amd64

Anyway, I agree that it would be good to have a user-friendly way to ask
Guix why a given piece of software is in their store, and to help them
find ways to remove it, if possible. We have some tools to help with
this, e.g. "guix gc --referrers", "guix graph --type=reverse-package",
"guix graph --type=reverse-bag", and "guix graph --path", etc, but
there's plenty of room for improvement.

Mark
B
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 47748@debbugs.gnu.org)
d7815c8c-a02d-f6e6-9244-260ff7e825a6@riseup.net
Toggle quote (1 lines)
> Again, you have the wrong idea. wpa-supplicant is not installed, but
its service is running, because it's part oh %desktop-services. No
amount of guix remove will help you, because it can only wosk on user
(or root) profiles, not the system services.
>
> To remove it, you need to remove it from your os declaration
(/etc/config.scm) with something like this:[...]

My friend isnt this what im saying not friendly,bad
usability,disaster...etc

And i said to have maybe something like synapse which mean addressing
everything installed and user can just remove the packages by clicking
on them (or lets call it the GUI way of doing it) similar to the
functionally you showed:

"(modify-services %desktop-services
(delete wpa-supplicant-service-type))"

... or whatever suits the development and give friendly result, But if
you tell me in 2021 user gonna go to /x/y/z then modify manually and add
lines blah remove blah <- call me if guix will ever be a top usable
distro in the coming 20 years from now or ever.


Julien Lepiller:
Toggle quote (212 lines)
> Le 15 avril 2021 06:16:51 GMT-04:00, bo0od <bo0od@riseup.net> a écrit :
>>> guix operates on explicitely installed packages, dependencies are
>> implementation details. It just doesn't work like apt or other package
>> managers. New tool, new usages.
>>
>> So how user gonna delete preinstalled packages which are not installed
>> by guix install x?
>>
>> wpa-supplicant is none essential package when there is no wifi, how
>> user
>> gonna delete it?
>>
>> no easy way to do it (i mean easy as similarly to apt/dnf..etc) thats
>> the whole issue
>>
>> Maybe something like synapse should exist to do this job in guixos?
>>
>> I dunno, But current idea of no clean,easy way to delete these packages
>>
>> (or similar) just bad usability experience.
>
> Again, you have the wrong idea. wpa-supplicant is not installed, but its service is running, because it's part oh %desktop-services. No amount of guix remove will help you, because it can only wosk on user (or root) profiles, not the system services.
>
> To remove it, you need to remove it from your os declaration (/etc/config.scm) with something like this:
>
> (modify-services %desktop-services
> (delete wpa-supplicant-service-type))
>
> (Or something similar, the manual suggests the above for removing gdm for instance, but there seems to be doubts about whether that's actually correct or not)
>
> Then reconfigure your new system:
>
> sudo guix system reconfigure /etc/config.scm
>
> Now, your new generation is not running wpa-supplicant anymore (you can check sudo herd status for that). Older generations still have wpa-supplicant, so it's still hanging around in the store. To purge it, you can delete those generations (loosing all possibility ofqrolling back to them):
>
> sudo guix system delete-generations
> guix gc # to effectively remove unnecessary store items
>
> After that, you should not have wpa-supplicant in the store anymore.
>
> HTH!
>
>>
>>
>>
>>
>> Julien Lepiller:
>>> Le 14 avril 2021 12:31:31 GMT-04:00, bo0od <bo0od@riseup.net> a écrit
>> :
>>>>> In particular, there are multiple
>>>>> profiles, and each of them could contain avahi or a reference to
>>>> avahi.
>>>>
>>>> That doesnt address the issue im talking about, why guix remove
>> doesnt
>>>> recognize the package that number 1 , number 2 if the package will
>>>> break
>>>> something important guix should say that after processing the
>> command
>>>> guix remove x package then show warning message this x package is
>>>> dependency of xyz which might break your system would you like to
>>>> proceed? <- something like that.
>>>
>>> guix removc only operates on your user profile, which doesn't contain
>> avahi. That's what it's telling you.
>>>
>>> You can check that you do not have avahi installed in your profile
>> with
>>>
>>> guix package -l
>>>
>>> And that none of your installed packages depend on it:
>>>
>>> guix size `readlink -f ~/.guix-profile`
>>>
>>> Guix operates only on explicitely installed packages, which I think
>> is much cleaner and allows it to be more predictable. Compare, if A
>> depends on B and C, initially you have all three.
>>>
>>> apt install B then apt remove A -> nothing
>>> apt remove A then apt install B -> only B
>>>
>>> guix install B then guix remove A -> B and C
>>> guix remove A then guix install B -> B and C
>>>
>>> guix operates on explicitely installed packages, dependencies are
>> implementation details. It just doesn't work like apt or other package
>> managers. New tool, new usages.
>>>
>>>>
>>>>> Second, your operating-system declaration apparently is running
>>>>> the avahi server. Since you didn't share it, I don't know if it
>> comes
>>>>> from a service dependency or if it's declared explicitely
>>>>
>>>> do you mean config.scm? if you need something type the command or
>> where
>>>>
>>>> and i will bring it to you.
>>>
>>> Yes, I meant /etc/config.scm (well, by convention, as you can always
>> create the file elsewhere). But I don't need it anymore, since I
>> learned it's actually part of the default %desktop-services.
>>>
>>>>
>>>>> When you run "guix remove" as user, it only affects your user
>>>> profile,
>>>>> in which there is no avahi or wpa-supplicant package. Also note
>> that,
>>>> if
>>>>> any of your user's profile had a dependency on avahi, "guix remove
>>>>> avahi" would not have any effect on it either, because it's not
>>>>> installed explicitely, it's only present in the store to satisfy a
>>>>> dependency.
>>>>
>>>> You dont consider that an issue when someone use guix remove x then
>> ops
>>>>
>>>> guess what nothing indicate something can be done, and guess what no
>>>> error message gonna tell you what the hell going on. Least can be
>> said
>>>> about this bad usability.
>>>
>>> It's not "no message", is it? I lust tried "guix remove hello", and I
>> don't have hello in my profile. It told me (in red): error: package
>> 'hello' not found in profile.
>>>
>>> Not sure how it could be more explicit.
>>>
>>>>
>>>>> I hope this is helpful :)
>>>>
>>>> Appreciated :)
>>>>
>>>> Julien Lepiller:
>>>>> Le Tue, 13 Apr 2021 12:46:19 +0000,
>>>>> bo0od <bo0od@riseup.net> a écrit :
>>>>>
>>>>>> Hi There,
>>>>>>
>>>>>> I saw some packages installed by default with guix like
>>>>>> wpa-supplicant and avahi..., But if i type 'guix remove av' and i
>>>>>> press tab nothing will complete the word and if i type 'guix
>> remove
>>>>>> avahi' or 'guix remove wpa-supplicant' ... just give error
>> message.
>>>>>> (check the uploaded txt file)
>>>>>
>>>>> Guix has a different notion of "installed" and "not installed" from
>>>>> other distros because of its model (and because it lets us use (but
>>>> not
>>>>> "install") incompatible packages). In particular, there are
>> multiple
>>>>> profiles, and each of them could contain avahi or a reference to
>>>> avahi.
>>>>> In your case, I think avahi comes from two places:
>>>>>
>>>>> First, guix itself depends on guile-avahi, which brings in avahi.
>>>>> That's because substitution can use avahi to get substitutes from
>>>> your
>>>>> local network.
>>>>>
>>>>> Second, your operating-system declaration apparently is running
>>>>> the avahi server. Since you didn't share it, I don't know if it
>> comes
>>>>> from a service dependency or if it's declared explicitely, but if
>> you
>>>>> don't want it to be running, that's where you'd remove it (either
>>>>> remove the explicit service, or the dependent service (guix
>>>> publish?))
>>>>>
>>>>> Avahi is added by the installer if you enable "Substitute server
>>>>> discovery" in the installer.
>>>>>
>>>>> Similarly, wpa-supplicant is probably part of another profile, or
>>>> maybe
>>>>> declared in your config.scm. Once you change it, you should
>>>> reconfigure
>>>>> (guix system reconfigure /etc/config.scm). This will not remove
>> files
>>>>> from the store, until you run guix gc.
>>>>>
>>>>> When you run "guix remove" as user, it only affects your user
>>>> profile,
>>>>> in which there is no avahi or wpa-supplicant package. Also note
>> that,
>>>> if
>>>>> any of your user's profile had a dependency on avahi, "guix remove
>>>>> avahi" would not have any effect on it either, because it's not
>>>>> installed explicitely, it's only present in the store to satisfy a
>>>>> dependency.
>>>>>
>>>>> You can find out about these dependencies with guix graph, for
>>>> instance:
>>>>>
>>>>> guix graph -t references --path `readlink -f \
>>>>> $HOME/.config/guix/current` `guix build avahi`
>>>>>
>>>>> /gnu/store/9yvb5kknnq8b1mrfsqaggrgjifk2mgs4-profile
>>>>> /gnu/store/dy46rf8aknz4im7sjz89i9b7snqi1m8w-guix-f91e1046c
>>>>> /gnu/store/szyzmhsxckvb0h7pdh9ags9apd1sch7m-guix-command
>>>>> /gnu/store/zjpqr7m6j3cjk5l2sr81yxyg5ny4njy6-guix-module-union
>>>>>
>>>>
>> /gnu/store/jawdw5ca459z8y3a6hcd5pd772zjrs93-guile-avahi-0.4.0-1.6d43caf
>>>>> /gnu/store/gj0irsda1y0msawq8g1wfcgw7xcsxz2m-avahi-0.8
>>>>>
>>>>> I hope this is helpful :)
>>>>>
>>>
>
B
(address . 47748@debbugs.gnu.org)
e7a876ad-9a4b-93a2-009b-a868de009f9b@riseup.net
Great, I believe you got my message clearly thank you as well for the
commands.

yes in debian if you want to remove libavahi it wont be removed (without
breaking stuff), but avahi-daemon (if its installed) you can remove it
with no issues so as wpa-supplicant,mesa..etc

Anyway you just got my message clearly and i appreciate that <f>.

Mark H Weaver:
Toggle quote (64 lines)
> bo0od <bo0od@riseup.net> writes:
>
>> > You seem to want it to do something different than it was intended to
>> > do, although I'm not precisely sure what that is. Do you want it to try
>> > to purge all copies of the given package from /gnu/store? If so, that
>> > might require deleting (or modifying) older system generations and older
>> > user profiles, which would interfere with rollback functionality.
>>
>> Isnt this the standard understanding of deleting a package whether in
>> GNU/Linux or Windows or Mac? If user has the root rights he should be
>> able to delete software x,
>
> The command in Guix that most closely matches what you seem to be asking
> for is "guix gc --delete", which will try to delete a given set of store
> items. In your original bug report, it looks like 'avahi' was one of
> the things you were trying to remove, so I'll use that as an example:
>
> --8<---------------cut here---------------start------------->8---
> mhw@jojen ~$ guix gc --delete /gnu/store/…-avahi-0.8
> finding garbage collector roots...
> guix gc: error: cannot delete path `/gnu/store/…-avahi-0.8' since it is still alive
> --8<---------------cut here---------------end--------------->8---
>
> If you get this error, you can use "guix gc --referrers" to find out
> what's keeping it alive:
>
> --8<---------------cut here---------------start------------->8---
> mhw@jojen ~$ guix gc --referrers /gnu/store/…-avahi-0.8
> /gnu/store/…-geoclue-2.5.7
> /gnu/store/…-gvfs-1.40.2
> /gnu/store/…-pulseaudio-14.0
> /gnu/store/…-cups-filters-1.27.4
> /gnu/store/…-guile-avahi-0.4.0-1.6d43caf
> /gnu/store/…-avahi-0.8
> /gnu/store/…-cups-2.3.3
> /gnu/store/…-grilo-plugins-0.3.11
> --8<---------------cut here---------------end--------------->8---
>
> So, it looks like I won't be able to remove avahi from my store, at
> least not if I want to keep GNOME, CUPS, or Pulseaudio.
>
> For similar reasons, I can't remove Avahi from my Debian server either:
>
> --8<---------------cut here---------------start------------->8---
> root@world:~# dpkg -r libavahi-client3
> dpkg: dependency problems prevent removal of libavahi-client3:amd64:
> libvirt0:amd64 depends on libavahi-client3 (>= 0.6.16).
> libcups2:amd64 depends on libavahi-client3 (>= 0.6.16).
>
> dpkg: error processing package libavahi-client3:amd64 (--remove):
> dependency problems - not removing
> Errors were encountered while processing:
> libavahi-client3:amd64
> --8<---------------cut here---------------end--------------->8---
>
> Anyway, I agree that it would be good to have a user-friendly way to ask
> Guix why a given piece of software is in their store, and to help them
> find ways to remove it, if possible. We have some tools to help with
> this, e.g. "guix gc --referrers", "guix graph --type=reverse-package",
> "guix graph --type=reverse-bag", and "guix graph --path", etc, but
> there's plenty of room for improvement.
>
> Mark
>
B
(address . 47748@debbugs.gnu.org)
65da50b1-6ef7-84f1-248b-b1ef2b5ebb0f@riseup.net
Toggle quote (1 lines)
> I suggested two hints. What do you think of the second hint:
>
> Hint: On Guix System, packages can defined in the operating system
declaration.
> These are not affected by "guix remove PACKAGES".

Yeah also this one is good, except user need to know "operating system
declaration" beforehand but no issue anything better than the previous
error message.

> I don't see what you are trying to show here.

Just showing error messages of other distros.

But anyway your hints are better than the default used one, At least
user can ask what i should use instead of "guix remove packages", but
not oh what is profile guix talking about what profile i should use...etc

I hope you got the idea im trying to make.

(fixing the error message is not the ideal solution, ideal solution is
to have friendly control on these packages. but this is for sure help as
well)

Maxime Devos:
Toggle quote (33 lines)
> On Thu, 2021-04-15 at 09:37 +0000, bo0od wrote:
>> > guix remove: error: package 'm17n-lib' not found in profile
>> > Hint: All users have their own profiles. To remove packages from the
>> profile
>> > of the root user, run "sudo guix remove PACKAGES" or equivalent.
>>
>> yeah very nice one, except that "sudo guix remove package" doesnt work :(
>
> I suggested two hints. What do you think of the second hint:
>
> Hint: On Guix System, packages can defined in the operating system declaration.
> These are not affected by "guix remove PACKAGES".
>
> I don't know if it applies to your exact situation though (not following
> the discussion very closely).
>
>> This is how its done in debian/fedora, for e.g this is what debian error
>> give if apt needs root rights to delete a package:
>>
>> "user@host:~$ apt remove hexchat
>> E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13:
>> Permission denied)
>> E: Unable to acquire the dpkg frontend lock
>> (/var/lib/dpkg/lock-frontend), are you root?"
>>
>> This is what it shows in Fedora: [...]
>
> In that case, my first hint would have been informative, no?
> I don't see what you are trying to show here.
>
> Greetings,
> Maxime.
>
L
L
Leo Famulari wrote on 16 Apr 2021 05:41
(name . bo0od)(address . bo0od@riseup.net)
YHkHbWQwdYQb+qhu@jasmine.lan
On Fri, Apr 16, 2021 at 02:11:09AM +0000, bo0od wrote:
Toggle quote (7 lines)
> My friend isnt this what im saying not friendly,bad usability,disaster...etc
>
> And i said to have maybe something like synapse which mean addressing
> everything installed and user can just remove the packages by clicking on
> them (or lets call it the GUI way of doing it) similar to the functionally
> you showed:

The programs you are asking to remove are used internally by Guix.

You can't remove them with a simple command. You can't do that on other
Linux distros either.

For example, on Debian, I have /usr/bin/gpg:

------
$ ls -l /usr/bin/gpg
-rwxr-xr-x 1 root root 1046256 Aug 22 2019 /usr/bin/gpg
------

Then I uninstall it:

------
$ sudo apt-get remove gpg
[...]
$ ls -l /usr/bin/gpg
ls: cannot access '/usr/bin/gpg': No such file or directory
-----

But, apt-get uses gpg too, to check package signatures. It still has its
own copy of gpg, so it still works. You can't remove it easily.

It's the same situation, and it's not a bug.
Closed
B
(name . Leo Famulari)(address . leo@famulari.name)
1be9311f-9ae6-e96d-a966-f443da48146a@riseup.net
Toggle quote (1 lines)
> But, apt-get uses gpg too, to check package signatures. It still has its
> own copy of gpg, so it still works. You can't remove it easily.
>
> It's the same situation, and it's not a bug.

what are you talking about? im talking about packages which are not
essential like mesa , nouveau , wpa-supplicant...


Nevertheless about gpg in debian see:


user@host:~$ sudo apt remove gpg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
dirmngr gnupg-l10n gnupg-utils gpg-agent gpgconf gpgsm libassuan0
libksba8
libldap-2.4-2 libldap-common libnpth0 libsasl2-2 libsasl2-modules-db
pinentry-curses
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
gnupg gpg gpg-wks-client gpg-wks-server
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 3,490 kB disk space will be freed.
Do you want to continue? [Y/n]

user@host:~$ sudo apt remove gpg*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'gpg-wks-client' for glob 'gpg*'
Note, selecting 'gpg-wks-server' for glob 'gpg*'
Note, selecting 'gpg' for glob 'gpg*'
Note, selecting 'gpgrt-tools' for glob 'gpg*'
Note, selecting 'gpgv-static' for glob 'gpg*'
Note, selecting 'gpgv' for glob 'gpg*'
Note, selecting 'gpgv-win32' for glob 'gpg*'
Note, selecting 'gpg-agent' for glob 'gpg*'
Note, selecting 'gpg-remailer' for glob 'gpg*'
Note, selecting 'gpgconf' for glob 'gpg*'
Note, selecting 'gpgsm' for glob 'gpg*'
Note, selecting 'gpgv1' for glob 'gpg*'
Note, selecting 'gpgv2' for glob 'gpg*'
Package 'gpgv1' is not installed, so not removed
Package 'gpgv-static' is not installed, so not removed
Package 'gpgv-win32' is not installed, so not removed
Package 'gpgv2' is not installed, so not removed
Package 'gpg-remailer' is not installed, so not removed
Package 'gpgrt-tools' is not installed, so not removed
The following packages were automatically installed and are no longer
required:
conntrack dconf-cli ethtool gir1.2-glib-2.0 gnupg-l10n gnupg-utils
imagemagick imagemagick-6-common imagemagick-6.q16 initscripts insserv
keyboard-configuration libassuan0 libde265-0 libegl1-mesa
libfftw3-double3
libfontenc1 libgirepository-1.0-1 libheif1 libksba8 libldap-2.4-2
libldap-common liblqr-1-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6
libnpth0 libpython-stdlib libpython2-stdlib libpython2.7-minimal
libpython2.7-stdlib libqubes-rpc-filecopy2 libqubesdb libsasl2-2
libsasl2-modules-db libxfont2 libxkbfile1 net-tools pinentry-curses
python
python-minimal python2 python2-minimal python2.7 python2.7-minimal
python3-cffi-backend python3-daemon python3-dbus python3-gi
python3-lockfile
python3-qubesdb python3-six python3-xcffib python3-xdg qubesdb qubesdb-vm
socat startpar sysv-rc tinyproxy tinyproxy-bin tor tor-geoipdb torsocks
x11-xkb-utils x11-xserver-utils xdg-utils xen-utils-common xenstore-utils
xinit xserver-common xserver-xorg-core xserver-xorg-input-qubes
xserver-xorg-video-dummyqbs
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
apt apt-transport-https apt-transport-tor apt-utils dirmngr gnupg gpg
gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv
qubes-core-agent
qubes-core-agent-networking qubes-gui-agent qubes-vm-dependencies tasksel
tasksel-data
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt gpgv (due to apt)
0 upgraded, 0 newly installed, 19 to remove and 0 not upgraded.
After this operation, 15.5 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]

Please reopen.


Leo Famulari:
Toggle quote (34 lines)
> On Fri, Apr 16, 2021 at 02:11:09AM +0000, bo0od wrote:
>> My friend isnt this what im saying not friendly,bad usability,disaster...etc
>>
>> And i said to have maybe something like synapse which mean addressing
>> everything installed and user can just remove the packages by clicking on
>> them (or lets call it the GUI way of doing it) similar to the functionally
>> you showed:
>
> The programs you are asking to remove are used internally by Guix.
>
> You can't remove them with a simple command. You can't do that on other
> Linux distros either.
>
> For example, on Debian, I have /usr/bin/gpg:
>
> ------
> $ ls -l /usr/bin/gpg
> -rwxr-xr-x 1 root root 1046256 Aug 22 2019 /usr/bin/gpg
> ------
>
> Then I uninstall it:
>
> ------
> $ sudo apt-get remove gpg
> [...]
> $ ls -l /usr/bin/gpg
> ls: cannot access '/usr/bin/gpg': No such file or directory
> -----
>
> But, apt-get uses gpg too, to check package signatures. It still has its
> own copy of gpg, so it still works. You can't remove it easily.
>
> It's the same situation, and it's not a bug.
>
Closed
L
L
Leo Famulari wrote on 16 Apr 2021 09:23
(name . bo0od)(address . bo0od@riseup.net)
YHk7j/a7kEfr0EZ/@jasmine.lan
On Fri, Apr 16, 2021 at 04:37:13AM +0000, bo0od wrote:
Toggle quote (2 lines)
> Please reopen.

It can be reopened by sending a message containing "reopen 47748" to
<control@debbugs.gnu.org>.


I still think that "Guix doesn't work like another OS" isn't a bug.
Closed
M
M
Mark H Weaver wrote on 16 Apr 2021 16:52
(address . 47748@debbugs.gnu.org)
87eefagu35.fsf@netris.org
Mark H Weaver <mhw@netris.org> writes:

Toggle quote (9 lines)
> Julien Lepiller <julien@lepiller.eu> writes:
>
>> The manual suggests modify-services in some places:
>>
>> (modify-services %desktop-services
>> (delete avahi-service-type))
>
> I don't see how this can work.

For the record: Julien was right. 'modify-services' was enhanced to
support deleting services about 2 days before Julien made this post, and
I didn't yet know about it. I checked my own local copy of the Guix git
repo, which was a few days old, and it didn't occur to me that the
functionality had been added so recently. Sorry for the confusion.

Mark
?