Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

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

Report Bugs, Issues and non- package Requests
Post Reply
User avatar
Huckleberry
Forum Regular
Forum Regular
Posts: 347
Joined: Sat Jun 22, 2019 8:35 am

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

#1

Post by Huckleberry » Tue Jul 23, 2019 3:51 pm

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 on Tue Jul 23, 2019 4:19 pm, edited 1 time in total.
When asking for help, please first : Menu => MX Tools => Quick System Info
Even no need to select & copy. The output will get in the clipboard automatically, just paste.


MX 18.3 - 32bit 5.2.8-antix.1-686-smp-pae

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

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

#2

Post by dolphin_oracle » Tue Jul 23, 2019 4:07 pm

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 T530 - MX-18.3
lenovo s21e - antiX-19 beta 2 (live-USB)
FYI: mx "test" repo is not the same thing as debian testing repo.

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

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

#3

Post by kmathern » Tue Jul 23, 2019 4:11 pm

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.

User avatar
Huckleberry
Forum Regular
Forum Regular
Posts: 347
Joined: Sat Jun 22, 2019 8:35 am

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

#4

Post by Huckleberry » Tue Jul 23, 2019 4:15 pm

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..
When asking for help, please first : Menu => MX Tools => Quick System Info
Even no need to select & copy. The output will get in the clipboard automatically, just paste.


MX 18.3 - 32bit 5.2.8-antix.1-686-smp-pae

User avatar
dreamer
Forum Regular
Forum Regular
Posts: 496
Joined: Sun Oct 15, 2017 11:34 am

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

#5

Post by dreamer » 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.

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

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

#6

Post by kmathern » Tue Jul 23, 2019 5:37 pm

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
Forum Regular
Forum Regular
Posts: 496
Joined: Sun Oct 15, 2017 11:34 am

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

#7

Post by dreamer » Tue Jul 23, 2019 6:17 pm

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/*

User avatar
Huckleberry
Forum Regular
Forum Regular
Posts: 347
Joined: Sat Jun 22, 2019 8:35 am

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

#8

Post by Huckleberry » Tue Jul 23, 2019 6:42 pm

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 :)
When asking for help, please first : Menu => MX Tools => Quick System Info
Even no need to select & copy. The output will get in the clipboard automatically, just paste.


MX 18.3 - 32bit 5.2.8-antix.1-686-smp-pae

Post Reply

Return to “Bugs and Non-Package Requests Forum”