Bug 452150 - Discover doesn't show local package information until I inject GammaRay to it
Summary: Discover doesn't show local package information until I inject GammaRay to it
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Unclassified
Component: PackageKit (show other bugs)
Version: master
Platform: openSUSE RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-04-01 14:52 UTC by Fushan Wen
Modified: 2022-04-02 00:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.5


Attachments
before injection.png (128.27 KB, image/png)
2022-04-01 14:52 UTC, Fushan Wen
Details
after injection.png (145.00 KB, image/png)
2022-04-01 14:52 UTC, Fushan Wen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-04-01 14:52:10 UTC
Created attachment 147879 [details]
before injection.png

SUMMARY
When I open a local rpm package using Discover, it fails to show the license and the description of the local package. After I inject GammaRay to it, the license and the description appear, but "What's the risk" shows "Risks of proprietary software" instead of something like "Risks of installing untrusted local package" as shown in PolicyKit dialog.


STEPS TO REPRODUCE
1. Open a local rpm package that has license and description
2. Discover only shows the version, no license or description is shown.
3. Inject Gammaray
4. The license and the description appear.

OBSERVED RESULT
No license or description is shown.

EXPECTED RESULT
License and description are shown in the first place.

SOFTWARE/OS VERSIONS
Information for package discover:
---------------------------------
Repository     : @System
Name           : discover
Version        : 5.24.80git.20220330T005443~60a6b53a8-ku.54.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 8.2 MiB
Installed      : Yes
Status         : up-to-date
Source package : discover-5.24.80git.20220330T005443~60a6b53a8-ku.54.1.src
Upstream URL   : https://quickgit.kde.org/?p=discover.git
Summary        : Software store for the KDE Plasma desktop


Information for package PackageKit:
-----------------------------------
Repository     : ustc-oss
Name           : PackageKit
Version        : 1.2.4-3.4
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 1.2 MiB
Installed      : Yes
Status         : up-to-date
Source package : PackageKit-1.2.4-3.4.src
Upstream URL   : https://www.freedesktop.org/software/PackageKit
Summary        : Simple software installation management software
Comment 1 Fushan Wen 2022-04-01 14:52:35 UTC
Created attachment 147880 [details]
after injection.png
Comment 2 Nate Graham 2022-04-01 19:59:36 UTC
Looks like it doesn't correctly parse it though. That orange color means it thinks it's a proprietary license.
Comment 3 Fushan Wen 2022-04-02 00:13:14 UTC
Git commit dc9ced728ab33251fcbb0d21c492ff2308992873 by Fushan Wen.
Committed on 01/04/2022 at 15:40.
Pushed by fusionfuture into branch 'master'.

libdiscover: Fix Discover doesn't show license or description of local package

When setting details of a package, also emit `licensesChanged` and `longDescriptionChanged`,
so when opening a local package using PackageKit backend, the
application page can show licenses and description when the details are
fetched.

M  +10   -0    libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
M  +2    -1    libdiscover/resources/AbstractResource.h

https://invent.kde.org/plasma/discover/commit/dc9ced728ab33251fcbb0d21c492ff2308992873
Comment 4 Fushan Wen 2022-04-02 00:13:47 UTC
Git commit 4ef7939e7efdf47ace28810f1f2d13fd4068abe9 by Fushan Wen.
Committed on 02/04/2022 at 00:13.
Pushed by fusionfuture into branch 'Plasma/5.24'.

libdiscover: Fix Discover doesn't show license or description of local package

When setting details of a package, also emit `licensesChanged` and `longDescriptionChanged`,
so when opening a local package using PackageKit backend, the
application page can show licenses and description when the details are
fetched.


(cherry picked from commit dc9ced728ab33251fcbb0d21c492ff2308992873)

M  +10   -0    libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
M  +2    -1    libdiscover/resources/AbstractResource.h

https://invent.kde.org/plasma/discover/commit/4ef7939e7efdf47ace28810f1f2d13fd4068abe9