[gentoo-user] emerge all packages which depend on P : how to

2014-02-20 Thread Helmut Jarausch

Hi,

I have a very simple question. How to emerge (update) all packages  
which depend on some

given package P.

I've tried

emerge -uv1 `equery -q d P`

or  emerge -uv1 `qdepends -q -Q P`

but both commands (equery and qdepends) generate a list with the  
version attached like

  app-editors/kile-2.1.3
which emerge doesn't like (unless there is an '= in front of each name)

Is there an easy way to do so without resorting to shell/python  
scripting?


Many thanks for a hint,
Helmut



Re: [gentoo-user] emerge all packages which depend on P : how to

2014-02-20 Thread Randolph Maaßen
2014-02-20 13:38 GMT+01:00 Helmut Jarausch jarau...@igpm.rwth-aachen.de:
 Hi,

 I have a very simple question. How to emerge (update) all packages which
 depend on some
 given package P.

 I've tried

 emerge -uv1 `equery -q d P`

 or  emerge -uv1 `qdepends -q -Q P`

 but both commands (equery and qdepends) generate a list with the version
 attached like
   app-editors/kile-2.1.3
 which emerge doesn't like (unless there is an '= in front of each name)

 Is there an easy way to do so without resorting to shell/python scripting?

 Many thanks for a hint,
 Helmut


Hi, I just had a look on eix and figured out that eix --deps -# -I P
lists all packages in short for that are installed and have P in their
dependency variables plus the package itself.

Hope to help



-- 
Mit freundlichen Grüßen / Best regards

Randolph Maaßen



Re: [gentoo-user] emerge all packages which depend on P : how to

2014-02-20 Thread Neil Bothwick
On Thu, 20 Feb 2014 13:38:06 +0100, Helmut Jarausch wrote:

 I've tried
 
 emerge -uv1 `equery -q d P`
 
 or  emerge -uv1 `qdepends -q -Q P`
 
 but both commands (equery and qdepends) generate a list with the  
 version attached like
app-editors/kile-2.1.3
 which emerge doesn't like (unless there is an '= in front of each name)
 
 Is there an easy way to do so without resorting to shell/python  
 scripting?

Stripping the version, which you can do with qatom, is not a good idea
because it will only reinstall the newest version of any slotted
packages. Best to use sed to prefix each atom with =

emerge -1a $(qdepends -qQ P | sed 's/^/=/')

Also, the use of -u in your examples means currently installed packages
will not be re-emerged, unless a newer version is available.


-- 
Neil Bothwick

Monday is the root of all evil!


signature.asc
Description: PGP signature


Re: [gentoo-user] emerge all but...

2010-06-29 Thread Mark Knecht
On Mon, Jun 28, 2010 at 10:12 AM, Mark Knecht markkne...@gmail.com wrote:
 On Mon, Jun 28, 2010 at 9:55 AM,  meino.cra...@gmx.de wrote:
 Hi,

 is it possible to emerge all missing dependencies of a certain
 application without emerging the application itself? And: Will
 I hurt the system that way?

 Best regards,
 mcc

 ???

 emerge -DuN application

 ???

 What am I missing in the question?

 Test it on a clean app with no dependencies missing. It should emerge
 nothing. Then emerge -C one dependency and try it again. It should
 pick up that dependency but not emerge the app itself.

 You will not hurt your system doing that command.

 - Mark


I wanted to follow up on my somewhat cavalier comment a couple of days
ago about doing emerge -C on a dependency. It was a bad comment for me
to make without adding some discussion around it. This can actually
harm your system if you emerge -C the wrong dependency. For instance,
emerge -C gcc or python is likely a bad thing to do as you will be
unable to build anything to get the system fixed again. However emerge
-C jack-audio-connection-kit as a dependency for something like Ardour
wouldn't harm the system but would demonstrate what I was talking
about.

Any new user reading this thread at some future date should ensure
that (at a minimum) if they emerge -C anything at all that at least
it's not part of @system. emerge should warn of this but it's best to
do a little study before pushing the enter key.

Cheers,
Mark



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Dale

Mark Knecht wrote:

On Mon, Jun 28, 2010 at 10:12 AM, Mark Knechtmarkkne...@gmail.com  wrote:
   

On Mon, Jun 28, 2010 at 9:55 AM,meino.cra...@gmx.de  wrote:
 

Hi,

is it possible to emerge all missing dependencies of a certain
application without emerging the application itself? And: Will
I hurt the system that way?

Best regards,
mcc
   

???

emerge -DuN application

???

What am I missing in the question?

Test it on a clean app with no dependencies missing. It should emerge
nothing. Then emerge -C one dependency and try it again. It should
pick up that dependency but not emerge the app itself.

You will not hurt your system doing that command.

- Mark

 

I wanted to follow up on my somewhat cavalier comment a couple of days
ago about doing emerge -C on a dependency. It was a bad comment for me
to make without adding some discussion around it. This can actually
harm your system if you emerge -C the wrong dependency. For instance,
emerge -C gcc or python is likely a bad thing to do as you will be
unable to build anything to get the system fixed again. However emerge
-C jack-audio-connection-kit as a dependency for something like Ardour
wouldn't harm the system but would demonstrate what I was talking
about.

Any new user reading this thread at some future date should ensure
that (at a minimum) if they emerge -C anything at all that at least
it's not part of @system. emerge should warn of this but it's best to
do a little study before pushing the enter key.

Cheers,
Mark

   


It is good that you explained that more.  I thought about the same thing 
but thought maybe I was missing something that was mentioned earlier in 
another message.


I wouldn't always count on portage warning before removing a system 
package tho.  I tested this by trying to remove python and portage said 
nothing it doesn't say on any other package even one in the world file.  
Future users may want to ask first either here or on the forums before 
removing something that may be questionable.


It may not be a bad idea for a thread with packages that should never be 
removed.  Things such as gcc, python, baselayout etc.  Maybe a user 
would find that and at least have a general guide.  I also think it 
would be a good idea to have the same on the forums as a sticky thread 
that the mods can edit from time to time.


Dale

:-)  :-)



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Mark Knecht
On Tue, Jun 29, 2010 at 8:14 AM, Dale rdalek1...@gmail.com wrote:
 Mark Knecht wrote:

 On Mon, Jun 28, 2010 at 10:12 AM, Mark Knechtmarkkne...@gmail.com
  wrote:


 On Mon, Jun 28, 2010 at 9:55 AM,meino.cra...@gmx.de  wrote:


 Hi,

 is it possible to emerge all missing dependencies of a certain
 application without emerging the application itself? And: Will
 I hurt the system that way?

 Best regards,
 mcc


 ???

 emerge -DuN application

 ???

 What am I missing in the question?

 Test it on a clean app with no dependencies missing. It should emerge
 nothing. Then emerge -C one dependency and try it again. It should
 pick up that dependency but not emerge the app itself.

 You will not hurt your system doing that command.

 - Mark



 I wanted to follow up on my somewhat cavalier comment a couple of days
 ago about doing emerge -C on a dependency. It was a bad comment for me
 to make without adding some discussion around it. This can actually
 harm your system if you emerge -C the wrong dependency. For instance,
 emerge -C gcc or python is likely a bad thing to do as you will be
 unable to build anything to get the system fixed again. However emerge
 -C jack-audio-connection-kit as a dependency for something like Ardour
 wouldn't harm the system but would demonstrate what I was talking
 about.

 Any new user reading this thread at some future date should ensure
 that (at a minimum) if they emerge -C anything at all that at least
 it's not part of @system. emerge should warn of this but it's best to
 do a little study before pushing the enter key.

 Cheers,
 Mark



 It is good that you explained that more.  I thought about the same thing but
 thought maybe I was missing something that was mentioned earlier in another
 message.

 I wouldn't always count on portage warning before removing a system package
 tho.  I tested this by trying to remove python and portage said nothing it
 doesn't say on any other package even one in the world file.  Future users
 may want to ask first either here or on the forums before removing something
 that may be questionable.

 It may not be a bad idea for a thread with packages that should never be
 removed.  Things such as gcc, python, baselayout etc.  Maybe a user would
 find that and at least have a general guide.  I also think it would be a
 good idea to have the same on the forums as a sticky thread that the mods
 can edit from time to time.

 Dale

Dale,
   The last thing I want to do is cause anyone any trouble. From that
point it's easier to just stay quiet all the time and let others more
experienced than myself answer all the questions. However I don't
really want to act that way - taking and never giving.

   I like your idea about lists of packages that should never be
removed. Personally I think a doc doc page somewhere in the
install/maintenance doc group would be good but it would need to be
well maintained. Understanding the absolute minimum number of things
that are required to use emerge and get a package built would be a
good doc, if it doesn't exist somewhere already.

   Personally I'm never 100% sure about anything that's not an
application package I installed myself and is sitting in the world
file. I suspect others - possibly you included - have similar fears at
times.

Cheers,
Mark



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Dale

Mark Knecht wrote:

On Tue, Jun 29, 2010 at 8:14 AM, Dalerdalek1...@gmail.com  wrote:
   

Mark Knecht wrote:
 

On Mon, Jun 28, 2010 at 10:12 AM, Mark Knechtmarkkne...@gmail.com
  wrote:

   

On Mon, Jun 28, 2010 at 9:55 AM,meino.cra...@gmx.dewrote:

 

Hi,

is it possible to emerge all missing dependencies of a certain
application without emerging the application itself? And: Will
I hurt the system that way?

Best regards,
mcc

   

???

emerge -DuN application

???

What am I missing in the question?

Test it on a clean app with no dependencies missing. It should emerge
nothing. Then emerge -C one dependency and try it again. It should
pick up that dependency but not emerge the app itself.

You will not hurt your system doing that command.

- Mark


 

I wanted to follow up on my somewhat cavalier comment a couple of days
ago about doing emerge -C on a dependency. It was a bad comment for me
to make without adding some discussion around it. This can actually
harm your system if you emerge -C the wrong dependency. For instance,
emerge -C gcc or python is likely a bad thing to do as you will be
unable to build anything to get the system fixed again. However emerge
-C jack-audio-connection-kit as a dependency for something like Ardour
wouldn't harm the system but would demonstrate what I was talking
about.

Any new user reading this thread at some future date should ensure
that (at a minimum) if they emerge -C anything at all that at least
it's not part of @system. emerge should warn of this but it's best to
do a little study before pushing the enter key.

Cheers,
Mark


   

It is good that you explained that more.  I thought about the same thing but
thought maybe I was missing something that was mentioned earlier in another
message.

I wouldn't always count on portage warning before removing a system package
tho.  I tested this by trying to remove python and portage said nothing it
doesn't say on any other package even one in the world file.  Future users
may want to ask first either here or on the forums before removing something
that may be questionable.

It may not be a bad idea for a thread with packages that should never be
removed.  Things such as gcc, python, baselayout etc.  Maybe a user would
find that and at least have a general guide.  I also think it would be a
good idea to have the same on the forums as a sticky thread that the mods
can edit from time to time.

Dale
 

Dale,
The last thing I want to do is cause anyone any trouble. From that
point it's easier to just stay quiet all the time and let others more
experienced than myself answer all the questions. However I don't
really want to act that way - taking and never giving.

I like your idea about lists of packages that should never be
removed. Personally I think a doc doc page somewhere in the
install/maintenance doc group would be good but it would need to be
well maintained. Understanding the absolute minimum number of things
that are required to use emerge and get a package built would be a
good doc, if it doesn't exist somewhere already.

Personally I'm never 100% sure about anything that's not an
application package I installed myself and is sitting in the world
file. I suspect others - possibly you included - have similar fears at
times.

Cheers,
Mark

   


I know there are times when I don't say anything because I am unsure 
about the answer.  If I do say something, I usually say I'm not sure or 
something to that effect.  Like you, I never want to make matters worse 
than they already are for someone.  I wouldn't want someone to do me 
that way either.


I mentioned this on -dev once when this topic came up.  Thing is, 
portage is not the only package manager being used.  Personally I think 
portage should be the official package manager and if you chose to use 
something else, you should know what not to do to the system.  Portage 
requires python but I think one of the other package managers uses C or 
something.  Remove C on my rig, no big deal as far as being able to boot 
and re-emerge a package.  Do it on a system with some other package 
manager and you are in a mess.  Point being, it's sort of hard for them 
to list them since it depends on what package manager you are using.


There are some packages I installed and still don't know much about.  
lol   Sort of funny in a way.  Most of them just work so we don't need 
to know much about them.


Dale

:-)  :-)



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Mark Knecht
On Tue, Jun 29, 2010 at 9:40 AM, Dale rdalek1...@gmail.com wrote:
SNIP

 I mentioned this on -dev once when this topic came up.  Thing is, portage is
 not the only package manager being used.

That's an important point.

 Personally I think portage should
 be the official package manager and if you chose to use something else, you
 should know what not to do to the system.

Unofficially I think it is! ;-)

 Portage requires python but I
 think one of the other package managers uses C or something.  Remove C on my
 rig, no big deal as far as being able to boot and re-emerge a package.

Careful. Can you really emerge gcc without at least one version of gcc
on the system? I didn't think so unless you've got access to a binary
somewhere, such as the install tarball or something like that. Even
that could be a problem. I did some cleanup a few years ago that
removed an old version of gcc and found I couldn't build anything
anymore. Embarrassing!

 Do
 it on a system with some other package manager and you are in a mess.  Point
 being, it's sort of hard for them to list them since it depends on what
 package manager you are using.


True, and a more experienced user can use equery, among other tools,
to determine what dependencies a package has. Problem was my previous
answer didn't mention that.

 There are some packages I installed and still don't know much about.  lol
 Sort of funny in a way.  Most of them just work so we don't need to know
 much about them.

Actually, for me it's _most_ packages I know NOTHING about. This
machine has XFCE, Gnome and KDE. It has only 38 packages in the world
file and yet emerge -e @world would build 970 packages. That's a LOT
of unknown stuff for a user type like me to know anything about! (Or
honestly, I probably know _NOTHING_ at all about at least 900 of those
packages...)

Cheers,
Mark



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Neil Bothwick
On Tue, 29 Jun 2010 11:40:56 -0500, Dale wrote:

 I mentioned this on -dev once when this topic came up.  Thing is, 
 portage is not the only package manager being used.  Personally I think 
 portage should be the official package manager and if you chose to use 
 something else, you should know what not to do to the system.

That's restrictive and un-Gentoo-like. The official package manager is
anything that follows the EAPI specs.

 Portage 
 requires python but I think one of the other package managers uses C or 
 something.  Remove C on my rig, no big deal as far as being able to
 boot and re-emerge a package.  Do it on a system with some other
 package manager and you are in a mess.  Point being, it's sort of hard
 for them to list them since it depends on what package manager you are
 using.

That's a slightly different issue. No, portage isn't in @system directly,
but it is part of a list of package managers, one of which must be
installed, and Python is a dependency of that, so a warning would be
reasonable if you were using portage to do the unmerging. However, emerge
-C does warn against its use these days, and you shouldn't really use it
on anything that is not in @world.


-- 
Neil Bothwick

TEXAS VIRUS: Makes sure that it's bigger than any other file.


signature.asc
Description: PGP signature


Re: [gentoo-user] emerge all but...

2010-06-29 Thread Alan McKinnon
On Tuesday 29 June 2010 20:08:34 Neil Bothwick wrote:
  I mentioned this on -dev once when this topic came up.  Thing is, 
  portage is not the only package manager being used.  Personally I think 
  portage should be the official package manager and if you chose to use 
  something else, you should know what not to do to the system.
 
 That's restrictive and un-Gentoo-like. The official package manager is
 anything that follows the EAPI specs.


I wholeheartedly agree. There shouldn't even BE such a thing as a standard 
package manager, there should only be standards. Otherwise you get into the 
standard being

whatever portage is doing today - a moving target at best


-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] emerge all but...

2010-06-29 Thread Dale

Mark Knecht wrote:

On Tue, Jun 29, 2010 at 9:40 AM, Dalerdalek1...@gmail.com  wrote:
SNIP

   

I mentioned this on -dev once when this topic came up.  Thing is, portage is
not the only package manager being used.
 

That's an important point.

   

Personally I think portage should
be the official package manager and if you chose to use something else, you
should know what not to do to the system.
 

Unofficially I think it is! ;-)
   


Going by a few folks on -dev, I sometimes wonder if portage even 
exists.  Sort of making a mountain out of a mole hill there.



   

Portage requires python but I
think one of the other package managers uses C or something.  Remove C on my
rig, no big deal as far as being able to boot and re-emerge a package.
 

Careful. Can you really emerge gcc without at least one version of gcc
on the system? I didn't think so unless you've got access to a binary
somewhere, such as the install tarball or something like that. Even
that could be a problem. I did some cleanup a few years ago that
removed an old version of gcc and found I couldn't build anything
anymore. Embarrassing!
   


Most likely not but you can't emerge anything without python either.  
Yet some have emerge -C python a few times.  I read where one even 
removed portage.  I'm not sure how a person can think portage will work 
if you remove it.  o_O



   

Do
it on a system with some other package manager and you are in a mess.  Point
being, it's sort of hard for them to list them since it depends on what
package manager you are using.

 

True, and a more experienced user can use equery, among other tools,
to determine what dependencies a package has. Problem was my previous
answer didn't mention that.
   


Ahhh, but equery  isn't always right either.  That has been shown on 
this list before.  It's a good tool but I wouldn't want to put my life 
in its hands.


   

There are some packages I installed and still don't know much about.  lol
Sort of funny in a way.  Most of them just work so we don't need to know
much about them.
 

Actually, for me it's _most_ packages I know NOTHING about. This
machine has XFCE, Gnome and KDE. It has only 38 packages in the world
file and yet emerge -e @world would build 970 packages. That's a LOT
of unknown stuff for a user type like me to know anything about! (Or
honestly, I probably know _NOTHING_ at all about at least 900 of those
packages...)

Cheers,
Mark

   


I got more in my world file but you have more packages.  Sort of odd in 
a way.


Packages installed:   945
Packages in world:76
Packages in system:   50

Dale

:-)  :-)



[gentoo-user] emerge all but...

2010-06-28 Thread meino . cramer
Hi,

is it possible to emerge all missing dependencies of a certain
application without emerging the application itself? And: Will
I hurt the system that way?

Best regards,
mcc






Re: [gentoo-user] emerge all but...

2010-06-28 Thread Mark Knecht
On Mon, Jun 28, 2010 at 9:55 AM,  meino.cra...@gmx.de wrote:
 Hi,

 is it possible to emerge all missing dependencies of a certain
 application without emerging the application itself? And: Will
 I hurt the system that way?

 Best regards,
 mcc

???

emerge -DuN application

???

What am I missing in the question?

Test it on a clean app with no dependencies missing. It should emerge
nothing. Then emerge -C one dependency and try it again. It should
pick up that dependency but not emerge the app itself.

You will not hurt your system doing that command.

- Mark



Re: [gentoo-user] emerge all but...

2010-06-28 Thread meino . cramer
Mark Knecht markkne...@gmail.com [10-06-28 19:16]:
 On Mon, Jun 28, 2010 at 9:55 AM,  meino.cra...@gmx.de wrote:
  Hi,
 
  is it possible to emerge all missing dependencies of a certain
  application without emerging the application itself? And: Will
  I hurt the system that way?
 
  Best regards,
  mcc
 
 ???
 
 emerge -DuN application
 
 ???
 
 What am I missing in the question?
 
 Test it on a clean app with no dependencies missing. It should emerge
 nothing. Then emerge -C one dependency and try it again. It should
 pick up that dependency but not emerge the app itself.
 
 You will not hurt your system doing that command.
 
 - Mark
 

Hi Mark,

thanks a lot!

You helped me!
Best regards,
mcc




Re: [gentoo-user] emerge all but...

2010-06-28 Thread Mark Knecht
On Mon, Jun 28, 2010 at 10:43 AM,  meino.cra...@gmx.de wrote:
 Mark Knecht markkne...@gmail.com [10-06-28 19:16]:
 On Mon, Jun 28, 2010 at 9:55 AM,  meino.cra...@gmx.de wrote:
  Hi,
 
  is it possible to emerge all missing dependencies of a certain
  application without emerging the application itself? And: Will
  I hurt the system that way?
 
  Best regards,
  mcc

 ???

 emerge -DuN application

 ???

 What am I missing in the question?

 Test it on a clean app with no dependencies missing. It should emerge
 nothing. Then emerge -C one dependency and try it again. It should
 pick up that dependency but not emerge the app itself.

 You will not hurt your system doing that command.

 - Mark


 Hi Mark,

 thanks a lot!

 You helped me!
 Best regards,
 mcc

:-)

Glad it was easy!

Cheers,
Mark



Re: [gentoo-user] emerge all but...

2010-06-28 Thread Crístian Viana
wouldn't it be:

emerge -o package

?

emerge -DuN package _will_ install the package itself.

On Mon, Jun 28, 2010 at 2:12 PM, Mark Knecht markkne...@gmail.com wrote:

 On Mon, Jun 28, 2010 at 9:55 AM,  meino.cra...@gmx.de wrote:
  Hi,
 
  is it possible to emerge all missing dependencies of a certain
  application without emerging the application itself? And: Will
  I hurt the system that way?
 
  Best regards,
  mcc

 ???

 emerge -DuN application

 ???

 What am I missing in the question?

 Test it on a clean app with no dependencies missing. It should emerge
 nothing. Then emerge -C one dependency and try it again. It should
 pick up that dependency but not emerge the app itself.

 You will not hurt your system doing that command.

 - Mark




Re: [gentoo-user] emerge all but...

2010-06-28 Thread Mark Knecht
On Mon, Jun 28, 2010 at 6:33 PM, Crístian Viana
cristiandei...@gmail.com wrote:
 wouldn't it be:
 emerge -o package
 ?

No, I believe that would emerge the package _without_ emerging the
dependencies. If I understood the OP's original question he wanted to
make sure package dependencies were emerged if missing for some
reason. (For instance, he's done an emerge --depclean and it cleaned
out something that he still needs.)

Cheers,
Mark



Re: [gentoo-user] emerge all but...

2010-06-28 Thread Mark Knecht
On Mon, Jun 28, 2010 at 6:43 PM, Mark Knecht markkne...@gmail.com wrote:
 On Mon, Jun 28, 2010 at 6:33 PM, Crístian Viana
 cristiandei...@gmail.com wrote:
 wouldn't it be:
 emerge -o package
 ?

 No, I believe that would emerge the package _without_ emerging the
 dependencies. If I understood the OP's original question he wanted to
 make sure package dependencies were emerged if missing for some
 reason. (For instance, he's done an emerge --depclean and it cleaned
 out something that he still needs.)

 Cheers,
 Mark


Oops! My mistake. I was looking at capital O, not lower case o.

Yes, according to the man page your solution would work also.

Cheers,
Mark