summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2014-06-14 17:59:14 -0400
committerDevan Franchini <twitch153@gentoo.org>2014-06-14 20:36:41 -0400
commit8f39978eb3940a96413b8405ae2dc199507e329d (patch)
treed19bb30b7b81a0236e319be5dfc03536f1d2dc07
parenttar.py: Adds file:// support for tar overlays (diff)
downloadlayman-8f39978eb3940a96413b8405ae2dc199507e329d.tar.gz
layman-8f39978eb3940a96413b8405ae2dc199507e329d.tar.bz2
layman-8f39978eb3940a96413b8405ae2dc199507e329d.zip
Adds clean_tar configuration option2.1.0
-rw-r--r--doc/layman.8.txt6
-rw-r--r--layman/config.py3
-rw-r--r--layman/overlays/tar.py2
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