Kaydet (Commit) 8e295cd6 authored tarafından Barış Metin's avatar Barış Metin

each build should reset environment variables. an important fix... we should build some (many?)

packages again.
üst feb6620c
......@@ -13,6 +13,7 @@
# Standard Python Modules
from os import getenv
from os import environ
from copy import deepcopy
# Pisi-Core Modules
import pisi.context as ctx
......@@ -22,6 +23,10 @@ import pisi.context as ctx
def exportFlags():
'''General flags used in actions API.'''
# first reset environ
environ = {}
environ = deepcopy(ctx.config.environ)
# Build systems depend on these environment variables. That is why
# we export them instead of using as (instance) variables.
values = ctx.config.values
......@@ -31,6 +36,7 @@ def exportFlags():
environ['LDFLAGS'] = values.build.ldflags
environ['USER_LDFLAGS'] = values.build.ldflags
environ['JOBS'] = values.build.jobs
class Env(object):
'''General environment variables used in actions API'''
......
......@@ -18,6 +18,7 @@ regular PISI configurations.
"""
import os
from copy import deepcopy
import gettext
__trans = gettext.translation('pisi', fallback=True)
......@@ -59,6 +60,10 @@ class Config(object):
ctx.ui.warning( _('Destination directory %s does not exist. Creating it.') % self.destdir)
os.makedirs(self.destdir)
# get the initial environment variables. this is needed for
# build process.
self.environ = deepcopy(os.environ)
def get_option(self, opt):
if self.options:
......
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