You are not logged in.

#1 2015-06-26 05:27:36

nbd
Member
Registered: 2014-08-04
Posts: 389

pacliner - Arch package management helper

pacliner - Arch package management helper

A bash script for checking what is changed in the currently available updates. Also includes several 'pacman' oneliners.

Dependencies: pacman, bash, perl
Optional dependencies: expack, pacgraph

Lists the information about available updates in one of two modes: short and verbose.

Short listing:

$ pacliner checkupdates

Name           Version change            Changed attributes

colord         1.2.9-2 -> 1.2.9-3       DependsOn
curl           7.42.1-1 -> 7.43.0-1     
ffmpeg         1:2.6.3-3 -> 1:2.7.1-1   
file           5.22-1 -> 5.23-2         
gimp           2.8.14-2 -> 2.8.14-3     DependsOn
git            2.4.3-1 -> 2.4.4-1       
gnupg          2.1.4-1 -> 2.1.5-1       Provides
pygobject-devel3.16.1-1 -> 3.16.2-1     
python-gobject 3.16.1-1 -> 3.16.2-1     DependsOn
s-nail         14.8.0-1 -> 14.8.2-1     
systemd        219-6 -> 221-1           Licenses Provides
systemd-sysvcompat219-6 -> 221-1           
thunar         1.6.10-1 -> 1.6.10-2     DependsOn
tzdata         2015d-1 -> 2015e-1       
udisks         1.0.5-1 -> 1.0.5-2       DependsOn
upower         0.99.2-2 -> 0.99.3-1     DependsOn

Verbose listing:

$ pacliner checkupdates -v

gimp
______________________________
Old Version: 2.8.14-2
New Version: 2.8.14-3
Old Depends On: babl dbus-glib desktop-file-utils gegl hicolor-icon-theme jasper lcms libexif libmng librsvg libwmf libxmu libxpm openexr pygtk
New Depends On: babl dbus-glib desktop-file-utils gegl hicolor-icon-theme jasper lcms libexif libgudev libmng librsvg libwmf libxmu libxpm openexr pygtk
(Added: libgudev )
Old Installed Size:  66.17 MiB
New Installed Size:  66.19 MiB

gnupg
______________________________
Old Version: 2.1.4-1
New Version: 2.1.5-1
Old Provides: dirmngr gnupg2=2.1.4
New Provides: dirmngr gnupg2=2.1.5
(Removed: gnupg2=2.1.4 )
(Added: gnupg2=2.1.5 )
Old Installed Size:   8.83 MiB
New Installed Size: 9072.00 KiB

AUR:
https://aur4.archlinux.org/packages/pacliner/

Manual:
https://github.com/nbdsp/pacliner/blob/master/MANUAL.md

GitHub:
https://github.com/nbdsp/pacliner

Last edited by nbd (2015-06-26 05:29:19)


bing different

Offline

#2 2015-06-26 07:27:02

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: pacliner - Arch package management helper

Looks nice; if you'd like to improve, it seems like you can remove quite a few perl calls if you'd implement http://www.tldp.org/LDP/abs/html/refcards.html#AEN22828. I also think there is a bug in disp_string; $V is only set when $4 is not given, but $fmt ($4) is only used when $V is set?

Last edited by Spider.007 (2015-06-26 07:31:47)

Offline

#3 2015-06-26 08:04:08

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: pacliner - Arch package management helper

Spider.007 wrote:

I also think there is a bug in disp_string; $V is only set when $4 is not given, but $fmt ($4) is only used when $V is set?

Not sure that I see the bug. $fmt($4) is used in the second condition. When there are only 3 arguments, in disp_string $V is set.

if [ $V ]; then
	disp_string "Version" "$oldinf" "$newinf"
        # ...Skipped
else
	s=$(disp_string "Version" "$oldinf" "$newinf" "%s -> %s")
        # ..Skipped

P.S. regarding Perl - for just one case, I would use 5 or 10 bash lines instead of one Perl call, but since both are in the base group, I left the Perl dependency for using in possible future functionality enhacements.

Last edited by nbd (2015-06-26 08:26:43)


bing different

Offline

Board footer

Powered by FluxBB