problems with depclean

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

problems with depclean

John Covici
Hi.  After a long time, I got my system into a state where I could
finally try to do emerge depclean.  What a mess!  It would have
deleted source for my running kernel, version of postgresql I am using
and many other things I am currently using.    Some of them, at least
are in my world file. Some things are not and should be and I can fix
those, but there are a lot of libraries as well and I want to make
sure my system is not completely hosed before I run this again -- next
time after an update.

So, how can I protect myself against depclean going wild?

Thanks in advance for any ideas.

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Arve Barsnes
On Mon, 14 Oct 2019 at 05:04, John Covici <[hidden email]> wrote:

>
> Hi.  After a long time, I got my system into a state where I could
> finally try to do emerge depclean.  What a mess!  It would have
> deleted source for my running kernel, version of postgresql I am using
> and many other things I am currently using.    Some of them, at least
> are in my world file. Some things are not and should be and I can fix
> those, but there are a lot of libraries as well and I want to make
> sure my system is not completely hosed before I run this again -- next
> time after an update.
>
> So, how can I protect myself against depclean going wild?

If you use an older slot of the kernel or postgres, you need to put
them in world to stop them from being depcleaned. I don't know how
postgres upgrades work in gentoo, but deleting the kernel sources are
usually no big deal unless you plan to re-compile that particular
version. Just make sure you have your config in /boot or something.

I would assume that after adding any other programs you use to world,
any libraries it wants to remove are actually not in use.

Regards,
Arve

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
On Mon, 14 Oct 2019 01:06:54 -0400,
Arve Barsnes wrote:

>
> On Mon, 14 Oct 2019 at 05:04, John Covici <[hidden email]> wrote:
> >
> > Hi.  After a long time, I got my system into a state where I could
> > finally try to do emerge depclean.  What a mess!  It would have
> > deleted source for my running kernel, version of postgresql I am using
> > and many other things I am currently using.    Some of them, at least
> > are in my world file. Some things are not and should be and I can fix
> > those, but there are a lot of libraries as well and I want to make
> > sure my system is not completely hosed before I run this again -- next
> > time after an update.
> >
> > So, how can I protect myself against depclean going wild?
>
> If you use an older slot of the kernel or postgres, you need to put
> them in world to stop them from being depcleaned. I don't know how
> postgres upgrades work in gentoo, but deleting the kernel sources are
> usually no big deal unless you plan to re-compile that particular
> version. Just make sure you have your config in /boot or something.
>
> I would assume that after adding any other programs you use to world,
> any libraries it wants to remove are actually not in use.
Thanks, I do need the current sources, lots of packages want to check
them and the linux directory entry points to the sources, packages are
always looking in there when I emerge them.


--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
On Mon, 14 Oct 2019 03:21:52 -0400, John Covici wrote:

> Thanks, I do need the current sources, lots of packages want to check
> them and the linux directory entry points to the sources, packages are
> always looking in there when I emerge them.

Put this in /etc/portage/sets.conf

[kernels]
class = portage.sets.dbapi.OwnerSet
world-candidate = False
files = /usr/src

Then "emerge -n @kernels"

Now depclean won't try to remove any kernels, or any other package that
installs files to /usr/src.


--
Neil Bothwick

The best antiques are old friends.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Peter Humphrey-3
In reply to this post by John Covici
On Monday, 14 October 2019 08:21:52 BST John Covici wrote:

> Thanks, I do need the current sources, lots of packages want to check
> them and the linux directory entry points to the sources, packages are
> always looking in there when I emerge them.

But they're looking for configuration values, not the source code. Depclean
doesn't remove the .config file.

--
Regards,
Peter.




Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
In reply to this post by Neil Bothwick
On Mon, 14 Oct 2019 04:03:53 -0400,
Neil Bothwick wrote:

>
> [1  <text/plain; US-ASCII (quoted-printable)>]
> On Mon, 14 Oct 2019 03:21:52 -0400, John Covici wrote:
>
> > Thanks, I do need the current sources, lots of packages want to check
> > them and the linux directory entry points to the sources, packages are
> > always looking in there when I emerge them.
>
> Put this in /etc/portage/sets.conf
>
> [kernels]
> class = portage.sets.dbapi.OwnerSet
> world-candidate = False
> files = /usr/src
>
> Then "emerge -n @kernels"
>
> Now depclean won't try to remove any kernels, or any other package that
> installs files to /usr/src.
>

Thanks, very nice, I had never heard of that.

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
In reply to this post by Neil Bothwick
On Mon, 14 Oct 2019 04:03:53 -0400,
Neil Bothwick wrote:

>
> [1  <text/plain; US-ASCII (quoted-printable)>]
> On Mon, 14 Oct 2019 03:21:52 -0400, John Covici wrote:
>
> > Thanks, I do need the current sources, lots of packages want to check
> > them and the linux directory entry points to the sources, packages are
> > always looking in there when I emerge them.
>
> Put this in /etc/portage/sets.conf
>
> [kernels]
> class = portage.sets.dbapi.OwnerSet
> world-candidate = False
> files = /usr/src
>
> Then "emerge -n @kernels"
>
> Now depclean won't try to remove any kernels, or any other package that
> installs files to /usr/src.
Well, this didn't seem to work, when I tried to emerge -n @kernels it
said nothing to emerge, after the calculating, etc. and it certainly
did not work.  Also, depclean did some other strange things -- on
another system I have it wanted to unmerge dev-util/glib-utils-2.58.3
which is my installed version, but doing an eix on that package, there
seems to be an update.  However, doing a world update says 0
packages, so what am I missing?

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
On Tue, 15 Oct 2019 03:55:02 -0400, John Covici wrote:

> > Put this in /etc/portage/sets.conf
> >
> > [kernels]
> > class = portage.sets.dbapi.OwnerSet
> > world-candidate = False
> > files = /usr/src
> >
> > Then "emerge -n @kernels"
> >
> > Now depclean won't try to remove any kernels, or any other package
> > that installs files to /usr/src.  
> Well, this didn't seem to work, when I tried to emerge -n @kernels it
> said nothing to emerge, after the calculating, etc.
It won't emerge anything, that command adds the kernels set to world_sets.

> and it certainly did not work.

As in depclean still wants to remove kernels? Or as in nothing /appeared/
to happen?


--
Neil Bothwick

I am MODERATOR of BORG. Follow the rules or be assimilated.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
On Tue, 15 Oct 2019 04:13:33 -0400,
Neil Bothwick wrote:

>
> [1  <text/plain; US-ASCII (quoted-printable)>]
> On Tue, 15 Oct 2019 03:55:02 -0400, John Covici wrote:
>
> > > Put this in /etc/portage/sets.conf
> > >
> > > [kernels]
> > > class = portage.sets.dbapi.OwnerSet
> > > world-candidate = False
> > > files = /usr/src
> > >
> > > Then "emerge -n @kernels"
> > >
> > > Now depclean won't try to remove any kernels, or any other package
> > > that installs files to /usr/src.  
> > Well, this didn't seem to work, when I tried to emerge -n @kernels it
> > said nothing to emerge, after the calculating, etc.
>
> It won't emerge anything, that command adds the kernels set to world_sets.
>
> > and it certainly did not work.
>
> As in depclean still wants to remove kernels? Or as in nothing /appeared/
> to happen?

As in depclean still wants to remove kernels.

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
On Tue, 15 Oct 2019 09:49:26 -0400, John Covici wrote:

> > > > Put this in /etc/portage/sets.conf
> > > >
> > > > [kernels]
> > > > class = portage.sets.dbapi.OwnerSet
> > > > world-candidate = False
> > > > files = /usr/src
> > > >
> > > > Then "emerge -n @kernels"
> > > >
> > > > Now depclean won't try to remove any kernels, or any other package
> > > > that installs files to /usr/src.    
> > > Well, this didn't seem to work, when I tried to emerge -n @kernels
> > > it said nothing to emerge, after the calculating, etc.  
> >
> > It won't emerge anything, that command adds the kernels set to
> > world_sets.
> > > and it certainly did not work.  
> >
> > As in depclean still wants to remove kernels? Or as in nothing
> > /appeared/ to happen?  
>
> As in depclean still wants to remove kernels.
Is @kernels in /var/lib/portage/world_sets?


--
Neil Bothwick

For every action, there is an equal and opposite malfunction.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Manuel McLure


On Tue, Oct 15, 2019 at 11:05 AM Neil Bothwick <[hidden email]> wrote:
Is @kernels in /var/lib/portage/world_sets?

I tested this and I found that the "emerge -n @kernels" did not add @kernels to /var/lib/portage/world_sets. However, if I manually edited world_sets and added @kernels then this works as expected. 
--
Manuel A. McLure WW1FA <[hidden email]> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.                       -- H.P. Lovecraft
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Dale-46
Manuel McLure wrote:


On Tue, Oct 15, 2019 at 11:05 AM Neil Bothwick <[hidden email]> wrote:
Is @kernels in /var/lib/portage/world_sets?

I tested this and I found that the "emerge -n @kernels" did not add @kernels to /var/lib/portage/world_sets. However, if I manually edited world_sets and added @kernels then this works as expected. 
--
Manuel A. McLure WW1FA <[hidden email]> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.                       -- H.P. Lovecraft


Depending on the options used in make.conf for emerge, you may have to use the --select y option to force it to be added.  I have -1 set as a default in make.conf and when I want something added to the world file, I have to use that option to force it.  I did that because I was tired of things being added to world that I didn't want there. 

Hope that helps.

Dale

:-)  :-) 
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
On Tue, 15 Oct 2019 14:01:49 -0500, Dale wrote:

> > I tested this and I found that the "emerge -n @kernels" did not add
> > @kernels to /var/lib/portage/world_sets. However, if I manually edited
> > world_sets and added @kernels then this works as expected. 

> Depending on the options used in make.conf for emerge, you may have to
> use the --select y option to force it to be added.  I have -1 set as a
> default in make.conf and when I want something added to the world file,
> I have to use that option to force it.  I did that because I was tired
> of things being added to world that I didn't want there. 

This is the world_sets file. I had asumed that portage would behave in
the same way with sets as atoms, -n is the same as "--select y", but
apparently not.


--
Neil Bothwick

Become a gynaecologist, look up a friend today.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
In reply to this post by Neil Bothwick
On Tue, 15 Oct 2019 14:05:03 -0400,
Neil Bothwick wrote:

>
> [1  <text/plain; US-ASCII (quoted-printable)>]
> On Tue, 15 Oct 2019 09:49:26 -0400, John Covici wrote:
>
> > > > > Put this in /etc/portage/sets.conf
> > > > >
> > > > > [kernels]
> > > > > class = portage.sets.dbapi.OwnerSet
> > > > > world-candidate = False
> > > > > files = /usr/src
> > > > >
> > > > > Then "emerge -n @kernels"
> > > > >
> > > > > Now depclean won't try to remove any kernels, or any other package
> > > > > that installs files to /usr/src.    
> > > > Well, this didn't seem to work, when I tried to emerge -n @kernels
> > > > it said nothing to emerge, after the calculating, etc.  
> > >
> > > It won't emerge anything, that command adds the kernels set to
> > > world_sets.
> > > > and it certainly did not work.  
> > >
> > > As in depclean still wants to remove kernels? Or as in nothing
> > > /appeared/ to happen?  
> >
> > As in depclean still wants to remove kernels.
>
> Is @kernels in /var/lib/portage/world_sets?

That file is empty.

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
In reply to this post by Manuel McLure
On Tue, 15 Oct 2019 14:46:34 -0400,
Manuel McLure wrote:
>
> [1  <text/plain; UTF-8 (7bit)>]
> [2  <text/html; UTF-8 (quoted-printable)>]
> On Tue, Oct 15, 2019 at 11:05 AM Neil Bothwick <[hidden email]> wrote:
>
>  Is @kernels in /var/lib/portage/world_sets?
>
> I tested this and I found that the "emerge -n @kernels" did not add @kernels to /var/lib/portage/world_sets. However, if I manually edited world_sets and added @kernels then this works as expected.

Do I just add a line saying @kernels to that file or is there some
other syntax?

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Manuel McLure


On Tue, Oct 15, 2019 at 1:54 PM John Covici <[hidden email]> wrote:
Do I just add a line saying @kernels to that file or is there some
other syntax?

I just added a line with "@kernels" to that file.

--
Manuel A. McLure WW1FA <[hidden email]> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.                       -- H.P. Lovecraft
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
In reply to this post by John Covici
On Tue, 15 Oct 2019 16:53:10 -0400, John Covici wrote:

> >  Is @kernels in /var/lib/portage/world_sets?
> >
> > I tested this and I found that the "emerge -n @kernels" did not add
> > @kernels to /var/lib/portage/world_sets. However, if I manually
> > edited world_sets and added @kernels then this works as expected.  
>
> Do I just add a line saying @kernels to that file or is there some
> other syntax?

Just add @kernels on a line. The format of world_sets is like world,
except it contains set names rather than package names.


--
Neil Bothwick

New Klingon hair salon: "Today is a good day to dye"

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

John Covici
On Tue, 15 Oct 2019 19:19:45 -0400,
Neil Bothwick wrote:

>
> [1  <text/plain; US-ASCII (quoted-printable)>]
> On Tue, 15 Oct 2019 16:53:10 -0400, John Covici wrote:
>
> > >  Is @kernels in /var/lib/portage/world_sets?
> > >
> > > I tested this and I found that the "emerge -n @kernels" did not add
> > > @kernels to /var/lib/portage/world_sets. However, if I manually
> > > edited world_sets and added @kernels then this works as expected.  
> >
> > Do I just add a line saying @kernels to that file or is there some
> > other syntax?
>
> Just add @kernels on a line. The format of world_sets is like world,
> except it contains set names rather than package names.

Thanks much.  Now, what about depclean deleting packages where I have
the name in my world file, but no version numbers or anything, it
seems to want to delete what it maybe thinks are older versions even
if the "older" version is the only one installed?

--
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

Neil Bothwick
On Tue, 15 Oct 2019 19:41:14 -0400, John Covici wrote:

> Thanks much.  Now, what about depclean deleting packages where I have
> the name in my world file, but no version numbers or anything, it
> seems to want to delete what it maybe thinks are older versions even
> if the "older" version is the only one installed?

Can you post an example output from emerge, the eix entry from that
package and the entry in @world?


--
Neil Bothwick

Anything worth fighting for is worth fighting dirty for.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problems with depclean

J. Roeleveld
On 16 October 2019 09:33:29 CEST, Neil Bothwick <[hidden email]> wrote:
>On Tue, 15 Oct 2019 19:41:14 -0400, John Covici wrote:
>
>> Thanks much.  Now, what about depclean deleting packages where I have
>> the name in my world file, but no version numbers or anything, it
>> seems to want to delete what it maybe thinks are older versions even
>> if the "older" version is the only one installed?
>
>Can you post an example output from emerge, the eix entry from that
>package and the entry in @world?

Please also run "eix-update" before generating the eix output to ensure eix sees the same as emerge.

--
Joost
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

12