LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackpkg no log? (https://www.linuxquestions.org/questions/slackware-14/slackpkg-no-log-4175687965/)

Ressy 01-04-2021 12:36 AM

slackpkg no log?
 
Does slackpkg not have logging of what its done?

Seems a shortcoming if not, be rather handy to see what it did and when, if it does, I certainly can't locate where it stores this

aiszisz 01-04-2021 04:22 AM

Quote:

Originally Posted by Ressy (Post 6203715)
Does slackpkg not have logging of what its done?

Seems a shortcoming if not, be rather handy to see what it did and when, if it does, I certainly can't locate where it stores this

I am not sure I understand your problem well, sorry If I give unnecessary information. :))

in /var/log there are packages and removed_packages directories(and more) where you can see which packages have been installed or removed
with 'ls -l' you can see the dates too

If you want to see all of this in a log file I don't think it is exist but you can generate one with a script if you want.

keefaz 01-04-2021 04:43 AM

See some logs in /var/lib/slackpkg/install.log

phenixia2003 01-04-2021 04:48 AM

Hello,

Quote:

Originally Posted by keefaz (Post 6203782)
See some logs in /var/lib/slackpkg/install.log

FYI, this is a slackpkg+ feature.

--
SeB

keefaz 01-04-2021 04:55 AM

Quote:

Originally Posted by phenixia2003 (Post 6203786)
Hello,



FYI, this is a slackpkg+ feature.

--
SeB

Ah! Thanks for the correction

Ressy 01-04-2021 06:49 AM

Quote:

Originally Posted by keefaz (Post 6203782)
See some logs in /var/lib/slackpkg/install.log

/var/lib/slackpkg/install.log: No such file or directory

Which reminds me, PACKAGES.TXT has weird data in it, php 5.6 2019 and so on, ummm I'm on a fresh install from a week ago, so no idea where it gets that crud from :)

Ressy 01-04-2021 06:54 AM

Quote:

Originally Posted by aiszisz (Post 6203774)
I am not sure I understand your problem well, sorry If I give unnecessary information. :))

in /var/log there are packages and removed_packages directories(and more) where you can see which packages have been installed or removed
with 'ls -l' you can see the dates too

If you want to see all of this in a log file I don't think it is exist but you can generate one with a script if you want.

Thats exactly what I have been doing for years, but its a multi step half ##s'd way of going about it, RH and others have had an install log dating back to near when adam and eve were just babies :)

I know this is more of a slackware problem, since slackpkg just runs pkgtools in the end, but I've been round long enough to know that I don't have a snowflakes chance in hell of convincing Pat to fix that hehe

Z038 01-04-2021 08:42 AM

I haven't tried it, but I should think you could create your own logs using tee to capture the output of slackpkg.

Exaga 01-05-2021 06:53 AM

Quote:

Originally Posted by Ressy (Post 6203825)
Thats exactly what I have been doing for years, but its a multi step half ##s'd way of going about it, RH and others have had an install log dating back to near when adam and eve were just babies :)

I know this is more of a slackware problem, since slackpkg just runs pkgtools in the end, but I've been round long enough to know that I don't have a snowflakes chance in hell of convincing Pat to fix that hehe

Whenever I want to create a log I just send the results/output to a file.

Code:

~# ls -lah /var/lib/pkgtools/packages > /tmp/pkg.log
~# dmesg > /tmp/dmesg.log

If you want to log all slackpkg (or any) screen content on-the-fly do something like this...

Code:

~# exec &> >(tee >(gawk '{ print strftime("[%Y%m%d-%H%M%S]"), $0 }' >> /tmp/slackpkg.log ) 2>&1) && slackpkg [** install/reinstall/update/check-updates **]
The slackpkg tool options '[** ... **]' are your prerogative. Not everything is as easy or facilitating as it could be (thankfully!) and there are very valid reasons why Slackware is what it is. If there's anything you need which is a constant requirement then you could always build a script for it. If not then just use it one time and forget about it. That's what I do to make things a little easier and less time consuming for myself.


All times are GMT -5. The time now is 04:14 PM.