-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 28 Apr 2014 15:57:07 -0400
Ralph Bean <rbean(a)redhat.com> wrote:
This is for
https://fedorahosted.org/rel-eng/ticket/5362#comment:17
---
mash/__init__.py | 1 +
mash/config.py | 2 ++
mash/metadata.py | 7 +++++++
3 files changed, 10 insertions(+)
diff --git a/mash/__init__.py b/mash/__init__.py
index 997c0ce..61e2001 100644
--- a/mash/__init__.py
+++ b/mash/__init__.py
@@ -102,6 +102,7 @@ class Mash:
md.set_cachedir(repocache)
md.set_skipstat(gofast)
md.set_database(self.config.use_sqlite)
+ md.set_compress_type(self.config.compress_type)
md.set_hash(self.config.hash)
if comps and self.config.compsfile:
md.set_comps(self.config.compsfile)
diff --git a/mash/config.py b/mash/config.py
index 2b12034..3292359 100644
--- a/mash/config.py
+++ b/mash/config.py
@@ -40,6 +40,7 @@ class MashConfig(config.BaseConfig):
repodir = config.Option('/mnt/koji')
compsfile = config.Option()
use_sqlite = config.BoolOption(True)
+ compress_type = config.Option('xz')
use_repoview = config.BoolOption(False)
hash = config.Option('sha256')
repoviewurl = config.Option('http://localhost/%(arch)s')
@@ -79,6 +80,7 @@ class MashDistroConfig(config.BaseConfig):
cachedir = config.Inherit(MashConfig.cachedir)
compsfile = config.Inherit(MashConfig.compsfile)
use_sqlite = config.Inherit(MashConfig.use_sqlite)
+ compress_type = config.Inherit(MashConfig.compress_type)
hash = config.Inherit(MashConfig.hash)
use_repoview = config.Inherit(MashConfig.use_repoview)
repoviewurl = config.Inherit(MashConfig.repoviewurl)
diff --git a/mash/metadata.py b/mash/metadata.py
index 3158086..b3e33ed 100644
--- a/mash/metadata.py
+++ b/mash/metadata.py
@@ -59,6 +59,10 @@ class MetadataOld:
def set_database(self, db):
self.args.append('-d')
+ def set_compress_type(self, compress_type):
+ self.args.append('--compress-type')
+ self.args.append(compress_type
+
def set_hash(self, hashtype):
# Sorry, can't do that here.
pass
@@ -123,6 +127,9 @@ class MetadataNew:
def set_database(self, db):
self.conf.database = db
+ def set_compress_type(self, compress_type):
+ self.conf.compress_type = compress_type
+
def set_hash(self, hashtype):
self.conf.sumtype = hashtype
Applied fixing the missing ) thanks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJTX/IjAAoJEH7ltONmPFDRJeQP/iK1B65kg+PTsEfg1N7x4t1h
Bvh3zhdT8RJfpPPNKAcvPyE0uw6lIPG9BSLwWbSto/6ABuEcEqBkV+RkFTGJASUA
Wckuktcju2xy/WhH7SjfB+830ekZxTDZQjnQnjsPs/deI1RsS19kd7flMlKs3rF4
IEty6pKBtTq17MgPiAXn8BIe5Sas6BetzSsZzzdYmyrQHUl/XRnfRTaQi1bB59A+
O3C2iIiuEYoueOiP/lVEwvF8B5JgofVeQtsMPTTKxcCmIzHhdQi+NQn5jwD0ECPp
whkpDb3J1Pui0dbUI7hsQBi1oEzrF+fgr4E0DI5oWv0jBDjbVP5eDri7EInhf5Et
a3/dKZYVzQpO0rbd3qzDYYvjYFaK3Q+6UfyH63Q6VUyrm7rjMgt3UEo2IS5Z5cue
edGCdXIw+k5bxp3MA2U3r4BlgoQA/IJ9s5MccXLXxj5/QI6iyMcQ1lLycUQjRIRL
kJrFnUtK17lnAHVuMtP8AgSNTNFoLZHd92UYT71PLHy42NJQNg6GEjOwTYDnqHvn
0f3E+1IrG+K6a+tNHqbM3c0JohtpCTpfoFBScU2PtR/vSl3z/SXq+34EZtQQ0xFB
kiuuGCwJy49jPs1xZ14udpAH8sUpECBpWhnO/ANiKMPwc0WhYeAq8HijekiOZZlc
uZ6R0cQmMnSlYx97n+ZV
=Bi4R
-----END PGP SIGNATURE-----