Bug 400044 - Discover shows distribution name as source of local package (deb/rpm)
Summary: Discover shows distribution name as source of local package (deb/rpm)
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-19 22:03 UTC by Patrick Silva
Modified: 2020-01-20 16:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (50.65 KB, image/png)
2018-10-19 22:03 UTC, Patrick Silva
Details
Still shows the distro name at the end (82.71 KB, image/png)
2018-10-22 03:57 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-10-19 22:03:54 UTC
Created attachment 115754 [details]
screenshot

STEPS TO REPRODUCE
1. open some deb/rpm package with discover
2. 
3. 

OBSERVED RESULT
"Source:" is the distribution name, see the screenshot. This info makes it appear that the package comes from the distribution repos.

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
Qt Version: 5.11.1
KDE Frameworks Version: 5.52.0
Comment 1 Nate Graham 2018-10-20 04:57:21 UTC
Yeap, this is not ideal.
Comment 2 Aleix Pol 2018-10-21 23:47:10 UTC
Git commit f66557f6f6799dbe03ba4808b7aaf08d2932d341 by Aleix Pol.
Committed on 21/10/2018 at 23:38.
Pushed by apol into branch 'Plasma/5.14'.

pk: use the file path as the origin for local file resources

M  +5    -0    libdiscover/backends/PackageKitBackend/LocalFilePKResource.cpp
M  +1    -0    libdiscover/backends/PackageKitBackend/LocalFilePKResource.h

https://commits.kde.org/discover/f66557f6f6799dbe03ba4808b7aaf08d2932d341
Comment 3 Nate Graham 2018-10-22 03:57:49 UTC
Created attachment 115819 [details]
Still shows the distro name at the end

Almost, but not quite. It still shows the distro name in parentheses at the end of the path.
Comment 4 Aleix Pol 2018-10-22 11:34:18 UTC
This is the backend name, I think it's fine to stay there.
Comment 5 Nate Graham 2018-10-22 14:22:42 UTC
It is *not* fine because doing so provides the user with inaccurate information as long as the distro name appears in the backend string, because local packages do not come from the distro.

Can't we just remove the backend name from the source string for local packages? I think that would make the most sense.
Comment 6 Aleix Pol 2018-10-23 13:58:47 UTC
I'm not sure. Actually I'm not sure even if it makes sense. In the end, the user needs to know where it's being installed to.

Maybe we should be showing the PackageKit backend name (i.e. aptcc) instead of the distribution name.
Comment 7 Nate Graham 2018-10-23 14:20:13 UTC
> the user needs to know where it's being installed to.
The Source category shows where it's being installed FROM, not where it's being installed TO.

I think using the actual distro name is fine in places where the package comes from the distro's repos. But we can't show it for local packages precisely because that can't be guaranteed. At best, we could show the backend name, but I'm not really sure how necessary that is; if the user has manually opened a local package, it's a good bet they know its format.
Comment 8 Patrick Silva 2019-03-24 13:36:47 UTC
This bug persists on neon dev unstable.
Comment 9 Patrick Silva 2020-01-18 17:07:13 UTC
still relevant

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Comment 10 Aleix Pol 2020-01-20 14:40:04 UTC
I'd say it does make sense to explain where it's installed to. In the end it's about what could get tainted by the installation of the package. It's a "KDE Neon" package you are installing in your case anyway.
Comment 11 Nate Graham 2020-01-20 14:43:45 UTC
(In reply to Aleix Pol from comment #10)
> I'd say it does make sense to explain where it's installed to. In the end
> it's about what could get tainted by the installation of the package. It's a
> "KDE Neon" package you are installing in your case anyway.
"Source" means "installed *from* not installed *to*. Yo can't provide both "to" and "from" information in a piece of text labeled "source".

Displaying "KDE Neon" in the source for a package you downloaded from a random site on the internet is false and misleading.
Comment 12 Aleix Pol 2020-01-20 16:17:13 UTC
Git commit 472a761351427acca1bc2182dc225034af2cc738 by Aleix Pol.
Committed on 20/01/2020 at 16:16.
Pushed by apol into branch 'Plasma/5.18'.

packagekit: don't show where the package will be installed

As a source we were using the distro name which is not entirely true for
local files.

M  +1    -0    libdiscover/backends/PackageKitBackend/LocalFilePKResource.h
M  +1    -1    libdiscover/resources/AbstractResource.h

https://commits.kde.org/discover/472a761351427acca1bc2182dc225034af2cc738
Comment 13 Nate Graham 2020-01-20 16:18:47 UTC
Thanks Aleix!