Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
depclean removed nano ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 215
Location: Toronto, Canada

PostPosted: Fri Jun 26, 2020 7:50 pm    Post subject: depclean removed nano ? Reply with quote

So I did:

Code:
emerge -cav x11-libs/gtk+


but it wouldn't work because adwaita icon themes depended on it...so I did:

Code:
emerge -C x11-libs/gtk+
emerge -cav


and then reinstalled it like:

Code:
emerge --ask x11-libs/gtk+



After doing this, nano wouldn't work no more ... something uninstalled it...

what did I do wrong here ?
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Fri Jun 26, 2020 8:09 pm    Post subject: Reply with quote

If you want nano you should explicitly select it. @system depends on virtual/editor not nano directly, as such if you select any editors satisfying virtual/editor (vim, emacs, neovim, the list goes on -- nano being the default pick), nano become subject for normal depcleaning.

I'd assume you may have installed such recently and the depclean now removed it. Portage does throw some warning about it though, maybe you missed it.


Last edited by Ionen on Fri Jun 26, 2020 8:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24369
Location: here

PostPosted: Fri Jun 26, 2020 8:09 pm    Post subject: Reply with quote

I think is an old bug
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 215
Location: Toronto, Canada

PostPosted: Fri Jun 26, 2020 8:19 pm    Post subject: Reply with quote

Ionen wrote:
If you want nano you should explicitly select it. @system depends on virtual/editor not nano directly, as such if you select any editors satisfying virtual/editor (vim, emacs, neovim, the list goes on -- nano being the default pick), nano become subject for normal depcleaning.

I'd assume you may have installed such recently and the depclean now removed it. Portage does throw some warning about it though, maybe you missed it.


I installed vim a few days ago...so you are saying vim becomes the default editor and then nano becomes redundant and is deleted ?

if I install nano explicitly, will this happen again ?

did I mess anything else up by doing the things I did in the first post ?
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Fri Jun 26, 2020 8:26 pm    Post subject: Reply with quote

Well default is defined by EDITOR variable (eselect editor), in this case it's just about making @system dependencies happy which is "system should have some kind of console-based file editor and I don't overly care which", and so it leaves the choice of which up to you.

So yes, if you want both vim and nano just emerge yourself / add to world file (emerge --noreplace) both and then they'll stay for sure.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 506
Location: Australia

PostPosted: Sat Jun 27, 2020 4:29 am    Post subject: Reply with quote

@LegionOfHell
None of the commands you listed uninstalled nano, did you do a world update / depclean at some point in this process?
Anyway there are a few ways that the system will try and remove nano if it isn't in @world, I've seen none of them that are silent about it.
If nano is in the @world file, then portage will never try to remove it.

Same goes for the x-11-libs/gtk+ entry, which is now in your @world file. You don't really want to pollute your @world file like that.
libs are always a dependency of something else, so that something should pull them in, if you let portage handle the dependency chain that just happens.
When you start putting libs into @world you interfere with portages ability to manage that for you, ie. --depclean can't pick them up when you don't need them anymore.

You should have used the -1 (--oneshot) option to reinstall that lib,
Code:
emerge -1av x-11-libs/gtk+
which essentially ensures the gtk+ pkg isn't recorded in @world. Otherwise, on a standard Gentoo configuration a regular
Code:
emerge pkg
command will record pkg in @world. That may not always be what you want. There is the inverse --noreplace option also which will also always add a pkg to @world, but usual use for that is to force a slot for (ie various kernel src you want to keep away from --depclean)
Code:
emerge --noreplace sys-kernel/gentoo-sources:x.xx.xxx

When you make these entries in @world it then becomes your responsibility to subsequently update them manually as necessary as part of your regular sysadmin ie.
Code:
emerge -cpv sys-kernel/gentoo-sources:x.xx.xxx
which will tell you what's been left behind to clean up manually when done.

edit: to a more generally appropriate removal string upon reflection on Ionen's comment below


Last edited by ian.au on Sat Jun 27, 2020 12:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 5:41 am    Post subject: Reply with quote

ian.au wrote:
None of the commands you listed uninstalled nano, did you do a world update / depclean at some point in this process?
There's a "emerge -cav" in the second [code] bracket without any package specified, so that's a full depclean if went through with it. And with vim recently installed it would indeed remove nano (it would have colored warnings about it though).

That aside, good pointing the lacking -1 issue. Also, don't use -C. There's only a handful of exceptional cases where it makes sense to use it over normal -c, the rest of the time it's just asking to potentially mess up the system unless you know what you're doing.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 506
Location: Australia

PostPosted: Sat Jun 27, 2020 6:14 am    Post subject: Reply with quote

Ionen wrote:
ian.au wrote:
None of the commands you listed uninstalled nano, did you do a world update / depclean at some point in this process?
There's a "emerge -cav" in the second [code] bracket without any package specified, so that's a full depclean. And with vim recently installed it would indeed remove nano (it would have colored warnings about it though).

So there is, I should have looked more closely. The main point is though, that nothing magically uninstalled it without notice.
Quote:

That aside, good pointing the lacking -1 issue. Also, don't use -C. There's only a handful of exceptional cases where it makes sense to use it over normal -c, the rest of the time it's just asking to mess up the system unless you know what you're doing.

Are you telling me to not use emerge --unmerge on a package I've specifically slotted there? ;) I suppose I see your point, but really a bit of familiarity with man emerge is requisite to not screwing up a Gentoo install imo.
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 7:59 am    Post subject: Reply with quote

Yeah wasn't saying -C was a problem in this exact situation but -c would work too and there's no reason to make a habit of using something that you normally shouldn't, especially when showing it to others that may end up using it all the time :)
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 506
Location: Australia

PostPosted: Sat Jun 27, 2020 1:09 pm    Post subject: Reply with quote

Yep, and thinking in it, your point is valid @Ionen, so I modified that string in my original post. Thanks for pointing it out, I automatically typed the string I use in that situation without really considering the implications.

I suppose
Code:
emerge --deselect
should also get a mention, as a non-destructive way of removing items from the @world set without necessarily uninstalling them, which would be a good way for the OP to deal with the gtk+ libs they inadvertently installed earlier.
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 215
Location: Toronto, Canada

PostPosted: Sat Jun 27, 2020 3:50 pm    Post subject: Reply with quote

I had to install gtk+ explicitly because the Tor browser depended on it...
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 506
Location: Australia

PostPosted: Sun Jun 28, 2020 12:01 am    Post subject: Reply with quote

LegionOfHell wrote:
I had to install gtk+ explicitly because the Tor browser depended on it...

Well from your initial post it looks like you were trying to depclean gtk+, got refused by portage because there was (at least one) dependency upon it, nuked it anyway and then had to reinstall it?

I'm not running tor but if it has a GTK+ dependency for its gui, it should be pulled in as such, which was probably working okay. You really shouldn't ever need libs in your world file in usual practice. You could always check by deselecting it in @world and seeing if a subsequent --depclean wants to remove it.
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 215
Location: Toronto, Canada

PostPosted: Sun Jun 28, 2020 2:05 am    Post subject: Reply with quote

I downloaded the Tor browser from their website which comes bundled with all the shared libraries except gtk and dbus-glib.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 506
Location: Australia

PostPosted: Sun Jun 28, 2020 3:49 am    Post subject: Reply with quote

LegionOfHell wrote:
I downloaded the Tor browser from their website which comes bundled with all the shared libraries except gtk and dbus-glib.

I see, well you could have mentioned that earlier.

You can do that, but you're going to have to manually manage this part of the install yourself, and, is a case where you'll need to keep the lib in @world meantime because portage knows nothing about your tor install.

It's not optimal to use gentoo like this, ultimately it could lead to puzzling blocks in @world emerges later. Why is the website tor version preferred over, say:https://gpo.zugaina.org/www-client/torbrowser which you could get portage to manage for you via an overlay?

It be less work ultimately, particularly if you just want a more current version than the main tree offers.
Back to top
View user's profile Send private message
extowgen
n00b
n00b


Joined: 12 Jun 2020
Posts: 28
Location: online

PostPosted: Sun Jun 28, 2020 10:42 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Project:Portage/FAQ#Why_does_emerge_--depclean_sometimes_remove_system_packages.3F

(since no one mentioned it directly)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum