Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Removing base system packages (nano, net-tools, openssh)
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
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 119
Location: Finland

PostPosted: Wed Jul 03, 2013 10:57 am    Post subject: Removing base system packages (nano, net-tools, openssh) Reply with quote

I want to remove openssh, net-tools and nano from my system. I can emerge -C them with a nice warning but when i run emerge -uavDN @world they get pulled back. So what is the proper way to remove "system profile" packages? (I would like to add that IMO those packages shouldnt even be part of the system profile.)
_________________
koti.kapsi.fi/deferi
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Wed Jul 03, 2013 11:03 am    Post subject: Reply with quote

In some cases, it's not the actual package you mention that's part of the @system set. For instance, app-editors/nano isn't. It's merely one of the many editors that will satisfy the dependency in virtual/editor, which is in the @system set. You're saying that you don't want any editor installed, right? Embedded system?

If so, the feature you're looking for is the /etc/portage/package.provided file. See
Code:
man portage
for all the gory details. :wink:

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 119
Location: Finland

PostPosted: Wed Jul 03, 2013 11:22 am    Post subject: Reply with quote

No its not embedded. I just dont want any piece of software that allows remote administration. And i prefer vim and iproute2.

I created package.provided but openssh and net-tools still got pulled on emerge @world

/etc/portage/package.provided
Code:
sys-apps/net-tools-1.60_p20130513023548
net-misc/openssh-6.2_p2

_________________
koti.kapsi.fi/deferi
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Wed Jul 03, 2013 11:30 am    Post subject: Reply with quote

Well, vim is a proper || (logical OR) dependency of virtual/editor, which is why Portage didn't complain after you removed nano. For the others, check the dependencies. As an example
Code:
hal ~ # equery depends openssh
 * These packages depend on openssh:
virtual/ssh-0 (minimal ? net-misc/openssh)
              (!minimal ? net-misc/openssh)
Hah! Another virtual. And so
Code:
hal ~ # equery depends virtual/ssh
 * These packages depend on virtual/ssh:
kde-base/kdebase-kioslaves-4.10.3 (virtual/ssh)
Your dependencies may be different, of course. This points you in the general direction of solving this problem, though. If you eliminate the dependencies, they should no longer be pulled in.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 119
Location: Finland

PostPosted: Tue Jul 30, 2013 3:00 pm    Post subject: Reply with quote

I still have this problem. Gentoo is all about choices so i should be able to remove openssh and net-tools if i want to.

Code:
dfr-laptop defer # cat /etc/portage/package.provided
sys-apps/net-tools-1.60_p20130513023548
net-misc/openssh-6.2_p2-r3
dfr-laptop defer # equery depends net-tools
 * These packages depend on net-tools:
dfr-laptop defer # equery depends openssh
 * These packages depend on openssh:
virtual/ssh-0 (minimal ? net-misc/openssh)
              (!minimal ? net-misc/openssh)
dfr-laptop defer # equery depends virtual/ssh
 * These packages depend on virtual/ssh:
dfr-laptop defer # emerge -uavDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-apps/net-tools-1.60_p20130513023548  USE="nls -old-output (-selinux) -static" 0 kB
[ebuild  N     ] net-misc/openssh-6.2_p2-r3  USE="X hpn pam tcpd -X509 -bindist -kerberos -ldap -ldns -libedit (-selinux) -skey -static" 0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] n

Quitting.

_________________
koti.kapsi.fi/deferi
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8995
Location: beyond the rim

PostPosted: Mon Aug 05, 2013 8:22 am    Post subject: Reply with quote

a) you're using the wrong path, the file is located in /etc/portage/profile/package.provided
b) package.provided isn't the proper solution for this, just a hackish workaround meant for a different use-case. The real solution would be to remove the dependencies via /etc/portage/profile/packages, but getting the syntax right there is a bit tricky: you need to figure out the exact strings used for those packages in your profiles "packages" files and prefix them with a minus. And in the rare case that the profile is updated you have to update your file too. Unless Zac has implemented atom overlap matching for profile stacking, but I doubt that.
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 119
Location: Finland

PostPosted: Thu Aug 15, 2013 3:11 pm    Post subject: Reply with quote

Heres how i solved the problem:

# cat /etc/portage/profile/packages
-*sys-apps/net-tools
_________________
koti.kapsi.fi/deferi
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