From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-703945-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 56DE713877A
	for <garchives@archives.gentoo.org>; Mon, 16 Jun 2014 03:40:32 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id EB8CDE0BCF;
	Mon, 16 Jun 2014 03:40:24 +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 2D1A6E0B92
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:23 +0000 (UTC)
Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1934933F7D6
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:22 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by spoonbill.gentoo.org (Postfix) with ESMTP id 53761188A2
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:20 +0000 (UTC)
From: "Brian Dolbec" <brian.dolbec@gmail.com>
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" <brian.dolbec@gmail.com>
Message-ID: <1402792601.8f39978eb3940a96413b8405ae2dc199507e329d.dol-sen@gentoo>
Subject: [gentoo-commits] proj/layman:master commit in: layman/overlays/, layman/, doc/
X-VCS-Repository: proj/layman
X-VCS-Files: doc/layman.8.txt layman/config.py layman/overlays/tar.py
X-VCS-Directories: layman/overlays/ layman/ doc/
X-VCS-Committer: dol-sen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: 8f39978eb3940a96413b8405ae2dc199507e329d
X-VCS-Branch: master
Date: Mon, 16 Jun 2014 03:40:20 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: bdc6d68b-6819-4ca6-8dba-a94962e49d0d
X-Archives-Hash: 2f2e822b9b010ded3813f8e714a49302
Message-ID: <20140616034020.MxLcrbHwcAMWtXx4EQi9YyOHEF9eqDCnfCwaSA_ceuc@z>

commit:     8f39978eb3940a96413b8405ae2dc199507e329d
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 14 21:59:14 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Jun 15 00:36:41 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=8f39978e

Adds clean_tar configuration option

---
 doc/layman.8.txt       | 6 ++++++
 layman/config.py       | 3 ++-
 layman/overlays/tar.py | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/layman.8.txt b/doc/layman.8.txt
index 0819570..3918d37 100644
--- a/doc/layman.8.txt
+++ b/doc/layman.8.txt
@@ -240,6 +240,12 @@ nocheck::
     Set to "yes" if *layman* should stop worrying about overlays
     with missing a contact address or the description.
 
+clean_tar::
+    Set to "yes" if *layman* will delete tar files downloaded
+    when installing tar overlays. 'Note':: This option is only
+    applicable to remote tar overlays. *layman* will leave the
+    reponsibility of deleting local tar files up to the user.
+    By default, *layman* will delete downloaded tar files.
 
 Per repository type Add, Sync options.
 

diff --git a/layman/config.py b/layman/config.py
index 31dc0ac..761dd57 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -107,6 +107,7 @@ class BareConfig(object):
             'auto_sync': 'No',
             'conf_type': 'make.conf',
             'require_repoconfig': 'Yes',
+            'clean_tar': 'yes',
             'make_conf' : '%(storage)s/make.conf',
             'repos_conf': '/etc/portage/repos.conf/layman.conf',
             'conf_module': ['make_conf', 'repos_conf'],
@@ -132,7 +133,7 @@ class BareConfig(object):
             'rsync_command': path([self.root, EPREFIX,'/usr/bin/rsync']),
             'svn_command': path([self.root, EPREFIX,'/usr/bin/svn']),
             'tar_command': path([self.root, EPREFIX,'/bin/tar']),
-            't/f_options': ['nocheck', 'require_repoconfig'],
+            't/f_options': ['clean_tar', 'nocheck', 'require_repoconfig'],
             'bzr_addopts' : '',
             'bzr_syncopts' : '',
             'cvs_addopts' : '',

diff --git a/layman/overlays/tar.py b/layman/overlays/tar.py
index e5d10b6..4999e20 100644
--- a/layman/overlays/tar.py
+++ b/layman/overlays/tar.py
@@ -99,7 +99,7 @@ class TarOverlay(OverlaySource):
 
     def _extract(self, base, tar_url, dest_dir):
         ext = '.tar.noidea'
-        clean_tar = True
+        clean_tar = self.config['clean_tar']
         for i in [('tar.%s' % e) for e in ('bz2', 'gz', 'lzma', 'xz', 'Z')] \
                 + ['tgz', 'tbz', 'taz', 'tlz', 'txz']:
             candidate_ext = '.%s' % i