Skip to content

Match the update's summary and description with its title#1073

Open
randomnoise wants to merge 1 commit into
linuxmint:masterfrom
randomnoise:use-source-pkg-info
Open

Match the update's summary and description with its title#1073
randomnoise wants to merge 1 commit into
linuxmint:masterfrom
randomnoise:use-source-pkg-info

Conversation

@randomnoise

Copy link
Copy Markdown
Contributor

When multiple updatable packages are grouped together as an update, the group uses its source in APT description as its title in GUI.

The title can correspond to a package itself but not necessarily be updatable at that moment. In this case, the summary and description of the first package in the changelist are used whose name doesn't begin with lib and end with dev, dbg, common, core, data or doc.

This PR uses the source package's summary and description to match with the group's title if the source package exists. If a package doesn't exist with the title's name, the code shouldn't cause an error. (e.g., updatable package libfprint-2-2, its source libfprint: no package by that name.)

This implementation doesn't feel ideal; I implemented it for minimal change in terms of lines, and I didn't want to introduce a circular dependency between AptUpdater (old APTCheck) and Update classes. I just wanted to explore the root cause of the issue, that's why it is kind of hacky.

vim specific explanation
$ apt-cache show vim-common | grep Source
Source: vim

but updatable changes doesn't include vim, so GUI uses first acceptable change for the summary and description: xxd.

updatable packages:

[
 <Package: name:'vim-gui-common' architecture='amd64' id:136982>,
 <Package: name:'xxd' architecture='amd64' id:10585>,
 <Package: name:'vim-gtk3' architecture='amd64' id:11795>,
 <Package: name:'vim-common' architecture='amd64' id:10066>,
 <Package: name:'vim-runtime' architecture='amd64' id:11791>
]
vim before & after screenshots

Before:
01-vim-summary-desc-before

After:
02-vim-summary-desc-after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong description shown

1 participant