Created attachment 108922 [details]
"Reason:" and "Change Log" are nearly identical
[Discover from git master on KDE Neon]
See attached screenshot. In KDE Neon, with Ubuntu packaging, the Reason and Change Log fields both get populated, but are identical save for a few formatting differences. We probably don't need both in this case, but I'm not sure how we would go about detecting this in a sane and accurate manner.
Created attachment 108971 [details]
This text is provided by the distribution, there's not much we can do from Discover besides hiding either.
This is what it looks like on ArchLinux.
Hmm, so this is probably Ubuntu or Debian's fault, then.
Is anybody using Debian and able to confirm whether this is true for Debian packages, too? Or is it just Ubuntu packaging?
I spoke to an Ubuntu developer who said that their .deb packages don't include a "Reason" field, so this must be coming from PackageKit. Digging a bit, it seems that PackageKit is synthesizing the Reason and Updates fields from the original Change Log field, but not dropping the now-duplicate Change Log field. I've filed https://github.com/hughsie/PackageKit/issues/227
I'm not going to close this yet since that bug may wind up as a WONTFIX, in which case sadly our only option is to explicitly suppress the Change Log field when the PackageKit backend is using .deb packages.
Indeed, it seems like we should modify the information we show. Nate, since you looked into it, any good ideas? :)
I'll keep trying to make our case upstream, but if that's a dead end then it looks like we may have no choice but to add some custom logic to suppress either Change Log or else Reason and Updates for Debian-based systems. My very minor preference would be to keep Reason and Updates since the data is a bit better structured there (which is probably why PackageKit creates them).
Conclusion upstream is that we'll need to do this ourselves. I'll try to put something together.
I've submitted a patch based on advice and comments from PackageKit developers. Basically, the ChangeLog field is the raw data used to synthesize the Updates and UpdateText fields. So if we show those, we don't need to also show the text in the ChangeLog field.
...At least, this is true in Debian-based distros. It would be great to get some testing in a few non-Debian-based distros to make sure it doesn't regress anything for anybody.
Git commit fad964d9a0b92fbcf51d5fcbfc4de52d55b86437 by Nathaniel Graham.
Committed on 14/01/2018 at 20:25.
Pushed by ngraham into branch 'master'.
Remove redundant changeLog field
For Debian packages, PackageKit manufactures the `updateText` and `updates` fields from the package's changelog. PackageKit gives us the `updateText` and `updates` fields, but also includes the original text used to synthesize them in a field called `changeLog`.
So we should only display `updateText` and `updates`, since `changeLog` is just the the raw information used to synthesize them, and if we show it too, there's duplicate information.
For more information about this, see https://github.com/hughsie/PackageKit/issues/227
**This change needs testing from people who are not using Debian-based distros to make sure it didn't break anything for them!**
I tested in KDE Neon, a Debian-based distro. Before:
Other entries still show up and are not affected.
Reviewers: apol, #discover_software_store
Reviewed By: apol, #discover_software_store
Differential Revision: https://phabricator.kde.org/D9850
M +0 -1 libdiscover/backends/PackageKitBackend/PackageKitResource.cpp