You are not logged in.

#1 2014-07-11 22:05:49

wassup
Member
Registered: 2010-03-16
Posts: 12

Jakpak - compare your local packages with ARM packages.

I have decided to write this script for myself after I have recently upgraded my system and (foolishly) removed pacman.log in the meantime. The system crashed and I had no real idea which package upgrade might have been the cause. Thus, this software.

The main idea is to allow the user to quickly check what changes were made to local packages since a given day. Usage:

jakpak -d 05-07-2014 -r core

will provide the user with the list of packages (with their respective versions) that differ between the local system and the particular date specified by the user.

Apparently, the code needs some tuning, therefore if anyone would be interested in using this piece of software, this will follow up in due course. The same applies to a PKGBUILD.

Github link with installation instructions.

Please let me know whether you find it useful!

Offline

#2 2014-07-11 22:44:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Jakpak - compare your local packages with ARM packages.

Why do you remove pacman.log?? Is this some kind of regular thing you do?
What about backups? You don't back /etc up?

Offline

#3 2014-07-11 23:00:10

wassup
Member
Registered: 2010-03-16
Posts: 12

Re: Jakpak - compare your local packages with ARM packages.

I removed it in the routine of cleaning up, I do not backup logs from my desktop as I do not need them. Also, /etc does not have anything to do with the above.

Offline

#4 2014-07-11 23:12:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Jakpak - compare your local packages with ARM packages.

wassup wrote:

Also, /etc does not have anything to do with the above.

True. I somehow conflated /var/log with /etc ...

$ echo $(date -d 'last Thursday' +%s)
1404943200
$ expac --timefmt=%s '%l %n' | awk '$1>=1404943200 {print $2}'
shaman-git

Somebody can probably turn this into a neat oneliner.

Offline

#5 2014-07-11 23:22:24

wassup
Member
Registered: 2010-03-16
Posts: 12

Re: Jakpak - compare your local packages with ARM packages.

Indeed, that is nice. smile

Offline

#6 2014-07-11 23:28:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Jakpak - compare your local packages with ARM packages.

$ cat foo
#!/bin/bash
datesec=$(date -d "$*" +%s)
expac --timefmt=%s '%l %n' | awk -v a=$datesec '$1>=a {print $2}'
$ ./foo last thursday
shaman-git

I haven't tested it at all, but seems to be somewhat functional.

Offline

#7 2014-07-12 01:03:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Jakpak - compare your local packages with ARM packages.

The listing is alphabetical:

$ ./foo Thu Jul 09 21:29:43 CEST 2014
shaman-git
$ ./foo Thu Jul 09 11:29:43 CEST 2014
flashplugin
imagemagick
intel-dri
libsystemd
mesa
mesa-libgl
shaman-git
systemd
systemd-sysvcompat
xorg-xkbcomp

You may want to sort it e.g. from the oldest to the most recent:

$ cat bar
#!/bin/bash
datesec=$(date -d "$*" +%s)
expac --timefmt=%s '%l %n' | sort -n | awk -v a=$datesec '$1>=a {print $2}'

(just added 'sort -n' before the awk part)


Date has to be in a certain format for the script to work:

$ ./foo 11/07/2014
$ ./foo Jul 11
shaman-git

Offline

Board footer

Powered by FluxBB