| View previous topic :: View next topic |
| Author |
Message |
jeffk Guru

Joined: 13 Sep 2003 Posts: 568
|
Posted: Wed Jan 20, 2010 4:46 pm Post subject: How to find all emerged packages at version 9999? |
|
|
Is there an efficient way to find all emerged packages at version 9999?
I lose track of seldom-used ones, and would like the list so I can remind myself to update periodically, or downgrade to a stable release version.
Thanks. |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 6594 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jan 20, 2010 4:50 pm Post subject: |
|
|
| Code: | | equery list -i | grep -e -9999 |
- John _________________ This space intentionally left blank. |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8869 Location: beyond the rim
|
Posted: Wed Jan 20, 2010 4:53 pm Post subject: |
|
|
| john_r_graham wrote: | | Code: | | equery list -i | grep -e -9999 | |
Did you test that? I've alwys had trouble when grepping for something starting with - (as grep treats it as an option). Not that it really matters here. |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 6594 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jan 20, 2010 4:56 pm Post subject: |
|
|
Yes, I did. That's what the -e does: enables patterns to start with a dash. However, upon further inspection, the search pattern is overly restrictive as some live ebuilds have versions of the form "x.y.9999", so, as the pattern has changed, you no longer need the -e: | Code: | | equery list -i | grep \[-.\]9999 | - John _________________ This space intentionally left blank.
Last edited by John R. Graham on Wed Jan 20, 2010 4:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
yngwin Developer


Joined: 19 Dec 2002 Posts: 4389 Location: Suzhou, China
|
Posted: Wed Jan 20, 2010 4:57 pm Post subject: |
|
|
I think what you want is a feature that is already implemented in portage-2.2:
| Code: | | emerge -a @live-rebuild |
_________________ "Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF |
|
| Back to top |
|
 |
jeffk Guru

Joined: 13 Sep 2003 Posts: 568
|
Posted: Thu Jan 21, 2010 4:37 am Post subject: |
|
|
The behavior of equery list apparently has changed:
| Code: | # equery list -i | grep -e -9999
!!! Default action for this module has changed in Gentoolkit 0.3.
!!! Use globbing to simulate the old behavior (see man equery).
!!! Use '*' to check all installed packages.
!!! Use 'foo-bar/*' to filter by category.
# equery list '*' | grep -e -9999 |
Thanks, this worked to produce the list I need. I'll probably start using the @live-rebuild set going forward. |
|
| Back to top |
|
 |
Mike Hunt Watchman


Joined: 19 Jul 2009 Posts: 5287
|
Posted: Thu Jan 21, 2010 5:02 am Post subject: |
|
|
| Code: | # time equery list '*' | grep -e -9999
app-text/scrollkeeper-9999-r1
real 0m7.224s
user 0m7.073s
sys 0m0.141s
# time qlist -Iv 9999
app-text/scrollkeeper-9999-r1
real 0m0.022s
user 0m0.018s
sys 0m0.001s |
qlist is from app-portage/portage-utils |
|
| Back to top |
|
 |
d2_racing Moderator


Joined: 25 Apr 2005 Posts: 13034 Location: Ste-Foy,Canada
|
Posted: Thu Jan 21, 2010 12:49 pm Post subject: |
|
|
In fact qlist handle pretty well that kind of stuff. _________________ Sysadmin of GentooQuébec.org
Wiki
Signature
IRC on Freenode : #gentoo-quebec |
|
| Back to top |
|
 |
MarcusXP Apprentice

Joined: 18 Apr 2007 Posts: 176 Location: Toronto, ON, Canada
|
Posted: Wed Sep 12, 2012 2:04 am Post subject: |
|
|
I know its an old topic but I am trying to achieve the same thing...
actually I want to run a command to update all my 9999 packages...
I tried this, but doesn't work:
| Code: | Storage ~ # emerge -av $(qlist -Iv 9999)
!!! 'net-libs/libktorrent-9999' is not a valid package atom.
!!! Please check ebuild(5) for full details. |
this is what "qlist -Iv 9999" returns:
| Code: | Storage ~ # qlist -Iv 9999
net-libs/libktorrent-9999
net-p2p/ktorrent-9999 |
everything seems right, but emerge doesn't like it... any ideas how to make it work? I think I may have to remove -9999 from every line so that emerge will work, but I'm not sure how to do that  |
|
| Back to top |
|
 |
MarcusXP Apprentice

Joined: 18 Apr 2007 Posts: 176 Location: Toronto, ON, Canada
|
Posted: Wed Sep 12, 2012 2:08 am Post subject: |
|
|
I found this command on another thread, it seems to be working fine:
emerge -av `find /var/db/pkg/ -mindepth 2 -maxdepth 2 -name \*-9999|awk -F \/ '{printf "=%s/%s ", $5, $6}'`
however, using "qlist -Iv" should be fater than this (which uses the find command on the filesystem), any suggestions how to make that work? |
|
| Back to top |
|
 |
DaggyStyle Advocate


Joined: 22 Mar 2006 Posts: 4763
|
Posted: Wed Sep 12, 2012 2:29 am Post subject: |
|
|
| MarcusXP wrote: | I know its an old topic but I am trying to achieve the same thing...
actually I want to run a command to update all my 9999 packages...
I tried this, but doesn't work:
| Code: | Storage ~ # emerge -av $(qlist -Iv 9999)
!!! 'net-libs/libktorrent-9999' is not a valid package atom.
!!! Please check ebuild(5) for full details. |
this is what "qlist -Iv 9999" returns:
| Code: | Storage ~ # qlist -Iv 9999
net-libs/libktorrent-9999
net-p2p/ktorrent-9999 |
everything seems right, but emerge doesn't like it... any ideas how to make it work? I think I may have to remove -9999 from every line so that emerge will work, but I'm not sure how to do that  |
did you tried smart-live-rebuild? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball |
|
| Back to top |
|
 |
MarcusXP Apprentice

Joined: 18 Apr 2007 Posts: 176 Location: Toronto, ON, Canada
|
Posted: Wed Sep 12, 2012 2:39 am Post subject: |
|
|
I had no idea this command existed
Yet it does.. and seems useful.. thanks for the tip!
Anyways, I figured how to use qlist in the meanwhile.. for whom it may still be interested:
| Code: | | emerge -av $(qlist -ICv 9999 | sed 's/.....$//') |
|
|
| Back to top |
|
 |
DaggyStyle Advocate


Joined: 22 Mar 2006 Posts: 4763
|
Posted: Wed Sep 12, 2012 3:14 am Post subject: |
|
|
check qatom instead of sed. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball |
|
| Back to top |
|
 |
MarcusXP Apprentice

Joined: 18 Apr 2007 Posts: 176 Location: Toronto, ON, Canada
|
Posted: Wed Sep 12, 2012 3:22 am Post subject: |
|
|
Good suggestion, I didn't know about this command either.
However, it seems that it requires a bit more work than using sed... because it splits the whole package name in three, so I have to use the middle one or join the first two, with "/" between them...
| Code: | Storage ~ # qatom $(qlist -ICv 9999)
net-libs libktorrent 9999
net-p2p ktorrent 9999 |
|
|
| Back to top |
|
 |
DaggyStyle Advocate


Joined: 22 Mar 2006 Posts: 4763
|
Posted: Wed Sep 12, 2012 5:05 am Post subject: |
|
|
| MarcusXP wrote: | Good suggestion, I didn't know about this command either.
However, it seems that it requires a bit more work than using sed... because it splits the whole package name in three, so I have to use the middle one or join the first two, with "/" between them...
| Code: | Storage ~ # qatom $(qlist -ICv 9999)
net-libs libktorrent 9999
net-p2p ktorrent 9999 |
|
how about
| Code: | | qatom $(qlist -ICv 9999) | awk '{ print "$1/$2"}' |
? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball |
|
| Back to top |
|
 |
Ant P. Veteran

Joined: 18 Apr 2009 Posts: 1990 Location: UK
|
Posted: Wed Sep 12, 2012 12:00 pm Post subject: |
|
|
| Depending on how far you're willing to diverge from vanilla portage, paludis has a "--reinstall-scm" switch built in too (which also catches -99999999 versions and is smart about only rebuilding once a day/week). |
|
| Back to top |
|
 |
ppurka Advocate

Joined: 26 Dec 2004 Posts: 3067
|
Posted: Wed Sep 12, 2012 3:02 pm Post subject: |
|
|
Why remove the 9999 stuff? Simply prepend with =  | Code: | | emerge -p $(qlist -ICv 9999 | sed 's/^/=/') | But I don't seem to have @smart-live-rebuild. I do have @live-rebuild in portage-2.2 _________________ emerge --quiet redefined | E17 vids: I, II |
|
| Back to top |
|
 |
khayyam Veteran


Joined: 07 Jun 2012 Posts: 1307
|
Posted: Thu Sep 13, 2012 1:15 am Post subject: |
|
|
.... or similarly with awk ...
| Code: | | emerge -pv $(awk '{print "=" $1}' <(qlist -ICv 9999)) |
best ... khay |
|
| Back to top |
|
 |
proteusx n00b

Joined: 21 Jan 2008 Posts: 29
|
Posted: Thu Sep 13, 2012 11:55 am Post subject: |
|
|
| Code: | | emerge -vp @live-rebuild | misses some items.
e.g.
dev-perl/File-Slurp-9999.190.0
app-text/scrollkeeper-9999-r1
So I created my own set with the 9999 packages:
| Code: | | qlist -ICv 9999 | sed 's/^/=/' > /etc/portage/sets/p-9999 |
Then to update:
|
|
| Back to top |
|
 |
|