Kaydet (Commit) 7ceba263 authored tarafından Barış Metin's avatar Barış Metin

use pisi.conf for compression level... approved by Faik.

üst 7267bdee
......@@ -144,8 +144,8 @@ class ArchiveTar(ArchiveBase):
if self.tar.mode == 'wb' and self.type == 'tarlzma':
batch = None
if ctx.get_option('compression_level'):
batch = "lzmash -k -%s %s" % (ctx.get_option('compression_level'), self.file_path)
if ctx.config.values.build.compressionlevel:
batch = "lzmash -k -%s %s" % (ctx.config.values.build.compressionlevel, self.file_path)
else:
batch = "lzmash -k %s" % self.file_path
......
......@@ -381,8 +381,6 @@ unpack, setup, build, install, package
default=False, help=_("don't install build dependencies, fail if a build dependency is present"))
self.parser.add_option("-F", "--package-format", action="store", default='1.1',
help=_("pisi package format"))
self.parser.add_option("-c", "--compression-level", action="store", default=None,
help=_("LZMA compression level, 1 through 9"))
def run(self):
if not self.args:
......@@ -403,16 +401,6 @@ unpack, setup, build, install, package
if ctx.get_option('package_format') not in Build.package_formats:
raise Error(_('package_format must be one of %s ') % pisi.util.strlist(Build.package_formats))
if ctx.get_option('compression_level'):
if ctx.get_option('package_format') != "1.1":
raise Error(_('compression level is for lzma compression'))
try:
if int(ctx.get_option('compression_level')) not in range(1, 10):
raise Error(_('compression level must be between 1 and 9'))
except ValueError:
raise Error(_('compression level must be an integer'))
if ctx.get_option('output_dir'):
ctx.ui.info(_('Output directory: %s') % ctx.config.options.output_dir)
else:
......
......@@ -19,7 +19,6 @@
#
#[general]
#destinationdirectory = /
#buildhelper = None / ccache / icecream
#autoclean = False
#
#[build]
......@@ -30,6 +29,8 @@
#CXXFLAGS= -mtune=i686 -O2 -pipe -fomit-frame-pointer
#LDFLAGS=
#buildno=True # necessary for generating build nos
#buildhelper = None / ccache / icecream
#compressionlevel = 7
#
#[directories]
#lib_dir = /var/lib/pisi
......@@ -57,7 +58,6 @@ class Error(pisi.Error):
class GeneralDefaults:
"""Default values for [general] section"""
destinationdirectory = "/"
buildhelper = None
autoclean = False
distribution = "Pardus"
distribution_release = "1.1"
......@@ -74,6 +74,8 @@ class BuildDefaults:
cxxflags = "-mtune=i686 -O2 -pipe -fomit-frame-pointer"
ldflags = ""
buildno = False
buildhelper = None
compressionlevel = 7
class DirsDefaults:
"Default values for [directories] section"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment