[ostree] admin: Use linkcopy_sync_data() for initramfs instead of rename()



commit 5565735bcbd94a718e1f557dc8890da4248b1617
Author: Colin Walters <walters verbum org>
Date:   Mon Apr 15 12:50:58 2013 -0400

    admin: Use linkcopy_sync_data() for initramfs instead of rename()
    
    It's possible (likely even) that /tmp is on a separate filesystem; in
    that case, a raw rename() is going to fail.
    
    Saw this on the ostree.gnome.org builder.

 src/ostree/ot-admin-builtin-update-kernel.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-update-kernel.c b/src/ostree/ot-admin-builtin-update-kernel.c
index a6546c2..fe4de98 100644
--- a/src/ostree/ot-admin-builtin-update-kernel.c
+++ b/src/ostree/ot-admin-builtin-update-kernel.c
@@ -175,10 +175,11 @@ generate_initramfs (OtAdminUpdateKernel  *self,
           goto out;
         }
 
-      if (!gs_file_rename (initramfs_tmp_file, ret_initramfs_path,
-                           cancellable, error))
+      if (!gs_file_linkcopy_sync_data (initramfs_tmp_file, ret_initramfs_path,
+                                       G_FILE_COPY_OVERWRITE,
+                                       cancellable, error))
         goto out;
-
+      
       if (!gs_shutil_rm_rf (tmpdir, cancellable, error))
         goto out;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]