Gentoo Forums
Gentoo Forums
Quick Search: in
listing installed pkgs - qpkg replacement needed
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dirtyepic
Developer
Developer


Joined: 22 Oct 2004
Posts: 1549
Location: sk.ca

PostPosted: Thu Apr 28, 2005 2:43 am    Post subject: listing installed pkgs - qpkg replacement needed Reply with quote

hi.

emerge sometimes does a subpar job in checking packages for upgrades because it uses a combination of the depend hierarchy and the world file to crawl the package list. often packages go unnoticed that have updates available and for some reason 'emerge -Dtv world' and 'emerge -Dtvu world' usually give very different results.

in the past i've used this one-liner to check every package on my system for updates:

Code:
emerge -up --nodeps $(qpkg -I -nc | awk '{printf $1 " "}')


since qpkg has been depreciated, i'd like to try and replace it with something else. equery doesn't seem to provide this function and i don't know bash well enough to do this and keep it simple. does anyone know a quick, simple way to list all installed packages?
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
dmitchell
l33t
l33t


Joined: 17 May 2003
Posts: 958
Location: Austin, Texas

PostPosted: Thu Apr 28, 2005 3:09 am    Post subject: Reply with quote

equery list. (Unfortunately rather slow.)
_________________
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
Back to top
View user's profile Send private message
dirtyepic
Developer
Developer


Joined: 22 Oct 2004
Posts: 1549
Location: sk.ca

PostPosted: Thu Apr 28, 2005 2:24 pm    Post subject: Reply with quote

oh, i didn't know you could leave out the pkgspec. :idea: you're right though, way too slow.

this is what i came up with after poking around in qpkg.

Code:
#!/bin/bash
#
# checkup - check for upgraded packages emerge may have missed.

emerge -up --nodeps $( find /var/db/pkg/ -iname "*.ebuild" \
    | cut -f5,7 -d/ \
    | sed -e 's:\.ebuild$::; s:-r[0-9]*$::; s:-[^-]*$::; /^$/d' \
    | sort \
    | uniq )


it seems to work. i'm not sure if it'll catch package names that end in a number (libstdc++v3).
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
nelchael
Developer
Developer


Joined: 20 Mar 2004
Posts: 1945
Location: /dev/drzewo

PostPosted: Thu Apr 28, 2005 2:54 pm    Post subject: Reply with quote

danmitchell wrote:
equery list. (Unfortunately rather slow.)

Or:
Code:
eix -Icn | col -b | egrep '\[.*\]' | awk '{print $3}'

_________________
http://dev.gentoo.org/~nelchael/

>> Zasady na f.g.o->Polish <<
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 - 5 Hours
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