From 60215ae865e639e9c5ecebcd0aef527abae29c66 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 9 Feb 2021 10:53:33 -0500 Subject: [PATCH] libpriv/rpm-util: Add /usr/lib/sysimage/rpm symlink in rpmdb checkout We don't technically need this yet, but it mirrors how it's set up in our composes so that if there's code that wants to use the new location too, it'll just work. --- src/libpriv/rpmostree-rpm-util.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libpriv/rpmostree-rpm-util.cxx b/src/libpriv/rpmostree-rpm-util.cxx index cd62ee98..c8d368b3 100644 --- a/src/libpriv/rpmostree-rpm-util.cxx +++ b/src/libpriv/rpmostree-rpm-util.cxx @@ -822,6 +822,12 @@ checkout_only_rpmdb (OstreeRepo *repo, if (symlinkat ("../../" RPMOSTREE_RPMDB_LOCATION, tmpdir->fd, "var/lib/rpm") == -1) return glnx_throw_errno_prefix (error, "symlinkat"); + /* And make a symlink from our *future* location too */ + if (!glnx_shutil_mkdir_p_at (tmpdir->fd, RPMOSTREE_SYSIMAGE_DIR, 0777, cancellable, error)) + return FALSE; + if (symlinkat ("../../../" RPMOSTREE_RPMDB_LOCATION, tmpdir->fd, RPMOSTREE_SYSIMAGE_RPMDB) == -1) + return glnx_throw_errno_prefix (error, "symlinkat"); + return TRUE; } -- 2.29.2