Bug 445761 - Discover shows "uninstall" button when viewing a locally-downloaded package that will replace an existing file if installed
Summary: Discover shows "uninstall" button when viewing a locally-downloaded package t...
Status: CONFIRMED
Alias: None
Product: Discover
Classification: Applications
Component: PackageKit (show other bugs)
Version: 5.23.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL: https://az764295.vo.msecnd.net/stable...
Keywords:
: 480284 485343 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-19 17:43 UTC by Christopher Yeleighton
Modified: 2024-04-11 19:27 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2021-11-19 17:43:14 UTC
SUMMARY
Discover offers me to remove a package I want to install.

STEPS TO REPRODUCE
1. Tell Discover to open the package code-1.62.3-1637137194.el7.x86_64.rpm.

OBSERVED RESULT
Discover allows me to remove the package.

EXPECTED RESULT
Discover should let me install the page.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Tumbleweed 20211117
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Christopher Yeleighton 2021-11-19 18:13:15 UTC
WORKAROUND
{ pkcon install-local "${p}"; }
Comment 2 Nate Graham 2021-11-23 22:52:27 UTC
Works for me. Can you attach a screenshot that shows the issue or error?

Also where did you get this package from?
Comment 3 Christopher Yeleighton 2021-11-24 05:51:43 UTC
(In reply to Nate Graham from comment #2)
> Works for me. Can you attach a screenshot that shows the issue or error?

You probably did not have a previous version installed.  I had used Discover to install the previous version and it had worked.

> Also where did you get this package from?

See URL!
Comment 4 Nate Graham 2021-11-24 06:12:33 UTC
That's just the suspicious-looking download link. Where did you find that link? And where can I get an older version of the package as well to test this?
Comment 5 Christopher Yeleighton 2021-11-24 07:02:28 UTC
(In reply to Nate Graham from comment #4)
> That's just the suspicious-looking download link. Where did you find that
> link? And where can I get an older version of the package as well to test
> this?

I(In reply to Nate Graham from comment #4)
> That's just the suspicious-looking download link. Where did you find that
> link?

<URL: https://code.visualstudio.com/Download >

> And where can I get an older version of the package as well to test
> this?

I still have the package code-1.62.2-1636665099.el7.x86_64.rpm but you would have to Skype me to get it because I do not know how to torrent things.
Comment 6 Christopher Yeleighton 2021-11-24 07:10:16 UTC
Also, some potentially misleading info: even when a package is locally installed, zypper keeps a copy in its cache.  It seems that Discover cannot really figure out what the version of a local package is (it certainly does not display it in the UI); it must have figured out that the package is already installed, so the only thing it can do is to uninstall it.  This is my wild hypothesis, so to say.

I told Discover to uninstall it (twice) and the result was the same.  The uninstaller process ran for a long time (the main part of it was updating the desktop DB).  After the first uninstall, Discover still claimed the package was installed even though it was not, so I told Discover to uninstall it for a 2nd time.  It did not help.
Comment 7 Christopher Yeleighton 2021-11-24 07:11:50 UTC
Not sure if it is relevant but when the package was uninstalled the zypper cache of it was still there.
Comment 8 Nate Graham 2021-11-24 19:59:33 UTC
OK, so let me see if I understand.

1. You manually installed "code-1.62.2-1636665099" from a file
2. You later manually installed "code-1.62.3-1637137194" from another file
3. Discover asked you if you wanted to remove "code"

Is that correct?

If so, this might be fixed by https://invent.kde.org/plasma/discover/-/merge_requests/208. If you have the ability to test merge requests (see https://community.kde.org/Infrastructure/GitLab#Testing_someone_else.27s_Merge_Request), could you try it out and see if it helps? Otherwise I'll need for you to post the link to code-1.62.2-1636665099 somewhere so I can test.
Comment 9 Christopher Yeleighton 2021-11-25 09:26:24 UTC
(In reply to Nate Graham from comment #8)
> OK, so let me see if I understand.
> 
> 1. You manually installed "code-1.62.2-1636665099" from a file

I told Discover to install it and they did.

> 2. You later manually installed "code-1.62.3-1637137194" from another file

I told Discover to open the package.  Discover offered me to uninstall it, so I told them to do so.
I told Discover to open the package.  Discover offered me to uninstall it, so I told them to do so.
I told Discover to open the package.  Discover offered me to uninstall it, so I lost hope and told PackageKit to install it instead.

> 3. Discover asked you if you wanted to remove "code"
> 
> Is that correct?

Not quite, see above.

> 
> If so, this might be fixed by
> https://invent.kde.org/plasma/discover/-/merge_requests/208. If you have the
> ability to test merge requests (see
> https://community.kde.org/Infrastructure/GitLab#Testing_someone_else.
> 27s_Merge_Request), could you try it out and see if it helps? Otherwise I'll
> need for you to post the link to code-1.62.2-1636665099 somewhere so I can
> test.

<URL: https://join.skype.com/invite/l1btZ7idBGt0 >
Comment 10 Nate Graham 2021-11-29 18:15:23 UTC
That URL took me to a Skype conversation. Can you post the file somewhere?
Comment 11 Christopher Yeleighton 2021-11-29 20:26:13 UTC
(In reply to Nate Graham from comment #10)
> That URL took me to a Skype conversation. Can you post the file somewhere?

I can upload the package via Skype.
Comment 12 Nate Graham 2021-11-29 20:27:40 UTC
Can you put it somewhere else, maybe?
Comment 13 Christopher Yeleighton 2021-11-29 20:29:49 UTC
(In reply to Nate Graham from comment #12)
> Can you put it somewhere else, maybe?

somewhere.kde.org
DNS_PROBE_FINISHED_NXDOMAIN

I probably can torrent it but I do not know how to.
Comment 14 Bug Janitor Service 2021-12-14 04:35:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Bug Janitor Service 2021-12-29 04:35:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 16 Christopher Yeleighton 2022-04-15 13:25:06 UTC
I have a package that contains a file <URL: file:///srv/www/htdocs/index.html >.  [!] Discover offers to remove the package even though it is not installed.  Removing the package results in an internal error toast.  This behaviour repeats.

Notes: 
1. the file <URL: file:///srv/www/htdocs/index.html > exists on my system but it does not belong to any package.
2. pkcon install-local --allow-untrusted mysteriously fails with a critical error (after an attempt to install the package).
3. zypp history does not mention anything except for PK_TMP_DIR manipulations.
4. pkcon install-local /var/tmp/build-root/home/abuild/rpmbuild/RPMS/noarch/http-dell-site-0-0.noarch.rpm
5. zypper in fails with Signature verification failed [6-File is unsigned].  I ignored the warning and the package installed all right.

I understand that all this background has nothing to do with Discover.  The problem with Discover is marked [!].
Comment 17 Nate Graham 2022-04-18 14:20:28 UTC
Can you maybe attach a screen recording that shows the problem? I'm having a hard time understanding what it is.
Comment 18 Christopher Yeleighton 2022-04-18 15:54:49 UTC
(In reply to Nate Graham from comment #17)
> Can you maybe attach a screen recording that shows the problem? I'm having a
> hard time understanding what it is.

Discover opens a Red Hat package that I have just built.  It is a brand new package that has never existed before.  The package replaces an existing file under /srv.  The file did not belong to any package.  Discover offers a button to uninstall the new package.  So the video is: open the package, observe the [Delete] button active in Discover.
Comment 19 Nate Graham 2022-04-18 17:03:52 UTC
OK, thanks. I wonder if this could be a bug in PackageKit itself.
Comment 20 Christopher Yeleighton 2022-04-18 18:11:01 UTC
(In reply to Nate Graham from comment #19)
> OK, thanks. I wonder if this could be a bug in PackageKit itself.

I consider that a fact, considering how `pkcon` is unable to handle the situation or even attempt to diagnose it.  I hope you will report it  upstream (since the observable behaviour of `pkcon` does not directly correspond to the API calls emitted by Discover).
Comment 21 Christopher Yeleighton 2022-10-19 17:12:05 UTC
A distro example: I cannot update libffi8-3.4.3-1.1 to 3.4.3-2.1 (downloaded and opened in Discover).

plasma-discover[25858]: could not find an executable desktop file for QUrl("file:///home/dell/Pobrane/libffi8-3.4.3-2.1.x86_64.rpm") among ("/usr/lib64/libffi.so.8", "/usr/lib64/libffi.so.8.1.1", "/usr/share/licenses/libffi8", "/usr/share/licenses/libffi8/LICENSE")

19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          current:    /1_bcdccecd
19:00:58        PackageKit          emit added: /1_bcdccecd
Transactions:
 1      /1_bcdccecd
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[running] exclusive[1] background[0]
1       unknown /2_bdcbebda     state[new] exclusive[0] background[0]
'
19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          last:       /1_bcdccecd
19:00:58        PackageKit          current:    /1_bcdccecd
19:00:58        PackageKit          current:    /2_bdcbebda
19:00:58        PackageKit          emit added: /2_bdcbebda
Transactions:
 1      /1_bcdccecd
 2      /2_bdcbebda
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[running] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[ready] exclusive[1] background[0]
'
/1_bcdccecd     allow_cancel 1
/1_bcdccecd     percentage   -1
19:00:58        PackageKit          role now get-details-local
/1_bcdccecd     role         get-details-local
/1_bcdccecd     status       setup
/2_bdcbebda     allow_cancel 1
/2_bdcbebda     percentage   -1
19:00:58        PackageKit          role now get-files-local
/2_bdcbebda     role         get-files-local
/2_bdcbebda     status       wait
daemon locked=1
19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          last:       /1_bcdccecd
19:00:58        PackageKit          last:       /2_bdcbebda
19:00:58        PackageKit          current:    /1_bcdccecd
19:00:58        PackageKit          current:    /2_bdcbebda
19:00:58        PackageKit          current:    /3_bdcaddee
19:00:58        PackageKit          emit added: /3_bdcaddee
Transactions:
 1      /1_bcdccecd
 2      /2_bdcbebda
 3      /3_bdcaddee
19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          last:       /1_bcdccecd
19:00:58        PackageKit          last:       /2_bdcbebda
19:00:58        PackageKit          last:       /3_bdcaddee
19:00:58        PackageKit          current:    /1_bcdccecd
19:00:58        PackageKit          current:    /2_bdcbebda
19:00:58        PackageKit          current:    /3_bdcaddee
19:00:58        PackageKit          current:    /4_ddadeecc
19:00:58        PackageKit          emit added: /4_ddadeecc
Transactions:
 1      /1_bcdccecd
 2      /2_bdcbebda
 3      /3_bdcaddee
 4      /4_ddadeecc
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[running] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[ready] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[ready] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[ready] exclusive[1] background[0]
'
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[running] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[ready] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[ready] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[ready] exclusive[1] background[0]
'
/3_bdcaddee     allow_cancel 1
/3_bdcaddee     percentage   -1
19:00:58        PackageKit          role now resolve
/3_bdcaddee     role         resolve
/3_bdcaddee     status       wait
/4_ddadeecc     allow_cancel 1
/4_ddadeecc     percentage   -1
19:00:58        PackageKit          role now resolve
/4_ddadeecc     role         resolve
/4_ddadeecc     status       wait
/1_bcdccecd     status       query
/1_bcdccecd     status       finished
/1_bcdccecd     exit code: success
daemon locked=0
19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          last:       /1_bcdccecd
19:00:58        PackageKit          last:       /2_bdcbebda
19:00:58        PackageKit          last:       /3_bdcaddee
19:00:58        PackageKit          last:       /4_ddadeecc
19:00:58        PackageKit          current:    /2_bdcbebda
19:00:58        PackageKit          current:    /3_bdcaddee
19:00:58        PackageKit          current:    /4_ddadeecc
19:00:58        PackageKit          emit removed: /1_bcdccecd
Transactions:
 1      /2_bdcbebda
 2      /3_bdcaddee
 3      /4_ddadeecc
/2_bdcbebda     status       setup
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[running] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[ready] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[ready] exclusive[1] background[0]
4       unknown /5_edeeaeab     state[new] exclusive[0] background[0]
'
/2_bdcbebda     status       query
/2_bdcbebda     percentage   0
/2_bdcbebda     status       finished
/2_bdcbebda     exit code: success
19:00:58        PackageKit          emit transaction-list-changed
19:00:58        PackageKit          last:       /2_bdcbebda
19:00:58        PackageKit          last:       /3_bdcaddee
19:00:58        PackageKit          last:       /4_ddadeecc
19:00:58        PackageKit          current:    /3_bdcaddee
19:00:58        PackageKit          current:    /4_ddadeecc
19:00:58        PackageKit          emit removed: /2_bdcbebda
Transactions:
 1      /3_bdcaddee
 2      /4_ddadeecc
/3_bdcaddee     status       setup
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[finished] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[running] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[ready] exclusive[1] background[0]
4       unknown /5_edeeaeab     state[new] exclusive[0] background[0]
'
/3_bdcaddee     status       query
daemon locked=1
19:00:59        PackageKit          emit transaction-list-changed
19:00:59        PackageKit          last:       /3_bdcaddee
19:00:59        PackageKit          last:       /4_ddadeecc
19:00:59        PackageKit          current:    /3_bdcaddee
19:00:59        PackageKit          current:    /4_ddadeecc
19:00:59        PackageKit          current:    /5_edeeaeab
19:00:59        PackageKit          emit added: /5_edeeaeab
Transactions:
 1      /3_bdcaddee
 2      /4_ddadeecc
 3      /5_edeeaeab
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[finished] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[running] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[ready] exclusive[1] background[0]
4       depends-on      /5_edeeaeab     state[ready] exclusive[1] background[0]
'
/5_edeeaeab     allow_cancel 1
/5_edeeaeab     percentage   -1
19:00:59        PackageKit          role now depends-on
/5_edeeaeab     role         depends-on
/5_edeeaeab     status       wait
/3_bdcaddee     status       finished
/3_bdcaddee     exit code: success
daemon locked=0
19:01:02        PackageKit          emit transaction-list-changed
19:01:02        PackageKit          last:       /3_bdcaddee
19:01:02        PackageKit          last:       /4_ddadeecc
19:01:02        PackageKit          last:       /5_edeeaeab
19:01:02        PackageKit          current:    /4_ddadeecc
19:01:02        PackageKit          current:    /5_edeeaeab
19:01:02        PackageKit          emit removed: /3_bdcaddee
Transactions:
 1      /4_ddadeecc
 2      /5_edeeaeab
/4_ddadeecc     status       setup
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[finished] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[finished] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[running] exclusive[1] background[0]
4       depends-on      /5_edeeaeab     state[ready] exclusive[1] background[0]
'
/4_ddadeecc     status       query
/4_ddadeecc     status       finished
/4_ddadeecc     exit code: success
19:01:02        PackageKit          emit transaction-list-changed
19:01:02        PackageKit          last:       /4_ddadeecc
19:01:02        PackageKit          last:       /5_edeeaeab
19:01:02        PackageKit          current:    /5_edeeaeab
19:01:02        PackageKit          emit removed: /4_ddadeecc
Transactions:
 1      /5_edeeaeab
/5_edeeaeab     status       setup
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[finished] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[finished] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[finished] exclusive[1] background[0]
4       depends-on      /5_edeeaeab     state[running] exclusive[1] background[0]
'
/5_edeeaeab     status       query
/5_edeeaeab     percentage   0
/5_edeeaeab     percentage   20
/5_edeeaeab     status       finished
19:01:02        PackageKit          emit transaction-list-changed
19:01:02        PackageKit          last:       /5_edeeaeab
19:01:02        PackageKit          emit removed: /5_edeeaeab
Transactions:
 [none]

** (pkmon:31210): WARNING **: 19:01:02.782: failed to adopt: Did not find the specified package.
Daemon state: 'State:
0       get-details-local       /1_bcdccecd     state[finished] exclusive[1] background[0]
1       get-files-local /2_bdcbebda     state[finished] exclusive[1] background[0]
2       resolve /3_bdcaddee     state[finished] exclusive[1] background[0]
3       resolve /4_ddadeecc     state[finished] exclusive[1] background[0]
4       depends-on      /5_edeeaeab     state[finished] exclusive[1] background[0]
'
19:01:20        PackageKit          notify::connected
daemon connected=0
Comment 22 Christopher Yeleighton 2022-12-01 13:30:39 UTC
Here is a trace of uninstalling a local RedHat package.  Note how Discover installs the package.  You have to take my word for the fact that the button in Discover is labelled [Uninstall].

Transactions:
 [none]
daemon connected=0
daemon connected=1
network status=online
Transactions:
 1      /1_edddaece
/1_edddaece     allow_cancel 1
/1_edddaece     percentage   -1
/1_edddaece     role         install-files
/1_edddaece     status       setup
/1_edddaece     status       dep-resolve
/1_edddaece     percentage   0
/1_edddaece     percentage   100
/1_edddaece     percentage   0
/1_edddaece     package-id   google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR
/1_edddaece     package      installing:google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR:Google Chrome (beta)
/1_edddaece     status       finished
/1_edddaece     exit code: success
Transactions:
 [none]
Transactions:
 1      /2_ccdbbdee
/2_ccdbbdee     allow_cancel 1
/2_ccdbbdee     percentage   -1
/2_ccdbbdee     role         install-files
/2_ccdbbdee     status       setup
/2_ccdbbdee     status       dep-resolve
/2_ccdbbdee     percentage   0
/2_ccdbbdee     percentage   100
/2_ccdbbdee     status       install
/2_ccdbbdee     percentage   0
/2_ccdbbdee     status       download
/2_ccdbbdee     package-id   google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR
/2_ccdbbdee     package      downloading:google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR:Google Chrome (beta)
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,100 [download]
/2_ccdbbdee     percentage   100
/2_ccdbbdee     status       install
/2_ccdbbdee     package      installing:google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR:Google Chrome (beta)
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,50 [install]
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,0 [install]
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,75 [install]
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,83 [install]
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,100 [install]
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,0 [install]
˙…
/2_ccdbbdee     item-progress google-chrome-beta;108.0.5359.71-1;x86_64;PK_TMP_DIR,100 [install]
/2_ccdbbdee     status       finished
/2_ccdbbdee     exit code: success
Transactions:
 [none]
daemon connected=0
Comment 23 Nate Graham 2022-12-01 20:23:46 UTC
I believe you, I just can't reproduce it myself.
Comment 24 Christopher Yeleighton 2022-12-02 01:10:54 UTC
(In reply to Nate Graham from comment #23)
> I believe you, I just can't reproduce it myself.

InstallApplicationButton declares that action is a read-only; this probably means that the label cannot be changed while the application page is open.  When you open a local package that is installed, Discover offers to uninstall the package.  So far, so good.  It does not offer to update the package because it does not know it can.  So what.   You can uninstall and install, right?  So you uninstall and the action text does not change.  So you think that uninstall failed and you press the action button once more.  But this time the application gets installed.  And everybody is confused, as requested XD
Comment 25 Nate Graham 2024-02-15 05:17:31 UTC
*** Bug 480284 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2024-04-11 19:27:31 UTC
*** Bug 485343 has been marked as a duplicate of this bug. ***