Date: Wed, 27 Jan 2021 18:59:55 -0500 (EST) From: Mike Andrews <mandrews@bit0.com> To: Yasuhiro Kimura <yasu@utahime.org> Cc: freebsd-ports@freebsd.org Subject: Re: List of packages upgraded last time `pkg upgrade` was executed Message-ID: <8aceea1-e7fa-4f17-278a-18412351763a@bit0.com> In-Reply-To: <20210127.105722.43271801537229412.yasu@utahime.org> References: <20210127.101755.2072625504289992511.yasu@utahime.org> <CAOjFWZ5ZUjZeoUbj_Pw1ERdeDsexTAORvvpAG4GMcLSmMGU0%2Bw@mail.gmail.com> <20210127.105722.43271801537229412.yasu@utahime.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8aceea1-e7fa-4f17-278a-18412351763a>