From 4e589ddff48eb69e08fffc9bbdd9351061fd3f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 12 Mar 2006 14:19:30 +0000 Subject: [PATCH] =?UTF-8?q?ccache=20veya=20icecream=20config=20i=C3=A7inde?= =?UTF-8?q?=20belirtilsin,=20=C3=B6ntan=C4=B1ml=C4=B1=20hi=C3=A7bir=C5=9Fe?= =?UTF-8?q?y=20kullanmas=C4=B1n.=20configfile'da=20typo=20fixleri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/build.py | 18 ++++++++++-------- pisi/configfile.py | 6 ++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 80e8dd7b..0d372cf2 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -208,14 +208,16 @@ class Builder: # First check icecream, if not found use ccache, no need to use both # together (according to kde-wiki it cause performance loss) - if os.path.exists("/opt/icecream/bin/gcc"): - # Add icecream directory for support distributed compiling :) - os.environ["PATH"] = "/opt/icecream/bin/:" + os.environ["PATH"] - ctx.ui.info(_("IceCream detected. Make sure your daemon is up and running...")) - elif os.path.exists("/usr/lib/ccache/bin/gcc"): - # Add ccache directory for support Compiler Cache :) - os.environ["PATH"] = "/usr/lib/ccache/bin/:" + os.environ["PATH"] - ctx.ui.info(_("CCache detected...")) + if ctx.config.values.general.buildhelper == "icecream": + if os.path.exists("/opt/icecream/bin/gcc"): + # Add icecream directory for support distributed compiling :) + os.environ["PATH"] = "/opt/icecream/bin/:%s" % os.environ["PATH"] + ctx.ui.info(_("IceCream detected. Make sure your daemon is up and running...")) + elif ctx.config.values.general.buildhelper == "ccache": + if os.path.exists("/usr/lib/ccache/bin/gcc"): + # Add ccache directory for support Compiler Cache :) + os.environ["PATH"] = "/usr/lib/ccache/bin/:%s" % os.environ["PATH"] + ctx.ui.info(_("CCache detected...")) def fetch_files(self): self.specdiruri = dirname(self.specuri.get_uri()) diff --git a/pisi/configfile.py b/pisi/configfile.py index ee87eb12..e1e7715f 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -18,7 +18,8 @@ # having an INI like format like below. # #[general] -#destinationdirectory = /tmp +#destinationdirectory = / +#buildhelper = None / ccache / icecream #autoclean = False # #[build] @@ -56,9 +57,10 @@ class Error(pisi.Error): class GeneralDefaults: """Default values for [general] section""" destinationdirectory = "/" + buildhelper = None autoclean = False distribution = "Pardus" - distribution_release = "0.1" + distribution_release = "1.0" http_proxy = os.getenv("HTTP_PROXY") or None https_proxy = os.getenv("HTTPS_PROXY") or None ftp_proxy = os.getenv("FTP_PROXY") or None