get_manually_installed_packages() requires a /var/log/installer/initial-status.gz
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start in usr/lib/python3/dist-packages/mintcommon/installer/cache.py at PkgCache.get_manually_installed_packages() and _get_manually_installed_debs(), then reproduce with /var/log/installer/initial-status.gz absent. Check the installed-package view in mintinstall and the documented public behavior; done means the missing installer file no longer leaves the package list empty and the method’s contract is accurate.
Written by the indexing model from the issue text.
Description
On systems not having the file "/var/log/installer/initial-status.gz", mintcommon.installer.cache.PkgCache.get_manually_installed_packages() will just return None, not even trying to return a flatpak list and not trying alternative direct apt or dpkg queries for listing installed packages.
Based on an Askbuntu answer and reading the code, the purpose of the file initial-status.gz seems to have been to record which packages came from the system installer, as opposed to those added later by the user. But some installers have apparently stopped providing initial-status.gz. I used mintupgrade 2025.11.21 and noticed that I don't have this file now. (As I previously used synaptic rather than mintinstall, I didn't notice any problem until now and I don't know whether I had the file before the upgrade either.) If the distinction between package installaction cause can not be made, it would seem better to list all installed packages (regardless of cause) than to list none as installed. Mintinstall and Mintbackup seem to fail to list installed packages due to this behaviour.
To confirm that the missing file was the only problem, I created a plain text file /tmp/initial-status with a single line saying
Package: mintinstall
(It doesn't seem to matter which package name is used, just a space might work too.)
I then ran gzip /tmp/initial-status and sudo mv -n /tmp/initial-status.gz /var/log/installer/initial-status.gz to put this gzipped file where mintcommon expects to find a file with at least one line starting with "Package: ".
Now, running mintinstall and going to the "Show installed applications" gives me a long list, including both system packages and flatpak packages. (Before this list was empty, except the specific installed packages whose details I had open in mintinstall.). Actually, I can then remove the .gz-file, and mintinstall keeps showing a list of installed packages (probably cached somewhere, but clicking to reload the list of packages didn't clear it.)
- Is it a formal requirement that all Linux Mint (Debian Edition) installers create /var/log/installer/initial-status.gz? So the bug would be in whichever didn't?
- Should mintcommon's
get_manually_installed_packages()work even when the file is missing? I would prefer the latter, just listing all packages if there's no other method to exclude some that came from a system-installer.
The docstring of the problematic private method _get_manually_installed_debs() does document that it "Requires a package list provided by the installer. Currently knows only Ubiquity's /var/log/installer/initial-status.gz". However, this caveat is not mentioned on the public method get_manually_installed_packages(), which just says "Get list of all manually installed packages (apt and flatpak)". And I guess the mintinstall and mintbackup packages were not realizing this limitation and did not happen to test on a system without this file.
- Dominant language
- Python
- Stars
- 25
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linuxmint/mintcommon
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linuxmint/mintcommon#77 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
linuxmint/mintcommon#75 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
linuxmint/mintcommon#74 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
linuxmint/mintcommon#73 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
linuxmint/mintcommon#70 · 1 comment ·
All issues in linuxmint/mintcommon
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·