Compare commits

...

4 Commits

Author SHA1 Message Date
Tudor Marcu cd634c88df Release v1.09
Properly handle m4 errors during build process.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-04-04 12:29:27 -07:00
Tudor Marcu 6aa46648d0 Exit on m4 error
M4 may fail here in the case of circular includes, causing the updater
to crash later. This patch checks that the subprocess call succeeded, and if not
raises an exception to exit. It may not terminate instantly due to the async
nature of processing bundles, but once the bad thread finishes it will exit.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-22 15:45:16 -07:00
Tudor Marcu 9fc98a03b1 Release v1.08
This release fixes the builder.conf template so it has a more sane starting
point.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2016-11-09 12:13:35 -08:00
Tudor Marcu c96046001e Fix builder.conf template
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2016-11-09 12:13:14 -08:00
3 changed files with 11 additions and 7 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
[Builder]
SERVER_STATE_DIR=/home/clr/mix/update
BUNDLE_DIR=/home/clr/mix/bundles
BUNDLE_DIR=/home/clr/mix/mix-bundles
YUM_CONF=/home/clr/mix/.yum-mix.conf
CERT=/home/clr/mix/ClearLinuxRoot.pem
CLEAR_VERSION=VER
@@ -8,6 +8,6 @@ MIX_VERSION=VER
[swupd]
BUNDLE=os-core-update
CONTENTURL=https://download.clearlinux.org/update/
VERSIONURL=https://download.clearlinux.org/update/
CONTENTURL=<URL where the content will be hosted>
VERSIONURL=<URL where the version of the mix will be hosted>
FORMAT=1
+7 -3
View File
@@ -74,9 +74,13 @@ def read_config(args):
def install_bundle(out_dir, postfix, bundle, bundles, yum_cmd):
"""Helper function to yum install a bundle"""
lines = []
with subprocess.Popen(["m4", bundles + "/" + bundle], cwd=bundles, stdout=subprocess.PIPE, bufsize=1, universal_newlines=True) as p:
for line in p.stdout:
lines.append(line)
try:
output = subprocess.check_output(["m4", bundles + "/" + bundle], cwd=bundles, bufsize=1, universal_newlines=True)
except subprocess.CalledProcessError as e:
print('ERROR {0}: m4 failed on {1}/{2}'.format(e.returncode, bundles, bundle))
raise
for line in output:
lines.append(line)
pkgs = "".join(lines)
to_install = []
+1 -1
View File
@@ -1,5 +1,5 @@
AC_PREREQ([2.68])
AC_INIT([bundle-chroot-builder],[1.07],[tudor.marcu@intel.com],[bundle-chroot-builder])
AC_INIT([bundle-chroot-builder],[1.09],[tudor.marcu@intel.com],[bundle-chroot-builder])
AM_INIT_AUTOMAKE([foreign silent-rules color-tests no-dist-gzip dist-xz])
AC_CONFIG_FILES(Makefile)
AC_PREFIX_DEFAULT(/usr/local)