Skip to content

Commit 8df797d

Browse files
authored
Merge pull request #3389 from jlebon/pr/drop-finalize-staged-path
boot: Drop ostree-finalize-staged.path
2 parents 364e22f + 2b9912e commit 8df797d

File tree

5 files changed

+9
-36
lines changed

5 files changed

+9
-36
lines changed

Makefile-boot.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
4040
src/boot/ostree-remount.service \
4141
src/boot/ostree-boot-complete.service \
4242
src/boot/ostree-finalize-staged.service \
43-
src/boot/ostree-finalize-staged.path \
4443
src/boot/ostree-finalize-staged-hold.service \
4544
src/boot/ostree-state-overlay@.service \
4645
$(NULL)
@@ -69,7 +68,6 @@ EXTRA_DIST += src/boot/dracut/module-setup.sh \
6968
src/boot/mkinitcpio \
7069
src/boot/ostree-boot-complete.service \
7170
src/boot/ostree-prepare-root.service \
72-
src/boot/ostree-finalize-staged.path \
7371
src/boot/ostree-remount.service \
7472
src/boot/ostree-finalize-staged.service \
7573
src/boot/ostree-finalize-staged-hold.service \

src/boot/ostree-finalize-staged.path

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/libostree/ostree-impl-system-generator.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ require_internal_units (const char *normal_dir, const char *early_dir, const cha
111111

112112
if (!glnx_shutil_mkdir_p_at (normal_dir_dfd, "multi-user.target.wants", 0755, cancellable, error))
113113
return FALSE;
114-
if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-finalize-staged.path", normal_dir_dfd,
115-
"multi-user.target.wants/ostree-finalize-staged.path")
116-
< 0)
117-
return glnx_throw_errno_prefix (error, "symlinkat");
118114
if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-boot-complete.service", normal_dir_dfd,
119115
"multi-user.target.wants/ostree-boot-complete.service")
120116
< 0)

src/libostree/ostree-sysroot-deploy.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,6 +3785,15 @@ ostree_sysroot_stage_tree_with_options (OstreeSysroot *self, const char *osname,
37853785
if (booted_deployment == NULL)
37863786
return glnx_prefix_error (error, "Cannot stage deployment");
37873787

3788+
const char *const systemctl_argv[]
3789+
= { "systemctl", "start", "ostree-finalize-staged.service", NULL };
3790+
int estatus;
3791+
if (!g_spawn_sync (NULL, (char **)systemctl_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL,
3792+
NULL, &estatus, error))
3793+
return FALSE;
3794+
if (!g_spawn_check_exit_status (estatus, error))
3795+
return FALSE;
3796+
37883797
g_autoptr (OstreeDeployment) deployment = NULL;
37893798
if (!sysroot_initialize_deployment (self, osname, revision, origin, opts, &deployment,
37903799
cancellable, error))

tests/kolainst/destructive/staged-deploy.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in
1212
sed -i -e 's,gpg-verify=true,gpg-verify=false,' /etc/ostree/remotes.d/*.conf
1313

1414
# Test our generator
15-
test -f /run/systemd/generator/multi-user.target.wants/ostree-finalize-staged.path
1615
test -f /run/systemd/generator/local-fs.target.requires/ostree-remount.service
1716

1817
cat >/etc/systemd/system/sock-to-ignore.socket << 'EOF'
@@ -49,11 +48,8 @@ EOF
4948
ostree commit --no-bindings --parent="${commit}" -b staged-deploy -I --consume t
5049
newcommit=$(ostree rev-parse staged-deploy)
5150
orig_mtime=$(stat -c '%.Y' /sysroot/ostree/deploy)
52-
systemctl show -p SubState ostree-finalize-staged.path | grep -q waiting
5351
systemctl show -p ActiveState ostree-finalize-staged.service | grep -q inactive
54-
systemctl show -p TriggeredBy ostree-finalize-staged.service | grep -q path
5552
ostree admin deploy --stage staged-deploy
56-
systemctl show -p SubState ostree-finalize-staged.path | grep running
5753
systemctl show -p ActiveState ostree-finalize-staged.service | grep active
5854
new_mtime=$(stat -c '%.Y' /sysroot/ostree/deploy)
5955
test "${orig_mtime}" != "${new_mtime}"

0 commit comments

Comments
 (0)