bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47748: Packages which cant be find/removed by guix remove


From: Julien Lepiller
Subject: bug#47748: Packages which cant be find/removed by guix remove
Date: Thu, 15 Apr 2021 07:03:48 -0400
User-agent: K-9 Mail for Android

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 :)
>>>>
>> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]