Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH 1/2] snapshot: do not preserve owner/group
Date: Tue, 06 Oct 2015 20:33:06
Message-Id: 1444163573-11337-1-git-send-email-vapier@gentoo.org
1 There's no need to preserve ownership on the files we sync into the
2 snapshot, so just let rsync create them as it will (current uid/gid).
3 This slightly speeds things up when the files are owned by a non-root
4 user too.
5 ---
6 catalyst/targets/snapshot.py | 2 +-
7 1 file changed, 1 insertion(+), 1 deletion(-)
8
9 diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
10 index 6007aaa..e1ca7b7 100644
11 --- a/catalyst/targets/snapshot.py
12 +++ b/catalyst/targets/snapshot.py
13 @@ -56,7 +56,7 @@ class snapshot(TargetBase, GenBase):
14 ensure_dirs(mytmp)
15
16 target_snapshot = self.settings["portdir"] + "/ " + mytmp + "/%s/" % self.settings["repo_name"]
17 - cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ " +
18 + cmd("rsync -a --no-o --no-g --delete --exclude /packages/ --exclude /distfiles/ " +
19 "--exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* " +
20 target_snapshot,
21 "Snapshot failure", env=self.env)
22 --
23 2.5.2

Replies