Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Things emerge --depclean should not do...
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
iandoug
l33t
l33t


Joined: 11 Feb 2005
Posts: 810
Location: Cape Town, South Africa

PostPosted: Thu Oct 08, 2015 6:34 pm    Post subject: Things emerge --depclean should not do... Reply with quote

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
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8931

PostPosted: Thu Oct 08, 2015 6:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Thu Oct 08, 2015 6:38 pm    Post subject: Reply with quote

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
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 Oct 08, 2015 6:43 pm    Post subject: Re: Things emerge --depclean should not do... Reply with quote

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
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Thu Oct 08, 2015 6:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Thu Oct 08, 2015 6:53 pm    Post subject: Reply with quote

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
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 Oct 08, 2015 7:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
iandoug
l33t
l33t


Joined: 11 Feb 2005
Posts: 810
Location: Cape Town, South Africa

PostPosted: Thu Oct 08, 2015 7:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8931

PostPosted: Thu Oct 08, 2015 7:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Thu Oct 08, 2015 11:22 pm    Post subject: Re: Things emerge --depclean should not do... Reply with quote

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 :wink:
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Fri Oct 09, 2015 1:14 am    Post subject: Re: Things emerge --depclean should not do... Reply with quote

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 :wink:



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
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Fri Oct 09, 2015 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message
ramdzet
n00b
n00b


Joined: 28 Feb 2015
Posts: 15

PostPosted: Fri Oct 09, 2015 3:44 am    Post subject: Reply with quote

Always "--ask" before play anything about emerge. If there is a strange, I'll "--pretend" it.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Oct 09, 2015 9:59 am    Post subject: Reply with quote

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
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