twapake - track installed packages

Other talk about Salix
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

twapake - track installed packages

Post by fredg »

Hi,

In order to keep my system clean when I test/build some packages I have begin to write a small Perl tool that can be use to track and log installed packages.
Maybe this can be usefull for you too ;) .

Homepage: http://www.salixos.org/wiki/index.php/Twapake
Package: http://people.salixos.org/fredg/packages/twapake

++
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: twapake - track installed packages

Post by JRD »

Hey very good idea !!
Is it working *after* having installed some packages ? Or does it need to be installed before ? How it works ?
Image
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: twapake - track installed packages

Post by fredg »

Hey very good idea !!
Thank you, easiest one are often the best ;)
Is it working *after* having installed some packages ? Or does it need to be installed before ? How it works ?
Twapake doesn't need to be installed before a package X to see when this package has been installed.

When a package is installed or updated, a file with the package name is created in /var/log/packages/.
So, I found usefull to use the mtime of those files to check when a package was installed/updated.

In bash, you can also simply use ls -lt /var/log/packages with other things ;)

++
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: twapake - track installed packages

Post by JRD »

Ok. I've thought of something like that, but wanted to be sure.
So this could be a usefull tool for people who broke their Salix installation by installing weird packages found on the net of some things like this...
I will give it a go. Thanks !
Image
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: twapake - track installed packages

Post by zAchAry »

Installed packages:

Code: Select all

$ cd /var/log/packages
$ ls -t -1 | head -n 5
Removed packages:

Code: Select all

$ cd /var/log/removed_packages
$ ls -t -1 | head -n 5
Removed scripts:

Code: Select all

$ cd /var/log/removed_scripts
$ ls -t -1 | head -n 5
Image
Help to make Slackware easier Donate to Salix
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: twapake - track installed packages

Post by fredg »

Yes ZaCHaRY you got it ;)

But I wasn't happy with that because all you got is just a list, I wanted to have every files as object (filename-mtime, a hash in Perl) in order to be able to play with them.

++
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: twapake - track installed packages

Post by fredg »

A little update.

version 0.2:
- add a --nlpkg (-n) option to use with -i to specify how many last packages have to be printed to STDOUT
- change the output format of the twapake snapshot to be more human readable.

i.e: To show the last 10 installed packages:

Code: Select all

# twapake -i -n 10
Available in -current or http://people.salixos.org/fredg/package ... ch-1fg.txz

Comments are welcome ;)

++
User avatar
tsuren
Posts: 206
Joined: 7. Jun 2009, 17:32
Location: France

Re: twapake - track installed packages

Post by tsuren »

I remember something similar when I was still in ZW. Infowonder kindly created a package for me which can do "package roll back". I forgot if it can check for dates of installation, but i found the application highly useful.

it was called zetapkg.

for those interested, the old version is
http://zenwalk.pinguix.com/user-account ... r/zetapkg/
and for the background story:
http://support.zenwalk.org/viewtopic.ph ... =roll+back

And there is no guarantee that the program works (was based on the old ZW).
i wish someone could re-work on something like this in Salix. ah but just a dream. :)

EDIT: just tested. Works very well. recommended!
'Tommorow is like today, just happens tomorrow.'
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: twapake - track installed packages

Post by fredg »

it was called zetapkg.
That looks interesting, thanks for the link.

++
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: twapake - track installed packages

Post by fredg »

Little updates:

Code: Select all

twapake -r -n 10
will ask you if you want to remove the last 10 installed packages (you will see the packages list)

Code: Select all

twapake -s
will show you the packages installed today

Code: Select all

twapake -s -c 2011-03-15
will show you the packages installed since 2011-03-15

++
Post Reply