From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EF8721389E2 for ; Thu, 4 Dec 2014 20:04:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76091E08FA; Thu, 4 Dec 2014 20:04:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8806E08F2 for ; Thu, 4 Dec 2014 20:04:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FB78340598 for ; Thu, 4 Dec 2014 20:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C3FD5B947 for ; Thu, 4 Dec 2014 20:04:31 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1417722995.dfb277c58f8b0d55c1b0c9884cd91f3204888b38.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/rsync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/modules/rsync/rsync.py X-VCS-Directories: pym/portage/sync/modules/rsync/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: dfb277c58f8b0d55c1b0c9884cd91f3204888b38 X-VCS-Branch: plugin-sync Date: Thu, 4 Dec 2014 20:04:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9950823d-6ce0-4aa7-9b11-f7f43f13a645 X-Archives-Hash: 668a32c1ebdcb702e84e096713ceef81 commit: dfb277c58f8b0d55c1b0c9884cd91f3204888b38 Author: Zac Medico gentoo org> AuthorDate: Wed Oct 22 10:59:32 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:56:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dfb277c5 RsyncSync: support file:// sync-uri This will be useful for unit tests that will sync from a local file:// sync-uri. --- pym/portage/sync/modules/rsync/rsync.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py index 76d83f2..74c10e7 100644 --- a/pym/portage/sync/modules/rsync/rsync.py +++ b/pym/portage/sync/modules/rsync/rsync.py @@ -66,6 +66,9 @@ class RsyncSync(SyncBase): rsync_opts = self._validate_rsync_opts(rsync_opts, syncuri) self.rsync_opts = self._rsync_opts_extend(opts, rsync_opts) + self.extra_rsync_opts = portage.util.shlex_split( + self.settings.get("PORTAGE_RSYNC_EXTRA_OPTS","")) + # Real local timestamp file. self.servertimestampfile = os.path.join( self.repo.location, "metadata", "timestamp.chk") @@ -93,6 +96,14 @@ class RsyncSync(SyncBase): except: maxretries = -1 #default number of retries + if syncuri.startswith("file://"): + self.proto = "file" + dosyncuri = syncuri[6:] + is_synced, exitcode = self._do_rsync( + dosyncuri, timestamp, opts) + self._process_exitcode(exitcode, dosyncuri, out, 1) + return (exitcode, exitcode == os.EX_OK) + retries=0 try: self.proto, user_name, hostname, port = re.split( @@ -116,8 +127,6 @@ class RsyncSync(SyncBase): getaddrinfo_host = hostname[1:-1] updatecache_flg=True all_rsync_opts = set(self.rsync_opts) - self.extra_rsync_opts = portage.util.shlex_split( - self.settings.get("PORTAGE_RSYNC_EXTRA_OPTS","")) all_rsync_opts.update(self.extra_rsync_opts) family = socket.AF_UNSPEC From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4D8771389E2 for ; Thu, 4 Dec 2014 20:16:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40846E091E; Thu, 4 Dec 2014 20:16:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A7453E0918 for ; Thu, 4 Dec 2014 20:16:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E1BB134059A for ; Thu, 4 Dec 2014 20:16:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D7E8B94A for ; Thu, 4 Dec 2014 20:16:11 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1417722995.dfb277c58f8b0d55c1b0c9884cd91f3204888b38.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/rsync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/modules/rsync/rsync.py X-VCS-Directories: pym/portage/sync/modules/rsync/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: dfb277c58f8b0d55c1b0c9884cd91f3204888b38 X-VCS-Branch: master Date: Thu, 4 Dec 2014 20:16:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f2b49477-83dd-46cd-b451-0e1b2ea2463f X-Archives-Hash: 6082f9718f30f0c223f2db79ff8c5b17 Message-ID: <20141204201611.euzs1pW0mdoHDU4i66eyOo7NumIZUpTT3VQZgymcjeQ@z> commit: dfb277c58f8b0d55c1b0c9884cd91f3204888b38 Author: Zac Medico gentoo org> AuthorDate: Wed Oct 22 10:59:32 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:56:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dfb277c5 RsyncSync: support file:// sync-uri This will be useful for unit tests that will sync from a local file:// sync-uri. --- pym/portage/sync/modules/rsync/rsync.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py index 76d83f2..74c10e7 100644 --- a/pym/portage/sync/modules/rsync/rsync.py +++ b/pym/portage/sync/modules/rsync/rsync.py @@ -66,6 +66,9 @@ class RsyncSync(SyncBase): rsync_opts = self._validate_rsync_opts(rsync_opts, syncuri) self.rsync_opts = self._rsync_opts_extend(opts, rsync_opts) + self.extra_rsync_opts = portage.util.shlex_split( + self.settings.get("PORTAGE_RSYNC_EXTRA_OPTS","")) + # Real local timestamp file. self.servertimestampfile = os.path.join( self.repo.location, "metadata", "timestamp.chk") @@ -93,6 +96,14 @@ class RsyncSync(SyncBase): except: maxretries = -1 #default number of retries + if syncuri.startswith("file://"): + self.proto = "file" + dosyncuri = syncuri[6:] + is_synced, exitcode = self._do_rsync( + dosyncuri, timestamp, opts) + self._process_exitcode(exitcode, dosyncuri, out, 1) + return (exitcode, exitcode == os.EX_OK) + retries=0 try: self.proto, user_name, hostname, port = re.split( @@ -116,8 +127,6 @@ class RsyncSync(SyncBase): getaddrinfo_host = hostname[1:-1] updatecache_flg=True all_rsync_opts = set(self.rsync_opts) - self.extra_rsync_opts = portage.util.shlex_split( - self.settings.get("PORTAGE_RSYNC_EXTRA_OPTS","")) all_rsync_opts.update(self.extra_rsync_opts) family = socket.AF_UNSPEC