[devel] [PATCH for rpm] Add triggers circumvension for packagekit offline update
Dmitry V. Levin
ldv на altlinux.org
Пт Ноя 1 21:58:44 MSK 2019
On Thu, Oct 31, 2019 at 04:19:16PM +0300, Aleksei Nikiforov wrote:
> 31.10.2019 15:59, Dmitry V. Levin пишет:
> > On Thu, Oct 31, 2019 at 02:58:08PM +0300, Aleksei Nikiforov wrote:
> >> Joint change with Oleg Solovyov (mcpain@)
> >
> > Thanks.
> >
> > It's not clear from the commit message why one might need to disable
> > rpmdb --rebuilddb after rpm update.
> >
> > Could you elaborate, please?
>
> packagekit offline update is implemented in following way:
> 1) system is preparing for offline update: all new installed packages
> are downloaded, etc.
> 2) system is rebooting into special systemd offline update mode upon
> user request.
> 3) in this offline update mode packagekit offline update service is
> performing system update using packagekit service activated via dbus.
> 4) Last step of systemd offline update is a reboot request. It must be
> made by offline update service. And packagekit offline update service
> does request it.
>
> Thus, rpmdb --rebuilddb from rpm scripts would be in race against reboot
> request. Testing showed that it doesn't work properly in such
> conditions. In best case, rpmdb --rebuilddb doesn't do anything at all
> before reboot happens. Instead of hoping to get it work properly in such
> conditions, disabling it in rpm scripts and calling it right after
> update but before reboot request from packagekit offline update works fine:
OK, I cannot say that I like this approach, but at least it makes sense.
The alternative is invoking pk-offline-update in a separate pid namespace
which is probably not as simple as disabling rpm %post.
Could you add the rationale from your post into the commit message,
please?
--
ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : signature.asc
Тип : application/pgp-signature
Размер : 801 байтов
Описание: отсутствует
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20191101/636d63a0/attachment.bin>
Подробная информация о списке рассылки Devel