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 21A011381F3 for ; Sat, 24 Aug 2013 23:06:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3305E0AB3; Sat, 24 Aug 2013 23:06:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5CF2BE0AB3 for ; Sat, 24 Aug 2013 23:06:50 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 06B8D33EBF7 for ; Sat, 24 Aug 2013 23:06:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A937CE468F for ; Sat, 24 Aug 2013 23:06:47 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1377385371.3bbdf6579d88c0abe77519e0148dd0a7dcc7d3fe.blueness@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/, doc/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/config.py WebappConfig/worker.py doc/webapp-config.8.xml X-VCS-Directories: WebappConfig/ doc/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 3bbdf6579d88c0abe77519e0148dd0a7dcc7d3fe X-VCS-Branch: master Date: Sat, 24 Aug 2013 23:06:47 +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: 87bd010f-36d2-49c7-aaaf-b3d69c4aca1b X-Archives-Hash: c8f3a37d82bf63cf394340e61f9a1a27 commit: 3bbdf6579d88c0abe77519e0148dd0a7dcc7d3fe Author: Devan Franchini hotmail com> AuthorDate: Fri Aug 23 19:39:31 2013 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Aug 24 23:02:51 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=3bbdf657 Webappconfig/{config.py,worker.py}: Adds configurable --copy option. This allows for altering the value of vhost_link_type in /etc/vhosts/webapp-config to copy files by default when installing a webapp as opposed to soft-linking or hard-linking. This patch also repairs the previous damage in which the behavior of the --copy flag was being ignored; due to the fact that the boolean g_copy was not being passed down throughout the program because of the extra --cp flag. Man page alterations have also been made to reflect the removal of the --cp flag in the program. X-Gentoo-Bug: 231482 X-Gentoo-Bug-URL: https://bugs.gentoo.org/231482 Signed-off-by: Anthony G. Basile gentoo.org> --- WebappConfig/config.py | 11 ++++++----- WebappConfig/worker.py | 2 +- doc/webapp-config.8.xml | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WebappConfig/config.py b/WebappConfig/config.py index bb86a55..26eab59 100644 --- a/WebappConfig/config.py +++ b/WebappConfig/config.py @@ -490,8 +490,7 @@ class Config: ' when creating virtual files. : some pack' 'ages will not work if you use this option') - group.add_option('--cp', - '--copy', + group.add_option('--copy', action='store_true', help = 'Directly copy the webapp files from' ' the /usr/share/webapps/ directory when installing' @@ -1027,12 +1026,14 @@ class Config: self.config.set('USER', 'g_link_type', 'soft') - elif (self.config.has_option('USER', 'g_copy') and - self.config.getboolean('USER', 'g_copy')): + elif ((self.config.has_option('USER', 'vhost_link_type') and + self.config.get('USER', 'vhost_link_type') == 'soft') or + (self.config.has_option('USER', 'g_copy') and + self.config.getboolean('USER', 'g_copy'))): OUT.debug('Selecting copying of links', 7) - self.config.set('USER', 'g_link_type', 'clone') + self.config.set('USER', 'g_link_type', 'copy') else: diff --git a/WebappConfig/worker.py b/WebappConfig/worker.py index 250f068..5b10060 100644 --- a/WebappConfig/worker.py +++ b/WebappConfig/worker.py @@ -508,7 +508,7 @@ class WebappAdd: if self.__v: OUT.warn('Failed to softlink (' + str(e) + ')') - elif self.__link_type == 'clone': + elif self.__link_type == 'copy': try: OUT.debug('Trying to copy files directly', 8) diff --git a/doc/webapp-config.8.xml b/doc/webapp-config.8.xml index 5b0048b..459e301 100644 --- a/doc/webapp-config.8.xml +++ b/doc/webapp-config.8.xml @@ -473,7 +473,6 @@ - Use this option to create the virtual copy by copying the files from the /usr/share/webapps/ directories.