Commit 17ec5a57 authored by Jérome Perrin's avatar Jérome Perrin

Revert "Also set TMPDIR and TEMP environment variables"

This reverts commit daa833ea.
parent ba793c61
...@@ -269,10 +269,10 @@ will add it to environmet variables as the following: ...@@ -269,10 +269,10 @@ will add it to environmet variables as the following:
CXXFLAGS=-I${buildout:prefix} $CXXFLAGS CXXFLAGS=-I${buildout:prefix} $CXXFLAGS
LDFLAGS=-L${buildout:prefix}/lib LDFLAGS=-L${buildout:prefix}/lib
Besides, the recipe changes environment variables ``TMP``, ``TMPDIR`` and Besides, the recipe changes environment variable ``TMP`` when building
``TEMP`` when building and installing, and make a corresponding directory 'tmp' and installing, and make a corresponding directory 'tmp' in the
in the ``location``. This temporary directory will be removed after installing ``location``. This temporary directory will be removed after
finished. installing finished.
Example usage Example usage
============= =============
...@@ -308,9 +308,7 @@ default build options. ...@@ -308,9 +308,7 @@ default build options.
>>> print(system(buildout)) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE >>> print(system(buildout)) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
installing package installing package
...@@ -336,9 +334,7 @@ default build options. ...@@ -336,9 +334,7 @@ default build options.
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing packagex. Installing packagex.
packagex: [ENV] TEMP = /sample_buildout/parts/packagex/tmp
packagex: [ENV] TMP = /sample_buildout/parts/packagex/tmp packagex: [ENV] TMP = /sample_buildout/parts/packagex/tmp
packagex: [ENV] TMPDIR = /sample_buildout/parts/packagex/tmp
configure --prefix=/sample_buildout/parts/packagex configure --prefix=/sample_buildout/parts/packagex
building package building package
installing package installing package
...@@ -375,9 +371,7 @@ a custom location within the buildout:: ...@@ -375,9 +371,7 @@ a custom location within the buildout::
>>> print(system(buildout)) >>> print(system(buildout))
Uninstalling packagex. Uninstalling packagex.
Installing foobar. Installing foobar.
foobar: [ENV] TEMP = /sample_buildout/parts/foobar/tmp
foobar: [ENV] TMP = /sample_buildout/parts/foobar/tmp foobar: [ENV] TMP = /sample_buildout/parts/foobar/tmp
foobar: [ENV] TMPDIR = /sample_buildout/parts/foobar/tmp
building package building package
installing package installing package
...@@ -416,9 +410,7 @@ Makefile and using explicit ``make`` options to control the build process. ...@@ -416,9 +410,7 @@ Makefile and using explicit ``make`` options to control the build process.
>>> print(system(buildout)) >>> print(system(buildout))
Uninstalling foobar. Uninstalling foobar.
Installing haproxy. Installing haproxy.
haproxy: [ENV] TEMP = /sample_buildout/parts/haproxy/tmp
haproxy: [ENV] TMP = /sample_buildout/parts/haproxy/tmp haproxy: [ENV] TMP = /sample_buildout/parts/haproxy/tmp
haproxy: [ENV] TMPDIR = /sample_buildout/parts/haproxy/tmp
Building HAProxy 1.4.8 (dummy package) Building HAProxy 1.4.8 (dummy package)
TARGET: linux26 TARGET: linux26
CPU: i686 CPU: i686
...@@ -459,9 +451,7 @@ and building that. ...@@ -459,9 +451,7 @@ and building that.
>>> print(system(buildout)) >>> print(system(buildout))
Uninstalling haproxy. Uninstalling haproxy.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Using local source directory: /checkout/package-0.0.0 package: Using local source directory: /checkout/package-0.0.0
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
...@@ -521,9 +511,7 @@ targets and also patches the source code before the scripts are run. ...@@ -521,9 +511,7 @@ targets and also patches the source code before the scripts are run.
Installing package. Installing package.
package: [ENV] CFLAGS = -I/sw/include package: [ENV] CFLAGS = -I/sw/include
package: [ENV] LDFLAGS = -L/sw/lib -L/some/extra/lib package: [ENV] LDFLAGS = -L/sw/lib -L/some/extra/lib
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Applying patches package: Applying patches
patching file configure patching file configure
patching file Makefile.dist patching file Makefile.dist
...@@ -606,9 +594,7 @@ and a new buildout to try it out ...@@ -606,9 +594,7 @@ and a new buildout to try it out
>>> print(system(buildout)) >>> print(system(buildout))
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Executing pre-configure-hook package: Executing pre-configure-hook
hook: This is pre-configure-hook! hook: This is pre-configure-hook!
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
...@@ -648,9 +634,7 @@ shell command in the corresponding stage. ...@@ -648,9 +634,7 @@ shell command in the corresponding stage.
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Executing pre-configure package: Executing pre-configure
Configure part: package Configure part: package
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
...@@ -691,9 +675,7 @@ are only ``pre-configure`` and ``post-install``. the output will be ...@@ -691,9 +675,7 @@ are only ``pre-configure`` and ``post-install``. the output will be
#>>> print system(buildout) #>>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Executing pre-configure package: Executing pre-configure
Configure part: Configure in common platform Configure part: Configure in common platform
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
...@@ -737,9 +719,7 @@ Let's see what happens when set prefix in the buildout section: ...@@ -737,9 +719,7 @@ Let's see what happens when set prefix in the buildout section:
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Executing pre-configure package: Executing pre-configure
configure --prefix=/sample_buildout/mylocal configure --prefix=/sample_buildout/mylocal
building package building package
...@@ -770,9 +750,7 @@ example, ...@@ -770,9 +750,7 @@ example,
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
package: Executing pre-configure package: Executing pre-configure
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
...@@ -806,17 +784,13 @@ prefix: ...@@ -806,17 +784,13 @@ prefix:
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure --prefix=/sample_buildout/mylocal configure --prefix=/sample_buildout/mylocal
building package building package
package: Executing pre-install package: Executing pre-install
installing package installing package
Installing package-2. Installing package-2.
package-2: [ENV] TEMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMPDIR = /sample_buildout/parts/package-2/tmp
configure --prefix=/sample_buildout/mylocal configure --prefix=/sample_buildout/mylocal
building package building package
package-2: Executing pre-install package-2: Executing pre-install
...@@ -900,13 +874,9 @@ value in the part section. For example, ...@@ -900,13 +874,9 @@ value in the part section. For example,
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
Installing package-2. Installing package-2.
package-2: [ENV] TEMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMPDIR = /sample_buildout/parts/package-2/tmp
package-2: Executing post-install package-2: Executing post-install
package magic prefix is /mytemp package magic prefix is /mytemp
<BLANKLINE> <BLANKLINE>
...@@ -931,9 +901,7 @@ can display "prefix" value in the stdout. ...@@ -931,9 +901,7 @@ can display "prefix" value in the stdout.
Uninstalling package-2. Uninstalling package-2.
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure configure
building package building package
package: Executing pre-install package: Executing pre-install
...@@ -959,9 +927,7 @@ replaced with the recipe final prefix. ...@@ -959,9 +927,7 @@ replaced with the recipe final prefix.
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure configure
building package building package
package: Executing pre-install package: Executing pre-install
...@@ -996,16 +962,12 @@ of "package": ...@@ -996,16 +962,12 @@ of "package":
>>> print system(buildout) >>> print system(buildout)
Uninstalling package. Uninstalling package.
Installing package-2. Installing package-2.
package-2: [ENV] TEMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMPDIR = /sample_buildout/parts/package-2/tmp
configure --prefix=/sample_buildout/parts/package-2 configure --prefix=/sample_buildout/parts/package-2
building package building package
installing package installing package
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
installing package installing package
...@@ -1035,16 +997,12 @@ Look, "package" is reinstalled either: ...@@ -1035,16 +997,12 @@ Look, "package" is reinstalled either:
Uninstalling package. Uninstalling package.
Uninstalling package-2. Uninstalling package-2.
Installing package-2. Installing package-2.
package-2: [ENV] TEMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp package-2: [ENV] TMP = /sample_buildout/parts/package-2/tmp
package-2: [ENV] TMPDIR = /sample_buildout/parts/package-2/tmp
configure configure
building package building package
installing package installing package
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
installing package installing package
...@@ -1076,9 +1034,7 @@ If no shared-parts is set, and shared is True, shared feature is not used: ...@@ -1076,9 +1034,7 @@ If no shared-parts is set, and shared is True, shared feature is not used:
Uninstalling package. Uninstalling package.
Uninstalling package-2. Uninstalling package-2.
Installing package. Installing package.
package: [ENV] TEMP = /sample_buildout/parts/package/tmp
package: [ENV] TMP = /sample_buildout/parts/package/tmp package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: [ENV] TMPDIR = /sample_buildout/parts/package/tmp
configure --prefix=/sample_buildout/parts/package configure --prefix=/sample_buildout/parts/package
building package building package
installing package installing package
...@@ -1118,9 +1074,7 @@ process as the recipe tried. ...@@ -1118,9 +1074,7 @@ process as the recipe tried.
Installing package. Installing package.
package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
package: [ENV] FOO = bar package: [ENV] FOO = bar
package: [ENV] TEMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMPDIR = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: Command failed with exit code 127: ./configure --prefix=".../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/..." package: Command failed with exit code 127: ./configure --prefix=".../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/..."
package: Compilation error. The package is left as is at .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...__compile__ where you can inspect what went wrong. package: Compilation error. The package is left as is at .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...__compile__ where you can inspect what went wrong.
A shell script slapos.recipe.build.env.sh has been generated. You can source it in your shell to reproduce build environment. A shell script slapos.recipe.build.env.sh has been generated. You can source it in your shell to reproduce build environment.
...@@ -1139,9 +1093,7 @@ If shared-parts is set and shared is True, package will be installed in shared_p ...@@ -1139,9 +1093,7 @@ If shared-parts is set and shared is True, package will be installed in shared_p
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
Installing package. Installing package.
package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
package: [ENV] TEMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMPDIR = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: Removing already existing directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...__compile__ package: Removing already existing directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...__compile__
configure --prefix=.../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... configure --prefix=.../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
building package building package
...@@ -1189,9 +1141,7 @@ If options change, reinstall in different location: ...@@ -1189,9 +1141,7 @@ If options change, reinstall in different location:
Uninstalling package. Uninstalling package.
Installing package. Installing package.
package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
package: [ENV] TEMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp package: [ENV] TMP = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
package: [ENV] TMPDIR = .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/.../tmp
configure --prefix=.../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... configure --prefix=.../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
building package building package
installing package installing package
......
...@@ -143,10 +143,7 @@ class Recipe(object): ...@@ -143,10 +143,7 @@ class Recipe(object):
# environment. # environment.
for key in self.environ: for key in self.environ:
self.environ[key] = self.environ[key] % os.environ self.environ[key] = self.environ[key] % os.environ
self.environ['TMP'] = os.path.join(options['default-location'], 'tmp')
# Always define TMPDIR, TEMP and TMP
for key in ('TMPDIR', 'TEMP', 'TMP'):
self.environ[key] = os.path.join(options['default-location'], 'tmp')
def augmented_environment(self): def augmented_environment(self):
"""Returns a dictionary containing the current environment variables """Returns a dictionary containing the current environment variables
......
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