In my usual affairs I am not often stumped when presented with logic problems and I like to think that my skills in critical thinking are better than the average bear. However, the logic of computing is regularly conceptually baffling. This has especially been the case since I began using Ubuntu. Unix-like computing is taking my noodle to places it has never been before.
I looked into diff. Found instructive articles aimed at teaching how to use the command, how to interpret its output. Even the kindergarten level examples presented for demonstration did not entirely make sense. But I went ahead and had a try.
Earlier in the thread commands provided by oldfred and Holger_Gehrke produced two output files.
fred.txt (1882 lines)
holger.txt (1552 lines)
The column of package names in fred.txt was accompanied by another column with the only the word 'install' beside each package name. To prevent complications I removed all mentions of the word install. Then I did a few diff experiments.
Code:
cp fred.txt fred2.txt
sed -i 's/install/ /g' fred2.txt
Then I explored various diff options:-
Code:
diff -e holger.txt fred2.txt > H2F.txt
diff -e fred2.txt holger.txt > F2H.txt
diff -y holger.txt fred2.txt > yH2F.txt
diff -y fred2.txt holger.txt > yF2H.txt
diff -u holger.txt fred2.txt > uH2F.txt
diff -u fred2.txt holger.txt > uF2H.txt
I struggled to make sense of the output of any of these tests.
After that I checked out options for comparison in GUI.
Out of:
- DiffMerge
- Meld – Diff Tool
- Diffuse – GUI Diff Tool
- XXdiff – Diff and Merge Tool
- KDiff3 – Diff and Merge Tool
...only Meld and KDiff3 could be installed to Ubuntu 20.04.
KDiff3 installed with a number of issues including its show-stopping failure to recognise .txt files.
Which left Meld. Like me, Meld grumbled about the size of the lists it was asked to compare.
The colourised GUI outputs displayed in Meld were still not easy for me to interpret but I did make some headway.
The larger output of Fred's command had more detail. It picked up a couple of items installed as Snaps which would not be installed via repos because they are not available there. In other instances it seemed to be more thorough. For example, qpdfview (a pdf viewer installed by me) was listed once in Holger's output but Fred's found additional plugins installed as well. Holger's output had one grub related listing; Fred's output had seven.
Regarding an automated software install to a new system my session of testing with diff and Meld has led me to conclude I should just suck it and see. Do separate test installs using the methods described by oldfred and Holger_Gehrke and judge by the results. If as oldfred commented packages already installed will not be installed again the process shouldn't become wayward.
Bookmarks