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

Bug#927128: live-build: [PATCH] replaced tar with rsync as it is much more efficient in both space and time



Hi

> If one were to accept rsync as dependency (I'm not opposed), please
> also add rsync to live-build's Depends: field.

OK, attached is a new version of the patch that also adds rsync to the
depends field.


Cheers

Ronny

>From d72ec72d57aab9a7e84a4afe0dc81cbc17e7fb93 Mon Sep 17 00:00:00 2001
From: Ronny Standtke <ronny.standtke@gmx.net>
Date: Mon, 15 Apr 2019 23:32:17 +0200
Subject: [PATCH] replaced tar with rsync as it is much more efficient in both
 space and time

---
 debian/control                | 1 +
 scripts/build/chroot_includes | 8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/debian/control b/debian/control
index e06630e2f..7130215ac 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Package: live-build
 Architecture: all
 Depends:
  debootstrap,
+ rsync,
  ${misc:Depends},
 Recommends:
  apt-utils,
diff --git a/scripts/build/chroot_includes b/scripts/build/chroot_includes
index 6ab4e288d..051c45ddc 100755
--- a/scripts/build/chroot_includes
+++ b/scripts/build/chroot_includes
@@ -41,13 +41,7 @@ Create_lockfile .lock
 if Find_files config/includes.chroot/
 then
 	# Copying includes
-	cd config/includes.chroot
-	Echo_message "Creating a tarball with files from includes.chroot..."
-	tar cf "${OLDPWD}"/chroot/includes.chroot.tar .
-	cd "${OLDPWD}"
-	Echo_message "Extracting the tarball in the chroot..."
-	Chroot chroot "tar -xvf includes.chroot.tar --no-same-owner --keep-directory-symlink --overwrite"
-	rm chroot/includes.chroot.tar
+	rsync -Klrv --chown=0:0 config/includes.chroot/ chroot/
 
 	# Creating stage file
 	Create_stagefile .build/includes.chroot
-- 
2.11.0


Reply to: