Page 1 of 2
twapake - track installed packages
Posted: 22. Dec 2010, 16:44
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
++
Re: twapake - track installed packages
Posted: 23. Dec 2010, 10:18
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 ?
Re: twapake - track installed packages
Posted: 23. Dec 2010, 11:07
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
++
Re: twapake - track installed packages
Posted: 23. Dec 2010, 12:23
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 !
Re: twapake - track installed packages
Posted: 23. Dec 2010, 13:49
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
Re: twapake - track installed packages
Posted: 23. Dec 2010, 16:30
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.
++
Re: twapake - track installed packages
Posted: 10. Feb 2011, 17:17
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:
Available in -current or
http://people.salixos.org/fredg/package ... ch-1fg.txz
Comments are welcome
++
Re: twapake - track installed packages
Posted: 10. Feb 2011, 21:53
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!
Re: twapake - track installed packages
Posted: 11. Feb 2011, 08:10
by fredg
it was called zetapkg.
That looks interesting, thanks for the link.
++
Re: twapake - track installed packages
Posted: 28. Mar 2011, 18:24
by fredg
Little updates:
will ask you if you want to remove the last 10 installed packages (you will see the packages list)
will show you the packages installed today
will show you the packages installed since 2011-03-15
++