Opened 8 months ago

Closed 6 weeks ago

#14821 closed bug (fixed)

In stand-alone window, add "Uninstall" button when applicable

Reported by: humdinger Owned by: leavengood
Priority: normal Milestone: Unscheduled
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #15154
Has a Patch: no Platform: All

Description

This is hrev52739.

When you double-click a HPKG, it's opened in a stand-alone HaikuDepot window. Here, you'll always get an "Install" button, even if the package is already installed. In that case, it should show an "Uninstall" button instead.

Change History (5)

comment:1 by taos, 8 months ago

Oh, and maybe close the window after a successful installation or give another indication (e.g. change "Install" to "Uninstall") that everything (incl. dependencies) is installed...

comment:2 by leavengood, 6 weeks ago

I started digging into this, and it seems when loading a package file in this way, the "state" of the PackageInfo in HaikuDepot is never initialized, and when that is the case the install button is shown.

HaikuDepot and the Package Kit is new to me but it does not seem obvious how to determine if a package is installed. The BPackageInfo from the package kit doesn't seem to contain that information. I imagine the code has to query something else to determine the state of the package but my Linux machine locked up before I could dig much further, and it is getting late for me.

I may dig into this more later this week.

comment:3 by diver, 6 weeks ago

Blocking: 15154 added

comment:4 by leavengood, 6 weeks ago

Owner: changed from stippi to leavengood
Status: newin-progress

comment:5 by leavengood, 6 weeks ago

Resolution: fixed
Status: in-progressclosed

Merged in hrev53354.

Note: See TracTickets for help on using tickets.