Open sidt4 opened 1 year ago
I can confirm this issue on KDE
Journalctl have next concerning entries
сен 24 23:06:32 oleg-pc PackageKit[512]: не удалось получить файл 'core.db' из mirror.yandex.ru : Could not resolve host: mirror.yandex.ru
сен 24 23:06:32 oleg-pc PackageKit[512]: too many errors from mirror.yandex.ru, skipping for the remainder of this transaction
сен 24 23:06:32 oleg-pc PackageKit[512]: не удалось получить файл 'core.db' из mirror.kpfu.ru : Could not resolve host: mirror.kpfu.ru
сен 24 23:06:32 oleg-pc PackageKit[512]: too many errors from mirror.kpfu.ru, skipping for the remainder of this transaction
сен 24 23:06:32 oleg-pc PackageKit[512]: не удалось получить файл 'core.db' из mirror.nw-sys.ru : Could not resolve host: mirror.nw-sys.ru
сен 24 23:06:32 oleg-pc PackageKit[512]: too many errors from mirror.nw-sys.ru, skipping for the remainder of this transaction
сен 24 23:06:32 oleg-pc PackageKit[512]: не удалось получить файл 'core.db' из mirror.kamtv.ru : Could not resolve host: mirror.kamtv.ru
сен 24 23:06:32 oleg-pc PackageKit[512]: too many errors from mirror.kamtv.ru, skipping for the remainder of this transaction
сен 24 23:06:32 oleg-pc PackageKit[512]: не удалось получить файл 'core.db' из mirror.truenetwork.ru : Could not resolve host: mirror.truenetwork.ru
сен 24 23:06:32 oleg-pc PackageKit[512]: too many errors from mirror.truenetwork.ru, skipping for the remainder of this transaction
With https://github.com/PackageKit/PackageKit/pull/784, here is the correct error message.
$ cat offline-update-competed
[PackageKit Offline Update Results]
Success=false
ErrorCode=failed-initialization
ErrorDetails=failed to update database: invalid url for server
which implies that libalpm
tries to connects to network during offline update. This is confirmed by the logs from journalctl -xb -1
as shown in above comment as well.
Should packagekit-offline-update.service
depend on network-online.target
(which will not be offline anymore) ?
Should
packagekit-offline-update.service
depend onnetwork-online.target
(which will not be offline anymore) ?
It shouldn't. All downloads and preparation should happen prior to the update being executed.
The invalid url for server
was from backends/alpm/pk-alpm-update.c#L267-L272.
result = alpm_db_update (priv->alpm, dbs, force);
if (result < 0) {
g_set_error (error, PK_ALPM_ERROR, alpm_errno (priv->alpm), "failed to update database: %s",
alpm_strerror (alpm_errno (priv->alpm)));
return FALSE;
}
It appears that we shouldn't be doing db update.
So, maybe PackageKit's use of libalpm
API is not correct for the offline update use case. I can confirm the same update succeeds when online (via PK_OFFLINE_UPDATE_TEST=1
).
Offline update completed and re-booted successfully.
All data below are after offline update boot:
/var/lib/PackageKit/transactions.db ( transactions.db.zip )