summaryrefslogtreecommitdiffstats
path: root/qt-ostree
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2016-04-28 14:08:27 +0200
committerRainer Keller <Rainer.Keller@qt.io>2016-04-28 12:16:07 +0000
commita6a733593d9396b61176386471c2ce17f404a3af (patch)
treea8cb0df7c0be5c8a590a9f0b30700ca22d8b863f /qt-ostree
parentc90e2c9d70ee396ddc671b3fe8e28578228fe48a (diff)
Preserve file permissions when extracting the root filesystem
Change-Id: Ie5fa9c99bcdaa9bea4ac7c12136037d8638e78f2 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Diffstat (limited to 'qt-ostree')
-rwxr-xr-xqt-ostree/qt-ostree8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ostree/qt-ostree b/qt-ostree/qt-ostree
index d2407f1..6a702f9 100755
--- a/qt-ostree/qt-ostree
+++ b/qt-ostree/qt-ostree
@@ -736,16 +736,16 @@ extract_sysroot()
mkdir boot-mount rootfs-mount
mount -o loop,offset=${boot_offset} ${image} boot-mount/
mount -o loop,offset=${rootfs_offset} ${image} rootfs-mount/
- cp -r${VERBOSE}d boot-mount/* ${BOOT_FILE_PATH}
- cp -r${VERBOSE}d rootfs-mount/* ${GENERATED_TREE}
+ cp -rp${VERBOSE}d boot-mount/* ${BOOT_FILE_PATH}
+ cp -rp${VERBOSE}d rootfs-mount/* ${GENERATED_TREE}
else
# Extract *.tar.gz image files.
for image in ${SYSROOT_IMAGE_PATH}/*.tar.gz ; do
qt_ostree_info "Extracting ${image} ..."
if [[ $(basename ${image}) == *boot* ]] ; then
- tar -C ${BOOT_FILE_PATH} -x${VERBOSE}f ${image}
+ tar --preserve -C ${BOOT_FILE_PATH} -x${VERBOSE}f ${image}
else
- tar -C ${GENERATED_TREE} -x${VERBOSE}f ${image}
+ tar --preserve -C ${GENERATED_TREE} -x${VERBOSE}f ${image}
fi
done
fi