Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to find all emerged packages at version 9999?
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
jeffk
Guru
Guru


Joined: 13 Sep 2003
Posts: 568

PostPosted: Wed Jan 20, 2010 4:46 pm    Post subject: How to find all emerged packages at version 9999? Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 6594
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 20, 2010 4:50 pm    Post subject: Reply with quote

Code:
equery list -i | grep -e -9999
:)

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8869
Location: beyond the rim

PostPosted: Wed Jan 20, 2010 4:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 6594
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 20, 2010 4:56 pm    Post subject: Reply with quote

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


Joined: 19 Dec 2002
Posts: 4389
Location: Suzhou, China

PostPosted: Wed Jan 20, 2010 4:57 pm    Post subject: Reply with quote

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


Joined: 13 Sep 2003
Posts: 568

PostPosted: Thu Jan 21, 2010 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Jan 21, 2010 5:02 am    Post subject: Reply with quote

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


Joined: 25 Apr 2005
Posts: 13034
Location: Ste-Foy,Canada

PostPosted: Thu Jan 21, 2010 12:49 pm    Post subject: Reply with quote

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


Joined: 18 Apr 2007
Posts: 176
Location: Toronto, ON, Canada

PostPosted: Wed Sep 12, 2012 2:04 am    Post subject: Reply with quote

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


Joined: 18 Apr 2007
Posts: 176
Location: Toronto, ON, Canada

PostPosted: Wed Sep 12, 2012 2:08 am    Post subject: Reply with quote

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


Joined: 22 Mar 2006
Posts: 4763

PostPosted: Wed Sep 12, 2012 2:29 am    Post subject: Reply with quote

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


Joined: 18 Apr 2007
Posts: 176
Location: Toronto, ON, Canada

PostPosted: Wed Sep 12, 2012 2:39 am    Post subject: Reply with quote

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


Joined: 22 Mar 2006
Posts: 4763

PostPosted: Wed Sep 12, 2012 3:14 am    Post subject: Reply with quote

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


Joined: 18 Apr 2007
Posts: 176
Location: Toronto, ON, Canada

PostPosted: Wed Sep 12, 2012 3:22 am    Post subject: Reply with quote

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


Joined: 22 Mar 2006
Posts: 4763

PostPosted: Wed Sep 12, 2012 5:05 am    Post subject: Reply with quote

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


Joined: 18 Apr 2009
Posts: 1990
Location: UK

PostPosted: Wed Sep 12, 2012 12:00 pm    Post subject: Reply with quote

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


Joined: 26 Dec 2004
Posts: 3067

PostPosted: Wed Sep 12, 2012 3:02 pm    Post subject: Reply with quote

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


Joined: 07 Jun 2012
Posts: 1307

PostPosted: Thu Sep 13, 2012 1:15 am    Post subject: Reply with quote

.... or similarly with awk ...

Code:
emerge -pv $(awk '{print "=" $1}' <(qlist -ICv 9999))

best ... khay
Back to top
View user's profile Send private message
proteusx
n00b
n00b


Joined: 21 Jan 2008
Posts: 29

PostPosted: Thu Sep 13, 2012 11:55 am    Post subject: Reply with quote

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:
Code:
emerge -pv @p-9999
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