View previous topic :: View next topic |
Author |
Message |
jhon987 Apprentice
Joined: 18 Nov 2013 Posts: 297
|
Posted: Fri Jun 17, 2016 4:34 pm Post subject: Gentoo command / tool to view package update data? |
|
|
For system administration purposes, is there a way on Gentoo to view updated packages version history to get something similar to the output you'd get with 'yum history info 5' for example?
To clarify, say I want to know what changes were made in last update I ran - what packages were installed? which were updated (and their version)?
Also, is there a way to query a specific package and get information such as when it was last updated and from which and to what version?
I know about "qlop -l" but that doesn't tell me whether a package was upgraded or installed and their versions... |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Jun 17, 2016 6:38 pm Post subject: Re: Gentoo command / tool to view package update data? |
|
|
jhon987 wrote: | To clarify, say I want to know what changes were made in last update I ran - what packages were installed? which were updated (and their version)? |
jhon987 ... no experience with yum, generally you would parse /var/log/emerge.log, or the output of something (ie, qlop) that does the same. I use the following:
qlop -Clu | awk '{split($0,a,/[[:space:]]+/)} strftime("%a %b %d",systime()) == a[1]" "a[2]" "a[3] {print $0}': | Fri Jun 17 19:28:48 2016 <<< net-dns/dnscrypt-proxy-1.6.1
Fri Jun 17 19:28:52 2016 >>> net-dns/dnscrypt-proxy-1.6.1 |
... that is just a re-merge (as you can see, no version change), and obviously I'm targeting today.
jhon987 wrote: | Also, is there a way to query a specific package and get information such as when it was last updated and from which and to what version? I know about "qlop -l" but that doesn't tell me whether a package was upgraded or installed and their versions... |
It does, you just need to also provide the '-u,--unlist' switch:
qlop -lu sys-devel/gcc: | Tue Feb 19 12:25:28 2013 >>> sys-devel/gcc-4.6.3
Sat Sep 14 21:31:18 2013 <<< sys-devel/gcc-4.6.3
Sat Sep 14 21:31:28 2013 >>> sys-devel/gcc-4.6.3
Mon Oct 7 22:44:29 2013 >>> sys-devel/gcc-4.7.3-r1
Mon Oct 7 23:17:38 2013 <<< sys-devel/gcc-4.6.3
Tue Jan 28 04:09:16 2014 <<< sys-devel/gcc-4.7.3-r1
Tue Jan 28 04:09:27 2014 >>> sys-devel/gcc-4.7.3-r1
Mon Nov 3 16:27:10 2014 >>> sys-devel/gcc-4.8.3
Mon Nov 3 16:36:13 2014 <<< sys-devel/gcc-4.7.3-r1
Sat Apr 18 14:10:44 2015 <<< sys-devel/gcc-4.8.3
Sat Apr 18 14:11:05 2015 >>> sys-devel/gcc-4.8.4
Sun Sep 20 21:25:01 2015 <<< sys-devel/gcc-4.8.4
Sun Sep 20 21:25:20 2015 >>> sys-devel/gcc-4.8.5
Tue Oct 6 20:47:43 2015 >>> sys-devel/gcc-4.9.3
Wed Oct 7 08:54:43 2015 <<< sys-devel/gcc-4.8.5 |
Also, as far as the criteria "upgraded or installed" goes, obviously the former must be a condition of the latter.
HTH & best ... khay |
|
Back to top |
|
|
jhon987 Apprentice
Joined: 18 Nov 2013 Posts: 297
|
Posted: Fri Jun 17, 2016 9:44 pm Post subject: Re: Gentoo command / tool to view package update data? |
|
|
khayyam wrote: |
HTH & best ... khay |
Hey Khay, thanks very much for the input. qlop -ul seems to be useful enough, even though it doesn't specifically mention the word update. (for some reason, it has eluded me to use it that way)
So when I see something like this I can deduce that it was an update rather than a new emerge:
Code: | $ qlop -ul | tail -n 2
Sun Jun 12 17:13:29 2016 <<< x11-libs/gtk+-3.18.7
Sun Jun 12 17:13:33 2016 >>> x11-libs/gtk+-3.18.9 |
For general knowledge, here's how yum hisotry info looks like:
Code: | # yum history info 266
Loaded plugins: fastestmirror, security, tsflags
Transaction ID : 266
Begin time : Wed Jun 8 02:25:20 2016
Begin rpmdb : 1600:caf25fa7117d682e5a6b53bce2222a6983c4d879
End time : 02:25:43 2016 (23 seconds)
End rpmdb : 1600:081861ecb4ae57608cff48b3b7bbbcd45a695bd2
User : root <root>
Return-Code : Success
Command Line : -y -c /etc/yum.conf update
Transaction performed with:
Installed rpm-4.8.0-55.el6.x86_64 @base
Installed yum-3.2.29-73.el6.centos.noarch @base
Installed yum-metadata-parser-1.1.2-16.el6.x86_64 @anaconda-CentOS-201303050102.x86_64/6.4
Installed yum-plugin-fastestmirror-1.1.30-37.el6.noarch @base
Packages Altered:
Updated ULSetup-1.3-12.el6.noarch @ul
Update 1.4-3.noarch @ul
Updated ea-php56-php-cli-5.6.22-2.1.x86_64 @EA4
Update 5.6.22-2.2.x86_64 @EA4
Updated ea-php56-php-common-5.6.22-2.1.x86_64 @EA4
Update 5.6.22-2.2.x86_64 @EA4
Updated ea-php56-php-mysqlnd-5.6.22-2.1.x86_64 @EA4
Update 5.6.22-2.2.x86_64 @EA4
Updated ea-php56-php-pdo-5.6.22-2.1.x86_64 @EA4
Update 5.6.22-2.2.x86_64 @EA4
history info |
So this shows what the latest yum command did in the last time I've used it (which happens to be the #266 yum command I've issued).
As you can see, it details whether a package was installed or updated and in the case of the latter it also shows from which and to what version it was updated ("updated" vs "update").
Cheers |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1972
|
Posted: Sat Jun 18, 2016 9:04 am Post subject: Re: Gentoo command / tool to view package update data? |
|
|
jhon987 wrote: | ...
I know about "qlop -l" but that doesn't tell me whether a package was upgraded or installed and their versions... |
I'd argue that if "qlop -ul" showed the package was already installed and hadn't been uninstalled, it's an upgrade, otherwise an install.
From portage's point of view, they're pretty much the same thing - the merge phase moves files from work to the target destination; if it involves replacement, it's an upgrade. _________________ Greybeard |
|
Back to top |
|
|
|
|
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
|
|