Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error in openpower/package/pkg-versions.mk #2430

Open
shenki opened this issue Nov 1, 2018 · 0 comments
Open

Parsing error in openpower/package/pkg-versions.mk #2430

shenki opened this issue Nov 1, 2018 · 0 comments

Comments

@shenki
Copy link
Member

shenki commented Nov 1, 2018

When the BR2_GLOBAL_PATHC_DIR config option contains more than one entry, such as:

BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_OP_BUILD_PATH)/patches $(BR2_EXTERNAL_OP_BUILD_PATH)/patches/habanero-patches"

then the parsing in openpower/package/pkg-versions.mk will include the first ", breaking the bash scripting with /bin/bash: -c: line 0: syntax error near unexpected token 'fi':

# Check all global patch directories
if ls "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/linux/*.patch 2>/dev/null; then sha512sum "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi; if ls /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/palmetto-patches"/linux/*.patch 2>/dev/null; then sha512sum /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/palmetto-patches"/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi; if ls "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/custom/patches"/linux/*.patch 2>/dev/null; then sha512sum "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/custom/patches"/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi;
/bin/bash: -c: line 0: syntax error near unexpected token `fi'
/bin/bash: -c: line 0: `if ls "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/linux/*.patch 2>/dev/null; then sha512sum "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi; if ls /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/palmetto-patches"/linux/*.patch 2>/dev/null; then sha512sum /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/patches/palmetto-patches"/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi; if ls "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/custom/patches"/linux/*.patch 2>/dev/null; then sha512sum "/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/openpower/custom/patches"/linux/*.patch | sha512sum | xargs echo >> /scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_version/linux.tmp_patch.txt; fi;'
package/pkg-generic.mk:193: recipe for target '/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/build/linux-4.18.16/.stamp_patched' failed
make: *** [/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/output-ubuntu1604-palmetto_defconfig/build/linux-4.18.16/.stamp_patched] Error 1
make: Leaving directory '/scratch/jenkins/workspace/op-build/op-build-PR/PLATFORM/palmetto/label_exp/austin/buildroot'
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE

The variable expands to this according to op-build printvars:

BR2_GLOBAL_PATCH_DIR=""/home/joel/dev/op/op-build/openpower"/patches $(BR2_EXTERNAL_OP_BUILD_PATH)/patches/palmetto-patches" ""/home/joel/dev/op/op-build/openpower"/custom/patches" ("$(BR2_EXTERNAL_OP_BUILD_PATH)/patches $$(BR2_EXTERNAL_OP_BUILD_PATH)/patches/palmetto-patches" "$(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches")

The parsing in openpower/package/pkg-versions.mk should be fixed to avoid this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant