View previous topic :: View next topic |
Author |
Message |
defer- Tux's lil' helper
Joined: 11 Jun 2007 Posts: 140 Location: Finland
|
Posted: Wed Jul 03, 2013 10:57 am Post subject: Removing base system packages (nano, net-tools, openssh) |
|
|
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.) _________________ https://github.com/defer- |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jul 03, 2013 11:03 am Post subject: |
|
|
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. Seefor all the gory details.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
defer- Tux's lil' helper
Joined: 11 Jun 2007 Posts: 140 Location: Finland
|
Posted: Wed Jul 03, 2013 11:22 am Post subject: |
|
|
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 |
_________________ https://github.com/defer- |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jul 03, 2013 11:30 am Post subject: |
|
|
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 _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
defer- Tux's lil' helper
Joined: 11 Jun 2007 Posts: 140 Location: Finland
|
Posted: Tue Jul 30, 2013 3:00 pm Post subject: |
|
|
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. |
_________________ https://github.com/defer- |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9527 Location: beyond the rim
|
Posted: Mon Aug 05, 2013 8:22 am Post subject: |
|
|
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 |
|
|
defer- Tux's lil' helper
Joined: 11 Jun 2007 Posts: 140 Location: Finland
|
Posted: Thu Aug 15, 2013 3:11 pm Post subject: |
|
|
Heres how i solved the problem:
# cat /etc/portage/profile/packages
-*sys-apps/net-tools _________________ https://github.com/defer- |
|
Back to top |
|
|
|