[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-ports
Subject:    Re: List of packages upgraded last time `pkg upgrade` was executed
From:       Mike Andrews via freebsd-ports <freebsd-ports () freebsd ! org>
Date:       2021-01-27 23:59:55
Message-ID: 8aceea1-e7fa-4f17-278a-18412351763a () bit0 ! com
[Download RAW message or body]

On Wed, 27 Jan 2021, Yasuhiro Kimura wrote:

> From: Freddie Cash <fjwcash@gmail.com>
> Subject: Re: List of packages upgraded last time `pkg upgrade` was executed
> Date: Tue, 26 Jan 2021 17:26:29 -0800
>
>> /var/log/messages and I think /var/log/daemon include the output of the pkg
>> commands. If you have the log files backed up from the last time it was
>> run, you could grep for pkg in those.
>>
>> No idea if this info is also stored in the sqlite databases pkg uses.
>
> Thank you for reply. But my intention is to write shell script that
> gets the list of upgraded packages and does something by using
> it. Because of that the list need to be gotton without any user
> interaction. So unfortunately your method is not applicable to my
> case.

Try something like this as a starting point for a shell script:

sqlite3 /var/db/pkg/local.sqlite \
  "select datetime(time,'unixepoch'),origin,version from packages \
  where datetime(time,'unixepoch')>=date('now','-7 day') \
  order by time desc"
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic