View previous topic :: View next topic |
Author |
Message |
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Thu Oct 08, 2015 6:34 pm Post subject: Things emerge --depclean should not do... |
|
|
HI
Just a rant.
as per my troubles in https://forums.gentoo.org/viewtopic-t-1030042-highlight-.html,
I ventured to run emerge --depclean for the first time after many years of using Gentoo on several boxes.
Emerge --depclean wiped, amongst other things, my entire KDE as well as PHP and nano.
All these things were in World...
Furthermore, it nonchalantly wiped the active versions of gcc and postgres... (request for help with postgres in separate message).
I'm not a dev, just a user, but I don't think depclean should wipe active versions, nor should it wipe things in world ...
Or am I missing something?
thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8931
|
Posted: Thu Oct 08, 2015 6:35 pm Post subject: |
|
|
emerge --depclean has never removed an ebuild that was in world, on any of my systems.
Also, I hate to point it out, but you confirmed to remove > 700 packages without looking twice at the output. |
|
Back to top |
|
|
platojones Veteran
Joined: 23 Oct 2002 Posts: 1602 Location: Just over the horizon
|
Posted: Thu Oct 08, 2015 6:38 pm Post subject: |
|
|
I'm not sure why it removed things in world as I've never had such an issue, so perhaps somebody else can take a swipe at that. However, I never, ever run depclean without first running 'emerge -p --depclean' to verify what depclean is about to do to my system. Again, never had the issues, but depclean can be rather dangerous to just run blindly. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Oct 08, 2015 6:43 pm Post subject: Re: Things emerge --depclean should not do... |
|
|
iandoug wrote: | ...and nano.
All these things were in World. | Nano isn't in @world (unless you put it there); it isn't even in @system anymore. As genstorm said, --depclean will not remove things that are in @world, nor will it alter the world file in any way. Do you happen to know what KDE related things are in your world file or have you already started recovery?
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Thu Oct 08, 2015 6:52 pm Post subject: |
|
|
iandoug's link gives me a 404.
If the output of a command with -p is too large for your screen then do this:
Code: | emerge --somecommand -p | less |
This'll allow you to browse large outputs.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54028 Location: 56N 3W
|
Posted: Thu Oct 08, 2015 6:53 pm Post subject: |
|
|
iandoug,
Once upon a time, long, long ago, --depclean removed glibc for me.
Ever since then, I've been vary wary of it. Its much better behaved now. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Oct 08, 2015 7:00 pm Post subject: |
|
|
gerard82 wrote: | iandoug's link gives me a 404. | Thanks for noticing that, Gerard. Fixed a typo in the link.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Thu Oct 08, 2015 7:09 pm Post subject: |
|
|
genstorm wrote: | emerge --depclean has never removed an ebuild that was in world, on any of my systems.
Also, I hate to point it out, but you confirmed to remove > 700 packages without looking twice at the output. |
Guilty as charged, I have a WIDE monitor, with terminal fullscreen, and those 700 package names were printed in a very unfriendly to read way ... the alternative would be to spend several hours (after editing the list in an editor to get one package name per line) to check a) what's my current version, and b) is the version to be removed NOT that.
Emerge has never been nasty to me before, and I trust the Gentoo devs, so I went ahead ...
BTW I have recovered from losing KDE, PHP and assorted fonts, just need to sort out Postgres.
cheers, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8931
|
Posted: Thu Oct 08, 2015 7:17 pm Post subject: |
|
|
I use --depclean frequently and I think its output is exactly what you need; it tells you what version is removed, what version is kept, if any; and there is a summary at the end, all that in a very human friendly way to read. If I see --depclean trying to remove > 50% of packages from my system, first look goes into /var/lib/portage/world and /var/lib/portage/world_sets to find out what the heck is going on... |
|
Back to top |
|
|
ian.au Guru
Joined: 07 Apr 2011 Posts: 591 Location: Australia
|
Posted: Thu Oct 08, 2015 11:22 pm Post subject: Re: Things emerge --depclean should not do... |
|
|
iandoug wrote: | Or am I missing something? |
At the end of every emerge @world you are prompted to remove obsolete packages with --depclean. I always (since once also --depcleaning my active gcc) run this with the -pv switch as others have said and study the list of proposed changes carefully. If done on a per emerge basis there are seldom more than half a dozen entries to consult, and if you see something you would like to keep (like nano) you can just add it to your world set ie. Code: | emerge --noreplace app-editors/nano |
Leaving it until you have a list of 700 entries to consider is not really how it is designed to be used, and sure to make the process far less intuitive and error prone.
If it makes you feel better, --depcleaning something important has happened to all of us, just not 700 packages at a time |
|
Back to top |
|
|
russK l33t
Joined: 27 Jun 2006 Posts: 665
|
Posted: Fri Oct 09, 2015 1:14 am Post subject: Re: Things emerge --depclean should not do... |
|
|
ian.au wrote: |
Leaving it until you have a list of 700 entries to consider is not really how it is designed to be used, and sure to make the process far less intuitive and error prone.
If it makes you feel better, --depcleaning something important has happened to all of us, just not 700 packages at a time |
So now that you mention it, I recall that way back in the days when I was new to gentoo, I practically never did --depclean, and those were probably also the days I would more often run into frustrating blockers that I couldn't understand.
On a system when you repeat this cycle:
Code: | while true
do
emerge --sync
emerge --update --deep --newuse @world
sleep 5d
done
|
You can see how this would tend to accumulate unneeded packages. Best to do the --depclean regularly, before things get out of hand. I always run it with --ask
Regards
P.S. Please don't anyone put that script in a cron job, it's best to be conscious of your system updates |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Fri Oct 09, 2015 2:08 am Post subject: |
|
|
I think I only do depclean quarterly to semi-annually. Even with my weekly update cycle I do, I rarely have too many packages to clean off. Though one thing that helps is that I don't remove/add new packages to my system. Now one thing I do, is run depclean after I remove multiple packages. |
|
Back to top |
|
|
ramdzet n00b
Joined: 28 Feb 2015 Posts: 15
|
Posted: Fri Oct 09, 2015 3:44 am Post subject: |
|
|
Always "--ask" before play anything about emerge. If there is a strange, I'll "--pretend" it. |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Fri Oct 09, 2015 9:59 am Post subject: |
|
|
Quote: | Best to do the --depclean regularly, before things get out of hand. |
Choosing the use-flags unwisely also pulls in too much, sometimes a hole rat tail of packages. |
|
Back to top |
|
|
|