Upgrade from R1Beta1 to R1Beta2 (release candidate 2) via Terminal

Earlier today, I ran into a problem installing the new Beta2 release candidate 2. Since the Installer of the ISO image version won’t let you overwrite an already existing Haiku partition on the hard drive, and the SoftwareUpdater application won’t work anymore on Beta1, so you can’t upgrade using that, I didn’t know how to get Beta2 (in the guise of its current release candidate 2) onto my Haiku machine at all, until PulkoMandy (cheers!) kindly pointed me to an as-yet unpublished draft detailing a procedure: https://github.com/haiku/website/pull/376/files. You can upgrade via the Terminal which is a BASh shell und should be familiar to all Linux users. And here’s the thing: pkgman, the Package Manager, still works from the Terminal in Beta1, even though the SoftwareUpdater and HaikuDepot don’t! For all of you who have a similar upgrading problem but are (like me) not developers or particularly tech-savvy and (like me) can’t figure it out for themselves, here’s what I extracted from said fairly long and complicated writ:

  1. Update the Package Manager: pkgman update
  2. Cut off the old repositories (Beta 1): pkgman drop haiku
    pkgman drop haikuports
  3. Connect to the new repositories (Beta 2): pkgman add-repo https://eu.hpkg.haiku-os.org/haiku/r1beta2/$(getarch)/current
  4. Repeat step 3, replace .…/haiku/… with …/haikuports/…
  5. Type pkgman full-sync. The pkgman will now download tons of stuff, a lot of it being the Haiku User Manual in 99 languages. Go get yourself a cup of coffee.
  6. When full-sync is done, reboot.
    That’s it. Upon restart, you will be greeted by Beta2 with all your old settings and downloads preserved. Worked fine for me. And I could finally get the LibreOffice port I needed… (yay, there is a 32-bit version!)

When I type and execute in termina: pkgman get-repo https://eu.hpkg.haiku-os.org/haiku/r1beta2/%24(getarch)/current
I get: bash: syntax error near unexpected token `(’
Not working for me.

Check your command, or type it manually instead of copy-pasting.
And where does the get-repo comes from? @BarefootMartina’s post uses add-repo.

So here is what @BarefootMartina wrote and underneath your version, let’s compare them:

pkgman add-repo https://eu.hpkg.haiku-os.org/haiku/r1beta2/$(getarch)/current
pkgman get-repo https://eu.hpkg.haiku-os.org/haiku/r1beta2/%24(getarch)/current

I see some differences.


Please note that, while the above should still work, it was only meant as a temporary hack for upgrading to release candidate 2 of Beta 2. Now that Beta 2 is out officially, there is also an official upgrade procedure (see “Get Haiku”). It’s fairly identical, but as it turns out, you can drop the “drop repo” step.
@Man2ai: And, yes, it’s add-repo, not get-repo. Always double-check your typing when working from the command line - in my (rookie’s) experience, most of the times when the computer returns an error message it’s something trivial like a forgotten blank or “,” instead of “.” The computer doesn’t understand what you type and therefore can’t guess what you mean (as a human would easily do when you say “get” instead of “add”), it just processes the input it gets.

I went to the link provided https://github.com/haiku/website/pull/376/files
and copy and paste the commands from there. That worked.