From 2e280df7f06de78241b298723c5ee7fe57aa2c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 21 Jul 2005 20:28:13 +0000 Subject: [PATCH] =?UTF-8?q?ActionsAPI=20adam=20edilmeden=20=C3=B6nce=20i?= =?UTF-8?q?=C5=9Flevsele=C5=9Fiyor,=20actionglobals.py'de=20ki=20de=C4=9Fi?= =?UTF-8?q?=C5=9Fikli=C4=9Fi=20=C3=B6zellikle=20geri=20ald=C4=B1m=20ki=20f?= =?UTF-8?q?lags=20i=C3=A7ine=20ta=C5=9F=C4=B1may=C4=B1=20unutmayal=C4=B1m?= =?UTF-8?q?=20diye=20(=20ayr=C4=B1ca=20diffutils=20env.dan=20al=C4=B1yor?= =?UTF-8?q?=20flaglar=C4=B1=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/actionsapi/actionglobals.py | 8 +++----- pisi/actionsapi/utils.py | 8 +++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pisi/actionsapi/actionglobals.py b/pisi/actionsapi/actionglobals.py index b47c2b78..5e06f1b6 100644 --- a/pisi/actionsapi/actionglobals.py +++ b/pisi/actionsapi/actionglobals.py @@ -32,8 +32,6 @@ class Env(object): else: return None - - class Dirs: """General directories used in actions API.""" # TODO: Eventually we should consider getting these from a/the @@ -50,9 +48,9 @@ class Dirs: class Flags: """General flags used in actions API""" values = pisi.config.config.values - host = values.build.host - cflags = values.build.cflags - cxxflags = values.build.cxxflags + environ["HOST"] = host = values.build.host + environ["CFLAGS"] = cflags = values.build.cflags + environ["CXXFLAGS"] = cxxflags = values.build.cxxflags ldflags = values.build.ldflags class ActionGlobals(pisi.config.Config): diff --git a/pisi/actionsapi/utils.py b/pisi/actionsapi/utils.py index 4798758a..37f8ae11 100644 --- a/pisi/actionsapi/utils.py +++ b/pisi/actionsapi/utils.py @@ -4,6 +4,7 @@ # stadard python modules import os import time +import glob from tempfile import mkstemp, mkdtemp def sleep(seconds = 5): @@ -18,7 +19,8 @@ def createTmpDir(): return path def chmod(filename, mode = 0755): - os.chmod(filename, mode) + for file in glob.glob(filename): + os.chmod(file, mode) def unlink(filename): os.unlink(filename) @@ -28,3 +30,7 @@ def makedirs(directoryName): os.makedirs(directoryName) except OSError: pass + +def touch(filename): + for file in glob.glob(filename): + os.utime(file, None)