Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Package summaries, versions etc.
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
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue Aug 15, 2017 3:07 am    Post subject: Package summaries, versions etc. Reply with quote

I've been running into this problem of not being able to consistently predict which packages are going to be updated and when.

Does anyone know how to tell portage to display all the packages that versions do not match to the repo's (gentoo or otherwise) most current number...I would be very appreciative thanks
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Tue Aug 15, 2017 4:13 am    Post subject: Reply with quote

Packages get updated all the time at various rates. So it is difficult to know when something is going to be updated. The stable profile tends to be slow on updating, so it doesn't change too often compared to unstable branch. A lot of the time, you end up

Beyond that portage will tell you want version it wants to update to when you use the -a (asks before continueing) or -p (only tells you what it is going to do, but doesn't perform it) options. In general you should always pay attention to what portage wants to do, to catch it when it tries doing something you don't want it to do). The -u option tells it to update the system, and the -D tells it to look at the package dependencies too.

So you generally use something like
Code:
emerge -avuD world


The -v, just tells portage to be verbose (shows you the package USE flags).
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue Aug 15, 2017 4:30 am    Post subject: Reply with quote

Very familiar with this technique, but it's exactly what I'm trying to get around. I am under the impression that Portage will just do what you tell it to do. If by updating the @world set it won't continue to look further than those packages and the dependencies of...what I want to know is about all the installed packages on my disk...not just the ones that emerge can find, but still in an output of something nice like the way emerge prints it would be great.


Please help me out...I would like to begin by knowing (1) package versions for all installed packages installed -- this seems very possible with equery and then (2) provide further querying of the packages from there against the portage tree...this is where a scripted solution would be ideal, but I don't really have that much experience with any one tool or language.

I do however like the way that Emerge sorts the output for the package versions of both currently installed and further on versions.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Tue Aug 15, 2017 4:41 am    Post subject: Reply with quote

It's kindof crude but maybe this is a start of what you're looking for:
Code:
for p in $(equery list '*') ; do equery list -p ">=$p" ; done

Note it's hard to ^C interrupt, it might do better in a script with a trap or something. As it is, ^Z to stop and kill %1
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Tue Aug 15, 2017 4:42 am    Post subject: Reply with quote

Also I wouldn't be surprised if eix can already do this.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue Aug 15, 2017 6:05 am    Post subject: Reply with quote

Code worked great, thanks. How would I do one of these two things:

1) run the code (a bit differently with no "=" (equal) but also suppress the messages see below...

Quote:
Code: for p in $(equery list '*') ; do equery list -p ">$p" ; done
Code:

 !!! No packages matching '>x11-themes/gnome-themes-standard-3.22.3'
 * Searching for gnome-themes-standard3.22.3 in x11-themes ...
!!! No packages matching '>x11-themes/gtk-engines-adwaita-3.22.3'
 * Searching for gtk-engines-adwaita3.22.3 in x11-themes ...
!!! No packages matching '>x11-themes/hicolor-icon-theme-0.15'
 * Searching for hicolor-icon-theme0.15 in x11-themes ...
!!! No packages matching '>x11-themes/slim-themes-1.2.3a-r7'
 * Searching for slim-themes1.2.3a-r7 in x11-themes ...
 * Searching for awesome3.5.6-r2 in x11-wm ...
[-P-] [ ~] x11-wm/awesome-3.5.7:0
[-P-] [ ~] x11-wm/awesome-3.5.8:0
[-P-] [ ~] x11-wm/awesome-3.5.9:0
[-P-] [ ~] x11-wm/awesome-4.0:0
[-P-] [ ~] x11-wm/awesome-4.0-r1:0
[-P-] [ ~] x11-wm/awesome-4.1:0
[-P-] [ ~] x11-wm/awesome-4.2:0
[-P-] [ -] x11-wm/awesome-9999:0
 * Searching for enlightenment1.0.17 in x11-wm ...
 * Searching for fluxbox1.3.7-r3 in x11-wm ...
[-P-] [ ~] x11-wm/fluxbox-1.3.7-r4:0
[-P-] [ -] x11-wm/fluxbox-9999:0
 * Searching for i34.13-r1 in x11-wm ...
[-P-] [ -] x11-wm/i3-9999:0



OR


(2) have another way to output just the lines that have packages that need updating, and remove the rest of the output

Thanks by the way, but I don't want to leave the discussion short, so the prize if I can get it to that point will be to have the output of the code you made, get compared to the original package list somehow, the one that is outputted when just running equery with the --list '*' (list all). There's probably good reason for me to be figuring out som of this myself, though, but would just like your thoughts on it since it is already started in a sense. What I kind of want is a database of all the packages (easy), that then updates automatically (easy again with crontab), that then (with crontab again) periodically checks to see what updates are available and updates the database, "flagging" the packages that could be updated. Otherwise, my next best guess would be, since running this code takes about 5 minutes, meaning at most I want to run it once a day, probably more like 1x per week, using a cron job to update and keep two separate lists. Would a count of how many updates are available for each of those packages, be useful in any sense even? How about the output format, is there some way to more easily have it resemble the list format of a typical equery list.

Then I can easily do anything I want with that. Thanks!


Last edited by LIsLinuxIsSogood on Tue Aug 15, 2017 6:10 am; edited 2 times in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Aug 15, 2017 6:08 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
I am under the impression that Portage will just do what you tell it to do. If by updating the @world set it won't continue to look further ...

The emerge manpage(1) has some more information. Search for ^\s*--complete-graph. For me, the following string does what I want:
Code:
eix-sync && emerge -uDUavt --with-bdeps=y --complete-graph @world && emerge @preserved-rebuild && eclean-dist -d && emerge -ac

In case you want more than --with-bdeps=y --complete-graph would update, then run emerge -ep @world, check what it wants to update and ask yourself why you should do that.
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