get_manually_installed_packages() requires a /var/log/installer/initial-status.gz
还没有人认领这个 Issue。
评估
调研方向
从 usr/lib/python3/dist-packages/mintcommon/installer/cache.py 中的 PkgCache.get_manually_installed_packages() 和 _get_manually_installed_debs() 开始,然后在缺少 /var/log/installer/initial-status.gz 的情况下复现。检查 mintinstall 中的已安装软件包视图以及文档所述的公开行为;完成的标准是,缺少安装程序文件不再导致软件包列表为空,并且该方法的契约准确无误。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 25
- 派生
- 32
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
linuxmint/mintcommon 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
linuxmint/mintcommon#77 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
linuxmint/mintcommon#75 ·
-
难度 4/5 3-5 天 新手友好度 25/100
linuxmint/mintcommon#74 ·
-
难度 4/5 3-5 天 新手友好度 25/100
linuxmint/mintcommon#73 ·
-
难度 4/5 3-5 天 新手友好度 42/100
linuxmint/mintcommon#70 · 1 条评论 ·
查看 linuxmint/mintcommon 的全部 Issue
相似的 Issue
-
docs pydanty:is-working
难度 2/5 1-3 小时 新手友好度 75/100
pydantic/pydantic-ai#9800 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
[Bug]: With --api-server-count > 1, gauges such as vllm:num_requests_running have no samples until the first request可能已有人在做 @roy6n23 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
vllm-project/vllm#59988 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
pymc-devs/pymc-examples#897 ·
-
难度 1/5 1 小时以内 新手友好度 91/100