main/swclock-offset: update dependency tree cache (MR 2244)

If the system time jumps back and forth before installing the package
"swclock-offset", OpenRC can get confused whether the current dependency
tree is old or new. To resolve this confusion, the dependency tree cache
is updated within the post-install script of the openrc subpackage.
This commit is contained in:
Jakob Hauser 2021-06-10 17:00:23 +02:00 committed by Alexey Minnekhanov
parent 2c224f7bdd
commit 5f7a5aa7a4
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
2 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,6 @@
# Maintainer: Jakob Hauser <jahau@rocketmail.com>
pkgname=swclock-offset
pkgver=0.1
pkgver=0.2
pkgrel=0
pkgdesc="Keep system time at an offset to a non-writable RTC"
url="https://gitlab.com/postmarketOS/pmaports"

View file

@ -7,6 +7,11 @@
# The service "swclock-offset-boot" needs to run after the sysfs has
# been mounted. As the sysfs is mounted in runlevel sysinit, assigning
# the service to runlevel boot is enough to keep the order.
#
# Before installation of the package "swclock-offset", the system time
# might jump back and forth. Because of this, OpenRC can get confused
# whether the cached dependency tree is old or new. To avoid this
# uncertainty, an update of the dependency tree cache is triggered here.
# replace service hwclock by osclock
rc-update -q del hwclock boot
@ -15,3 +20,6 @@ rc-update -q add osclock boot
# assign swclock-offset services to runlevels
rc-update -q add swclock-offset-boot boot
rc-update -q add swclock-offset-shutdown shutdown
# update dependency tree cache
rc-update -q --update