Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
--depclean wants to remove nano!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 17, 2011 2:23 pm    Post subject: --depclean wants to remove nano! Reply with quote

Uh oh.
Code:
emerge -va --depclean
...
>>> These are the packages that would be unmerged:                                                                           
                                                                                                                             
                                                                                                                             
!!! 'app-editors/nano' (virtual/editor) is part of your system profile.                                                     
!!! Unmerging it may be damaging to your system.                                                                             
                                                                                                                             
                                                                                                                             
 app-editors/nano
    selected: 2.2.5
   protected: none
     omitted: none

All selected packages: app-editors/nano-2.2.5

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No]
What kind of borkage would cause this and what would be the first step in investigation or remediation?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Jun 17, 2011 2:26 pm    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=370295#c26
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 17, 2011 2:29 pm    Post subject: Reply with quote

Ah. It's not a bug; it's a feature. Thanks.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Jun 17, 2011 2:37 pm    Post subject: Reply with quote

yep, though personally i think nano and less barely take up any room and should have just been left alone
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 17, 2011 2:40 pm    Post subject: Reply with quote

Reading through the bug, it's actually a little bit of an interesting choice. For instance, if virtual/editor were part of the @system set instead of nano, it would let you install a preferred replacement or even more than one but wouldn't squawk unless you tried to remove all of 'em. Interesting discussion, in my opinion.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Fri Jun 17, 2011 3:17 pm    Post subject: Reply with quote

The first thing I do in a new system is get rid of that thing and swap it in with Vim. Isn't there an environment variable for this?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jun 17, 2011 3:23 pm    Post subject: Reply with quote

You're thinking about EDITOR but that doesn't control anything about Portage. I always install ${MY_FAVORITE_EDITOR} as well. This seems to be a move in the direction of having virtuals instead of packages in the @system set (and perhaps others, too).

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Jun 17, 2011 5:00 pm    Post subject: Reply with quote

Yeah but it tried to remove less and nano on my system and i was perfectly happy with them, I hadn't specifically installed any replacement, just had stuff installed that was pulled in by other packages. Of course adding them to world fixed it but i can just picture this giving new users some headaches as a lot of documentation just assumes that these programs are installed.

Examples from XServer configuration guide:
Quote:
Code Listing 4.1: Changing the Monitor section

# nano -w /etc/X11/xorg.conf.d/40-monitor.conf

<snip>
Code Listing 4.2: Configuring multiple monitors

# nano -w /etc/X11/xorg.conf.d/40-monitor.conf

<snip>
Code Listing 4.3: Using an international keyboard

# nano -w /etc/X11/xorg.conf.d/30-keyboard.conf
Back to top
View user's profile Send private message
theBlackDragon
l33t
l33t


Joined: 23 Nov 2002
Posts: 768
Location: Belgium

PostPosted: Tue Jul 05, 2011 8:28 am    Post subject: Reply with quote

Not to mention that it can be annoying if you just want to provide another editor to your users (or I install emacs for own use, doen't mean I want to force everyone to start using it)

Did some Gnome dev sneak in to start cutting everything out of Gentoo until only the bare bones are left?

less and nano should be in the system profile, if people want to remove them they should be able to do so. They shouldn't have to take action just to keep packages that 99% of the users do not want removed.
_________________
Fvwm|Fvwm forum
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2551
Location: Here and Away Again

PostPosted: Wed Jul 06, 2011 12:39 am    Post subject: Reply with quote

Personally I think I've always felt nano as a part of my Gentoo, I still use it a lot of times, while purrrhaps not the most effective one, I still like it and it works for me.

Not that my depclean has wanted to remove it, either.
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
zuboskal14
n00b
n00b


Joined: 30 Mar 2009
Posts: 34
Location: Moscow, Russia

PostPosted: Thu Jul 07, 2011 8:31 am    Post subject: Reply with quote

hmm, I have only nano installed:
Code:
$ eix -IC --only-names  app-editors
app-editors/gentoo-editor
app-editors/nano


But emerge --depclean want to remove nano too.

Why?
Back to top
View user's profile Send private message
barul
Guru
Guru


Joined: 28 May 2010
Posts: 434

PostPosted: Thu Jul 07, 2011 9:01 am    Post subject: Reply with quote

I said yes to remove nano, 'cause I only use vim. Is it ok?
Back to top
View user's profile Send private message
zuboskal14
n00b
n00b


Joined: 30 Mar 2009
Posts: 34
Location: Moscow, Russia

PostPosted: Thu Jul 07, 2011 9:05 am    Post subject: Reply with quote

I have not installed another editor, only app-editors/nano
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Thu Jul 07, 2011 10:57 am    Post subject: Reply with quote

theBlackDragon wrote:
less and nano should be in the system profile, if people want to remove them they should be able to do so.
That's a contradiction, if a package is in the system profile then it can't be removed, at least not without adding it to package.provided to stop it being pulled in.

Nano is actually my editor of choice, but I agree with this way of doing things, but seeing as nano is more or less "the default" (by virtue of being included in the stage tarballs) then I think even if another editor is installed which satisfies the virtual, nano should only be uninstalled if the user manually unmerges it, not by depclean, and then no longer be pulled in on account of the other virtual-satisfying editor.
At least, that would be the ideal solution (IMO) but I get how it's not that simple.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Thu Jul 07, 2011 11:09 am    Post subject: Reply with quote

I think a good compromise would be for them to be included in the world file by default. Then if a user wants to remove them they can but they won't get purged by --depclean.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Thu Jul 07, 2011 11:17 am    Post subject: Reply with quote

rh1 wrote:
I think a good compromise would be for them to be included in the world file by default. Then if a user wants to remove them they can but they won't get purged by --depclean.
That would do the trick, however there isn't any world file by default, and this alone doesn't seem a big enough issue to justify changing that.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
zuboskal14
n00b
n00b


Joined: 30 Mar 2009
Posts: 34
Location: Moscow, Russia

PostPosted: Thu Jul 07, 2011 12:07 pm    Post subject: Reply with quote

Well, add nano in world it not hard for me.

But nano starts from /bin, but vim, emacs, kate and etc.from /usr/bin.

If I have /usr mounted by lvm, I need simple text editor sometimes...
Back to top
View user's profile Send private message
theBlackDragon
l33t
l33t


Joined: 23 Nov 2002
Posts: 768
Location: Belgium

PostPosted: Thu Jul 07, 2011 1:17 pm    Post subject: Reply with quote

Sadako wrote:
rh1 wrote:
I think a good compromise would be for them to be included in the world file by default. Then if a user wants to remove them they can but they won't get purged by --depclean.
That would do the trick, however there isn't any world file by default, and this alone doesn't seem a big enough issue to justify changing that.


Maybe not, but the way it is now isn't really acceptable either. If you manage to break some dependency of $FANCY_EDITOR that made depclean unmerge nano you're shit out of luck. I seem to remember some library that managed to break both emacs and vim when it's abi changed (hell, libpng can break emacs if it's compiled with png support). If portage then would have had the bright idea to remove nano, well, better hope you have that boot medium handy.

The charm of nano is that it's there, depends on next to nothing (and thus very rarely breaks and probably isn't affected by anything that could break your regular editor) and is so small that it being there doesn't get in anyone's way, it's also easy to use for everybody, unlike vi(m) or emacs. The same goes for less. Both have become de-facto standard applications on GNU/Linux systems.
_________________
Fvwm|Fvwm forum
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Thu Jul 07, 2011 2:52 pm    Post subject: Reply with quote

Quote:
That would do the trick, however there isn't any world file by default, and this alone doesn't seem a big enough issue to justify changing that.

Sure there is. /var/lib/portage/world is in the stage3. It's just empty. Not sure what would be involved in adding some thing to it. I'm not familair with how gentoo builds stage 3. And while it seems like a little problem not worth the time, you know what they say
Quote:
If you take care of the small things, the big things take care of themselves
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jul 07, 2011 7:08 pm    Post subject: Reply with quote

Not interested in editor wars. Am I the only one that realises depclean removing part of the @system dependency chain is completely f'ing broken behaviour?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jul 07, 2011 7:27 pm    Post subject: Reply with quote

Yes, but what if nano weren't part of the @system set? Wouldn't it be okay to remove it then? Take a look back through the discussion.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Fri Jul 08, 2011 7:09 am    Post subject: Reply with quote

Sadako wrote:


Nano is actually my editor of choice, but I agree with this way of doing things, but seeing as nano is more or less "the default" (by virtue of being included in the stage tarballs) then I think even if another editor is installed which satisfies the virtual, nano should only be uninstalled if the user manually unmerges it, not by depclean, and then no longer be pulled in on account of the other virtual-satisfying editor.
At least, that would be the ideal solution (IMO) but I get how it's not that simple.


Uninstalling anything installed contained in an RDEPEND=" || ( )" is dangerous.
Portage recently started to just remove all but one. Some call it a feature, some a bug.
At least one can say emerge --depclean became a whole lot more dangerous.

If the bug would be fixed you would see the behaviour which you describe as ideal.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Jul 08, 2011 6:34 pm    Post subject: Reply with quote

John R. Graham wrote:
Yes, but what if nano weren't part of the @system set? Wouldn't it be okay to remove it then?

If it wasn't listed as a dependency of virtual/editor then yes, it would be completely fine.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Jul 08, 2011 7:39 pm    Post subject: Reply with quote

But essentially every editor is an "or" dependency of virtual/editor. Does that mean that Portage shouldn't remove any of them? But, okay, I understand your position. However, you will probably admit that the situation is a little more nuanced than what you were portraying. I happen to like it, though. I like that more things are implemented as (what I think of as) reasonable general cases instead of arbitrary choices made for me.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Dammital
Apprentice
Apprentice


Joined: 05 Nov 2004
Posts: 189

PostPosted: Sat Jul 09, 2011 3:08 am    Post subject: Reply with quote

theBlackDragon wrote:
If you manage to break some dependency of $FANCY_EDITOR that made depclean unmerge nano you're shit out of luck. I seem to remember some library that managed to break both emacs and vim when it's abi changed (hell, libpng can break emacs if it's compiled with png support). If portage then would have had the bright idea to remove nano, well, better hope you have that boot medium handy.


There's always busybox vi.
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
Goto page 1, 2  Next
Page 1 of 2

 
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