Opened 6 years ago

Closed 4 years ago

#14840 closed bug (fixed)

HaikuDepot doesn't autorefresh repos on first Launch.

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

Description

When launching HaikuDepot on a freshly installed Haiku system, the "All Packages" tab doesn't contain a complete inventory of software @ Haikuports, and could give a first impression of "Haiku doesn't have any software"

I think the repos are pre-populated with the software available in the Jam build repos? After manually doing a refresh, the full set of packages on the "All packages" tab are visible.

HaikuDepot should attempt an autorefesh on first launch? Open to ideas.

hrev52775

Change History (11)

comment:1 by vidrep, 5 years ago

hrev53152 x86_64

This is still a problem on fresh installs. Only 4 packages show up in the "featured Packages" tab on first boot. After refreshing the repositories, then the list is fully populated.

comment:2 by diver, 4 years ago

Milestone: R1R1/beta2

According to videos on youtube and Telegram this gives a really bad first impression on Haiku itself. With haiku-master-hrev54185-x86_64-anyboot.iso only 4 packages show up in HD.

Last edited 4 years ago by diver (previous) (diff)

comment:3 by diver, 4 years ago

Tried again with haiku-master-hrev54249-x86_64-anyboot.iso.

Booted to the Desktop without installing.

It appears that the problem is that /system/cache/package-repositories/HaikuPorts is only ~70KiB. After refreshing the repos it jumps to 1.24MiB and displays all the packages.

I wonder why HaikuPorts cache is so small in the iso?

Last edited 4 years ago by diver (previous) (diff)

comment:4 by waddlesplash, 4 years ago

Because these are the build-packages repository files, which contain only the packages required to build Haiku itself.

comment:5 by diver, 4 years ago

Though so. Should HaikuDepot force the update if HaikuPorts cache file is less than 1mb? Or something more sophisticated is better?

comment:6 by waddlesplash, 4 years ago

It should just plain force it on first startup (i.e. if there is no HaikuDepot cache, also refresh repos.)

comment:7 by apl-haiku, 4 years ago

Owner: changed from stippi to apl-haiku
Status: newassigned

I have had a look through this. The logic is actually there to refresh from the remote repo, but it is only happening when there is no cache present. When Haiku is installed it has a cache present from the build process so HaikuDepot does not download the repo data. As it happens, easy to fix, but there are a few options as to how to best approach this.

  • Create a background task / script to run independently of HaikuDepot when Haiku first starts in order to update the repositories' data and don't make a change in HaikuDepot's logic at all.
  • Update the repositories' data on every start of HaikuDepot and every time that the user chooses "Refresh repositories"
  • Update the repositories' data only the first time that HaikuDepot runs and every time that the user chooses "Refresh repositories"
  • Update the repositories' data at most once a week as well as when HaikuDepot first runs as well as every time that the user chooses "Refresh repositories"

Downloading the data each run of HaikuDepot is not always quick and adds to the overhead at start time. Any thoughts from the audience?

comment:8 by waddlesplash, 4 years ago

Options 3 and 4 sound the best; if the cache files are over a week old, run the upgrade; or if this is the first time HaikuDepot is starting, run the upgrade.

comment:9 by waddlesplash, 4 years ago

Change merged in hrev54276. Diver, please test :)

comment:10 by diver, 4 years ago

While there is no fresh beta2 image yet I guess I can test using a regular nightly.

comment:11 by diver, 4 years ago

Resolution: fixed
Status: assignedclosed

Compiled HaikuDepot from master and tested it on pre-beta2 install and it's working. Thanks!

Note: See TracTickets for help on using tickets.