Opened 11 years ago

Closed 10 years ago

#10278 closed bug (fixed)

Various quirks related to upgrading Haiku via pkgman

Reported by: waddlesplash Owned by: bonefish
Priority: normal Milestone: R1
Component: Servers/package_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I'm on hrev46438. When adding the BuildBot-updated package repo for x86gcc2h (http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current/) pkgman detected the updates. It successfully downloaded them, but then hit kernel panic on install.

It reboots into hrev46438 again.

Attachments (1)

Képernyőfotó 2013-12-04 - 21.30.23.png (141.9 KB ) - added by miqlas 11 years ago.
hrev46452 KDL in VmWare

Download all attachments as: .zip

Change History (20)

comment:1 by kallisti5, 11 years ago

I actually just did a successful hrev warp!

Process:

  • Closed all non-essential programs
  • Added the http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current/ repo to pkgman
  • Performed a pkgman update, pkgman found haiku, haiku_x86, etc to be upgraded.
  • When the upgrade began:
    • The text in the Vision irc window disappeared (but I could see the username < + >'s)
    • The text disappeared in the replicant on the desktop
    • The text in the terminal took on a "squished" appearance
    • Input server stopped, however after 30 seconds or a minute, I regained mouse control
  • After the update finished, I did a "makebootable /boot" to avoid the /bin/sh: error -1 errors.
  • shutdown -r

When the machine came back up, I was at the new hrev and my ~/config + all my files were still in tact.

I then needed to point the pkgman HaikuPorts repo to the correct hrev.

I literally think this is the first successful online Haiku upgrade ever :D went from: gcc2h hrev46452 -> hrev46472

Last edited 11 years ago by kallisti5 (previous) (diff)

comment:2 by waddlesplash, 11 years ago

Platform: Allx86
Summary: Kernel panic on updating packagesVarious quirks related to upgrading Haiku via pkgman

Changed title and set to x86, we won't be talking about non-x86 arches here.

comment:3 by korli, 11 years ago

waddlesplash, any KDL info?

comment:4 by anevilyak, 11 years ago

Platform: x86All

Nothing about the package upgrade process is inherently arch-specific.

comment:5 by bonefish, 11 years ago

The system upgrade is not really supported yet. It probably needs special handling in the package kit solver and the package manager (libsolv, our dependency solving backend, does have a distribution upgrade mode which we don't use yet). Furthermore package daemon and packagefs need some support for this as well, so we don't actually replace the system while it is still running.

comment:6 by waddlesplash, 11 years ago

I was going to post KDL info, but then kallisti5 tried it and it apparently works on hrev46452. So somewhere in those 12 commits it got fixed -- so there's no need to post KDL info.

comment:7 by kallisti5, 11 years ago

@waddlesplash go ahead and post the KDL if you have it. Like I said, I think it was dumb luck that it worked for me. I'm sure if you try enough times it will work... Or explode your installation :-)

by miqlas, 11 years ago

hrev46452 KDL in VmWare

comment:8 by waddlesplash, 11 years ago

Mine didn't KDL the second time. It actually updated. All the same issues that kallisti5 mentioned still happened, and additionally I noticed that the old packages (hrev46438 packages) were not uninstalled, simply deactivated.

in reply to:  8 comment:9 by miqlas, 11 years ago

Replying to waddlesplash: Mine also KDL'ed only the first time, and then updated correctly. The old packages surely haven't deleted. But i lost some settings: for example the Deskbar replicants.

comment:10 by kallisti5, 11 years ago

I've made a habbit of cleaning up older hrev packages. It seems during an upgrade, the old package is left behind so you amount a collection of haiku-...hrev1233, haiku-...hrev1234, haiku-...hrev1235, etc

Enter /boot/system/packages and select all of the haiku*-hrev1233 - 1234 packages and throw them away. You will then be prompted to uninstall any packages that depend on that version.

I've been through 4-5 "upgrades" now, and things are still working ok. I do lose my replicants though each time as miqlas pointed out.

comment:11 by Giova84, 11 years ago

Just for the record, i've tried to upgrade my Haiku installation "offline" (from another installation), replacing older packages with newer ones. All worked fine and i haven't lost my replicants.

in reply to:  11 comment:12 by stippi, 11 years ago

Replying to Giova84:

Just for the record, i've tried to upgrade my Haiku installation "offline" (from another installation), replacing older packages with newer ones. All worked fine and i haven't lost my replicants.

It is expected that this works. You can also "jam @your-profile update-packages" to update your Haiku image from source.

The flakiness with live-updates however is that Package FS unpublishes files from running applications and also data files. This triggers node-monitoring events, so that for example app_server unloads font files. I am not sure what more serious problems it may cause, but see comment:5.

comment:13 by bonefish, 11 years ago

hrev47189 introduces some basic support for online updates. The package daemon does now track two different packages states: one that reflects the currently active packages (i.e. the ones packagefs shows) and the latest state of the packages directory. Only the latter can be changed by PM operations. In fact ATM HaikuDepot and pkgman are only aware of the latter.

Usually both states are identical and changes to the latter will also immediately be reflected by the former (e.g. when a new package is installed). However, when a system package ("haiku[_<arch>]") is affected, the states will diverge. The active state will remain unchanged, while changes are applied to the latest state only.

There still are some open issues -- like making the package managers aware of the two states, and executing post-install scripts properly -- but in principle pkgman update (respectively pkgman full-sync) should now update the system just fine.

comment:14 by waddlesplash, 11 years ago

I can confirm that the online updates feature works great now. Two things:

  1. The "Haiku logo" in the boot screen still vanishes after an update
  2. After changing the HaikuPorts repo from "<id>" to "current", I get this error when trying to install or remove any packages: "failed to add system packages to system repository: Name not found". (This was also noted by Rene here: http://www.freelists.org/post/haiku-commits/haiku-hrev47203-srckitspackage-srcserverspackage-headersospackage,1)

Much better than before, kudos to Oliver and Ingo for this! :)

comment:15 by bonefish, 11 years ago

The Haiku logo is there only when the build has been configured as an official build. I guess the builds for the package repositories on haiku-files.org simply haven't been configured this way. So this actually demonstrates a feature -- one can cross-update between official and unofficial builds. ;-)

The bug that caused 2. is fixed in hrev47205.

in reply to:  15 comment:16 by umccullough, 11 years ago

Replying to bonefish:

The Haiku logo is there only when the build has been configured as an official build. I guess the builds for the package repositories on haiku-files.org simply haven't been configured this way.

Indeed - I believe the packages on haiku-files.org are being updated by our buildbot slaves whenever they successfully compile another revision (see the end of the freebsd build process for example http://96.234.66.26:8010/builders/x86-FreeBSD-host/builds/2598 )

I'm actually a bit surprised the nightlies are built as "official" either - I guess because they're built with an official configuration.

comment:17 by ttcoder, 11 years ago

Tried an update today as the nightly updates resumed, but got a wrong checksum; might be just me (and my connection) though, will try again tomorrow.

Finished downloading haiku-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg.
Validating checksum for http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current//packages/haiku-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg...
Validating checksum for http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current//packages/haiku-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg complete.
Downloading haiku_x86-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg...
##################################################
Finished downloading haiku_x86-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg.
Validating checksum for http://www.haiku-files.org/haiku/master/repo/x86_gcc2/current//packages/haiku_x86-r1~alpha4_pm_hrev47307-1-x86_gcc2.hpkg...
Checksum error:
*** expected 'ab2c0680c16cab6efc1b5aa69aa68b742f0a19079df0b852887c0df2826567b4'
*** got      '32e63a55af8317604bcf1dcd149ccd3c7f90ad5ba35212accd705d7c94936824'*** failed to download package: Bad data

comment:18 by jessicah, 11 years ago

I just upgraded from hrev47092 to hrev47313 without any major issues (had to reset as shutdown didn't finish), so likely was a network issue in your case, ttcoder.

comment:19 by waddlesplash, 10 years ago

Resolution: fixed
Status: newclosed

Since this has worked for weeks now, and the images now are built with an official configuration, I'm closing this ticket. Any remaining issues should constitute opening a new ticket.

Note: See TracTickets for help on using tickets.