Bug 32611 - Discover lists MGA9 packages despite no repo pointing to MGA9 in settings
Summary: Discover lists MGA9 packages despite no repo pointing to MGA9 in settings
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-10 17:01 CET by christian barranco
Modified: 2023-12-11 18:17 CET (History)
3 users (show)

See Also:
Source RPM: discover-5.27.5-1.mga9.src.rpm
CVE:
Status comment:


Attachments
Settings of Discover (76.35 KB, image/png)
2023-12-10 17:02 CET, christian barranco
Details
MGA9 packages are listed (140.68 KB, image/png)
2023-12-10 17:03 CET, christian barranco
Details

Description christian barranco 2023-12-10 17:01:33 CET
Description of problem: Discover, under its Installed menu, lists MGA9 packages, despite no MGA9 repos have been set in its Settings


Version-Release number of selected component (if applicable): 5.27.5


How reproducible: always


Steps to Reproduce:
1. Remove MGA repo files in /etc/yum.repos.d
2. Open Discover of Plasma
3. Add and select Flathub as the default source, in Settings
4. Click on the Installed menu at the bottom left
5. Packages installed by urpmi and from MGA repo are listed

I do confirm /etc/yum.repos.d folder is empty
christian barranco 2023-12-10 17:01:54 CET

Source RPM: -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ => discover-5.27.5-1.mga9.src.rpm

Comment 1 christian barranco 2023-12-10 17:02:22 CET
Created attachment 14206 [details]
Settings of Discover
Comment 2 christian barranco 2023-12-10 17:03:25 CET
Created attachment 14207 [details]
MGA9 packages are listed

Why are packages which are not from Flatpak listed?
Comment 3 Lewis Smith 2023-12-10 20:44:40 CET
> 1. Remove MGA repo files in /etc/yum.repos.d
Is this actually the right directory? It looks DNF-ish. man urpmi.files lists things like /var/lib/urpmi/, /etc/urpmi/.
BTAIM what about doing instead
 # urpmi.removemedia -a
or whatever the DNF equivalent is if you use that.

(In reply to christian squidf from comment #2)
> Created attachment 14207 [details]
> MGA9 packages are listed
> Why are packages which are not from Flatpak listed?
In this screenshot, the packages listed are indeed from MGA9; but they are listed to *remove*. Since they are already installed in the system, is this not sensible? You should not need repos to remove a package, surely only to install or update one.
Or would you expect Discover only to list packages installed from Flatpak? Do not know how this should work, but am not surprised it lists installed pkgs wherever they came from.

This is all iffy. If you want Discover to *install* new pkgs just from Flatpack, I would expect just those to be listed. If when wanting to install new packages it lists Mageia ones, that would indeed seem wrong.
And what should happen if you want to update an existing Mageia pkg? I guess it should only look for a more recent one in Flatpack.

CC'ing DaveH hoping he can throw some light on this.

CC: (none) => davidwhodgins, lewyssmith

Comment 4 Dave Hodgins 2023-12-10 21:41:24 CET
Installed discover and ran it. plasma-discover showed no packages available.

Ran plasma-discover-update, after which it does show the packages.
Looking at the settings, the m9 core release and core updates repos are selected.

Looking at the list of files in the package, there are files for flatpak, and
files for packagekit, so it's intentionally tied into distro packages as well
as flatpak.

In the Home section, when selecting an installed package such as vlc, it has
options to launch or remove. Selecting remove, it lists the packages that
will be removed, and launches the request for root password, as it should.

After installing an m9 package, which using dnf does not require the root
password, trying to uninstall it does require the root password.

Adding the flathub repo for flatpak installs does require the root password.

The discover package is a kde interface to packagekit and to flatpak for system
wide package installs. It is not used for user only flatpak installs. It's the
kde equivalent of rpmdrake.

In short, I believe this is working as intended.
Comment 5 christian barranco 2023-12-10 22:45:09 CET
Hi. Thanks for your tests.

If it is the normal behavior, it is a weird one. 

With this configuration, it will not find uninstalled packages from the mga repo; it only looks into FlatHub.
However, it does propose to uninstall packages previously installed with urpmi and from the mga repo.

I would have thought more logic to have Discover limiting its scope to FlatHub if not additional repo is provided.
Comment 6 Dave Hodgins 2023-12-10 23:38:46 CET
Did you run plasma-discover-update?

In the install where I tested it, dnf has the repos enabled for core release
and core updates only. I'm not sure if that's by default, or leftover from a
prior test.

If those repos are enabled, which you can check or change in the discover
settings, the packages in those repos are available for installation (system
wide), as per comment 4.

Flatpak on the other hand is not available unless you set up a repo for it
such as adding flathub from the settings dialog (top right).

I never did that as I was only ever using it for testing Mageia packages,
though others did test it with flathub enabled.
Comment 7 christian barranco 2023-12-11 00:33:19 CET
(In reply to Dave Hodgins from comment #6)
> Did you run plasma-discover-update?
> 
It is unlikely I had run it.

I just tried and got:

$ plasma-discover-update
adding empty sources model QStandardItemModel(0xea3140)
QCommandLineParser: option not defined: "feedback"
no component found for "org.mageia.mageia"
packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.269")
packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.269")


No change in Discover behavior. I still do see packages installed by urpmi and not from FlatHub.

Maybe it is the way it should. I still think it is strange and Discover should restrict itself to the repo set in Settings.
Comment 8 sturmvogel 2023-12-11 08:12:28 CET Comment hidden (obsolete)
Comment 9 sturmvogel 2023-12-11 08:12:38 CET
Why do you think so? If you remove all repositories from MCC you still see the installed packages and gives you the possibility to remove them. Both tools are acting the same way in this case. Both tools create a database of installed packages (Discover for flatpak and rpm. MCC only rpm).
Comment 10 christian barranco 2023-12-11 08:21:06 CET
(In reply to sturmvogel from comment #9)
> Why do you think so? If you remove all repositories from MCC you still see
> the installed packages and gives you the possibility to remove them. Both
> tools are acting the same way in this case. Both tools create a database of
> installed packages (Discover for flatpak and rpm. MCC only rpm).

In that way, indeed, it makes sense. Maybe I was too much after finding a way to segregate Flatpak management. Discover might not be the correct tool for that.

Thanks all for the discussion.

Resolution: (none) => WONTFIX
Status: NEW => RESOLVED

Comment 11 Morgan Leijström 2023-12-11 09:14:33 CET
My way of hiding our rpm from Discover:
For rpm packages, Discover use dnf repos, so I disabled them.
I use only urpmi for our repos.

CC: (none) => fri

Comment 12 christian barranco 2023-12-11 18:17:29 CET
(In reply to Morgan Leijström from comment #11)
> My way of hiding our rpm from Discover:
> For rpm packages, Discover use dnf repos, so I disabled them.
> I use only urpmi for our repos.

Hi. It is what I do as well. However, packages already installed with urpmi are displayed by Discover.

Note You need to log in before you can comment on or make changes to this bug.