aboutsummaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-03-11 15:52:43 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-03-11 15:52:43 -0400
commitdfc4eade8441122f8d47b9fbf9a48f28e1a6ccae (patch)
tree182504703206ada222d54722d734a3014864c67e /src/install.c
parent036c47663b846cfdee9b05992d848aaff6153347 (diff)
downloadspmc-dfc4eade8441122f8d47b9fbf9a48f28e1a6ccae.tar.gz
Relocate files as we go, for now.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/install.c b/src/install.c
index 0858c5c..3dff8f6 100644
--- a/src/install.c
+++ b/src/install.c
@@ -298,6 +298,10 @@ int spm_do_install(SPM_Hierarchy *fs, ManifestList *mf, StrList *packages) {
spm_install_show_package(requirements[i]);
spm_install(fs, tmpdir, package_path);
+
+ // Relocate installation root
+ relocate_root(fs->rootdir, tmpdir);
+
spm_install_package_record(fs, tmpdir, requirements[i]->name);
num_installed++;
free(package_path);
@@ -310,9 +314,6 @@ int spm_do_install(SPM_Hierarchy *fs, ManifestList *mf, StrList *packages) {
free(package_dir);
if (num_installed != 0) {
- // Relocate installation root
- relocate_root(fs->rootdir, tmpdir);
-
// Append a trailing slash to tmpdir to direct rsync to copy files, not the directory, into destroot
sprintf(source, "%s%c", tmpdir, DIRSEP);