[SOLVED] Suggestion: Update History Script to be included in the iso

Report Bugs, Issues and non- package Requests
Post Reply
Message
Author
Huckleberry Finn

[SOLVED] Suggestion: Update History Script to be included in the iso

#1 Post by Huckleberry Finn »

Just a humble suggestion to the Team:

Yesterday, I came across a thread where I saw and tried a script belonging to kmathern .

Yes, there are already dmesg and such commands in use. But wouldn't this be so handy especially when helping to novices who say: "this or that happened after an update ..." and asked: "what you did last..?"

Under /usr/local/bin/ (with his original naming dpkg-hist) , also can be something easy to remember, like updatehistory (I did so in my case).. And especially when used with grep ..

i.e. in such a case, in a terminal : updatehistory | grep something

that simple..

Shortly: Can this be included in the iso for everyone's use ( by courtesy of kmathern ) :

Code: Select all

#!/bin/bash

zgrep -EH ' install | upgrade | purge | remove ' /var/log/dpkg* | cut -f2- -d: | sort -r | sed 's/ remove / remove  /;s/ purge / purge   /' | less
Last edited by Huckleberry Finn on Tue Jul 23, 2019 4:19 pm, edited 1 time in total.

User avatar
dolphin_oracle
Developer
Posts: 20036
Joined: Sun Dec 16, 2007 1:17 pm

Re: Suggestion: Update History Script to be included in the iso

#2 Post by dolphin_oracle »

that command is the command run the the "History" option on the updater tool already.

its part of /usr/local/bin/apt-history
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
kmathern
Developer
Posts: 2409
Joined: Wed Jul 12, 2006 2:26 pm

Re: Suggestion: Update History Script to be included in the iso

#3 Post by kmathern »

I think you found an old post, the Update History script is already installed with the apt-notifier (MX Updater) package, though I renamed it to apt-history (/usr/local/bin/apt-history).

You run it by right-clicking on the MX Updater icon and choose the History action.

It can also be run directly from the command line (which is how I often use it): apt-history.

Huckleberry Finn

Re: Suggestion: Update History Script to be included in the iso

#4 Post by Huckleberry Finn »

Ah, ok, I haven't been using the updater gui application for a long time, but terminal simply..

I didn't know that command. Thank you..

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: Suggestion: Update History Script to be included in the iso

#5 Post by dreamer »

kmathern wrote: Tue Jul 23, 2019 4:11 pm It can also be run directly from the command line (which is how I often use it): apt-history.
Nice. Now I just need to know how to keep this history intact between snapshots. Synaptic history stays intact between snapshots, but these history files get reset when doing a snapshot. I think I need to add/remove something to the MX Snapshot exclude list, but I don't know what. I think this could be a standard inclusion in snapshots, because it doesn't use a lot of space.

User avatar
kmathern
Developer
Posts: 2409
Joined: Wed Jul 12, 2006 2:26 pm

Re: Suggestion: Update History Script to be included in the iso

#6 Post by kmathern »

dreamer wrote: Tue Jul 23, 2019 5:04 pm
kmathern wrote: Tue Jul 23, 2019 4:11 pm It can also be run directly from the command line (which is how I often use it): apt-history.
Nice. Now I just need to know how to keep this history intact between snapshots. Synaptic history stays intact between snapshots, but these history files get reset when doing a snapshot. I think I need to add/remove something to the MX Snapshot exclude list, but I don't know what. I think this could be a standard inclusion in snapshots, because it doesn't use a lot of space.
apt-history parses (greps) the /var/log/dpkg.log* log files (dpkg.log, dpkg.log.1, dpkg.log.2.gz ... dpkg.log.12.gz), so you would need to remove those files from the snapshot excludes.

I have a years worth of history here on my MX-16.x install (logrotate limits it to 12 dpkg.log* files) which is using approx. 320K bytes worth of drive space.

User avatar
dreamer
Posts: 738
Joined: Sun Oct 15, 2017 11:34 am

Re: Suggestion: Update History Script to be included in the iso

#7 Post by dreamer »

kmathern wrote: Tue Jul 23, 2019 5:37 pm apt-history parses (greps) the /var/log/dpkg.log* log files (dpkg.log, dpkg.log.1, dpkg.log.2.gz ... dpkg.log.12.gz), so you would need to remove those files from the snapshot excludes.

I have a years worth of history here on my MX-16.x install (logrotate limits it to 12 dpkg.log* files) which is using approx. 320K bytes worth of drive space.
I don't know if any of these entries in the exclude list are relevant (/var/log/dpkg isn't there):

Code: Select all

var/cache/apt/archives/*.deb
var/cache/apt-xapian-index/index.*
var/cache/apt-show-versions/*
var/cache/apt/*.bin
var/cache/apt/apt-file/*
var/cache/debconf/*-old
var/cache/lightdm
var/cache/samba/browse.dat
var/lib/apt/lists/*
var/lib/connman/*
var/lib/dbus/machine-id
var/lib/dhcp/*
var/lib/dpkg/*-old
var/lib/lightdm/.cache
var/lib/lightdm/.Xauthority
var/lib/NetworkManager/*
var/lib/nfs/rpc_pipefs/*
var/lib/sudo/*
var/lib/udisks/*
var/lib/urandom/*
var/log/!(samba|clamav)
var/log/clamav/*
var/log/samba/*
var/mail/*
var/spool/mail/*
var/tmp/*
var/cache/brightness-settings-cache/*

Huckleberry Finn

Re: [SOLVED] Suggestion: Update History Script to be included in the iso

#8 Post by Huckleberry Finn »

Maybe you consider to exclude .bash_history for Home directory, too, at least when "personal" snapshot is selected. Since it gets reset when installed back, an average user says : "What was that command? I used once.."...

Thanks in advance :)

Post Reply

Return to “Bugs and Non-Package Requests Forum”