Opened 4 years ago

#16187 new bug

HaikuDepot; PackageInfo - Understand and Document "IsLocalFile"

Reported by: apl-haiku Owned by: apl-haiku
Priority: low Milestone: Unscheduled
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

(c.f. #16161)

The class PackageInfo has a method IsLocalFile which seems to be an mixture of "is there a file on disk" and "is the package installed".

This is a bit confusing. If I look at an installed package on my test system then I see that there is an empty value for fLocalFilePath , but the package is ACTIVE as it's state which is the case if there is an value in fInstallationLocations.

This is used in PackageInfoView to control if the contents is available...

TabAt(TAB_CONTENTS)->SetEnabled(
  package.Get() != NULL
    && (package->State() == ACTIVATED || package->IsLocalFile()));

...but really it's more logical if this logic only checked that the package is presented or is accessible as a file.

Having said that, there is some logic in PackageContentsView::_PopulatePackageContents which locates the HPKG to show and it is dealing with the installation locations -- so perhaps this is just a case of clarifying the actual purpose of this IsLocalFile.

Change History (0)

Note: See TracTickets for help on using tickets.