Message ID | 20231211165345.821930-1-Quirin.Gylstorff@siemens.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [isar-cip-core] swupdate-certificates: Fix shell error | expand |
On 11.12.23 17:53, Quirin Gylstorff wrote: > From: Quirin Gylstorff <quirin.gylstorff@siemens.com> > > An Additional bracket was added to all if cases, which leads to build > errors. > Fixes: which commit? Jan > Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> > --- > @Jan This should be added as soon as possible to master > > .../swupdate-certificates/swupdate-certificates-key.inc | 4 ++-- > .../swupdate-certificates/swupdate-certificates.inc | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc > index 0b3e045..56d006a 100644 > --- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc > +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc > @@ -21,11 +21,11 @@ SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SI > do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \ > ${D}/usr/bin/" > do_install() { > - if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ] ]; then > + if [ ! -f "${WORKDIR}/${SWU_SIGN_SCRIPT}" ]; then > bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process" > fi > install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu > - if [ -z ${SWU_SIGN_KEY} ] ]; then > + if [ -z "${SWU_SIGN_KEY}" ]; then > bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe" > fi > TARGET=${D}/usr/share/swupdate-signing/ > diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc > index 0553c25..10b6833 100644 > --- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc > +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc > @@ -18,7 +18,7 @@ SWU_SIGN_CERT ??= "" > SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_CERT') if d.getVar('SWU_SIGN_CERT') else '' }" > > do_install() { > - if [ -z ${SWU_SIGN_CERT} ] ]; then > + if [ -z "${SWU_SIGN_CERT}" ]; then > bbfatal "You must set SWU_SIGN_CERT and provide the required file as artifacts to this recipe" > fi > TARGET=${D}/usr/share/swupdate-signing/
On 11.12.23 17:56, Jan Kiszka wrote: > On 11.12.23 17:53, Quirin Gylstorff wrote: >> From: Quirin Gylstorff <quirin.gylstorff@siemens.com> >> >> An Additional bracket was added to all if cases, which leads to build >> errors. >> > > Fixes: which commit? > The initial one, daa9e6738d1763a953fadc4de6010fe8dfddf27a. While it is valuable to quote variable content, it was not very helpful to fold those unrelated changes into the commit. Please avoid that. > Jan > >> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> >> --- >> @Jan This should be added as soon as possible to master >> Also, please describe what the impact is. We are carrying this change for several months, and no one complained so far. Was the issue subtle for many, or was it only affecting some configurations? Jan >> .../swupdate-certificates/swupdate-certificates-key.inc | 4 ++-- >> .../swupdate-certificates/swupdate-certificates.inc | 2 +- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc >> index 0b3e045..56d006a 100644 >> --- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc >> +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc >> @@ -21,11 +21,11 @@ SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SI >> do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \ >> ${D}/usr/bin/" >> do_install() { >> - if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ] ]; then >> + if [ ! -f "${WORKDIR}/${SWU_SIGN_SCRIPT}" ]; then >> bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process" >> fi >> install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu >> - if [ -z ${SWU_SIGN_KEY} ] ]; then >> + if [ -z "${SWU_SIGN_KEY}" ]; then >> bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe" >> fi >> TARGET=${D}/usr/share/swupdate-signing/ >> diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc >> index 0553c25..10b6833 100644 >> --- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc >> +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc >> @@ -18,7 +18,7 @@ SWU_SIGN_CERT ??= "" >> SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_CERT') if d.getVar('SWU_SIGN_CERT') else '' }" >> >> do_install() { >> - if [ -z ${SWU_SIGN_CERT} ] ]; then >> + if [ -z "${SWU_SIGN_CERT}" ]; then >> bbfatal "You must set SWU_SIGN_CERT and provide the required file as artifacts to this recipe" >> fi >> TARGET=${D}/usr/share/swupdate-signing/ >
diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc index 0b3e045..56d006a 100644 --- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc @@ -21,11 +21,11 @@ SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SI do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \ ${D}/usr/bin/" do_install() { - if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ] ]; then + if [ ! -f "${WORKDIR}/${SWU_SIGN_SCRIPT}" ]; then bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process" fi install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu - if [ -z ${SWU_SIGN_KEY} ] ]; then + if [ -z "${SWU_SIGN_KEY}" ]; then bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe" fi TARGET=${D}/usr/share/swupdate-signing/ diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc index 0553c25..10b6833 100644 --- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc @@ -18,7 +18,7 @@ SWU_SIGN_CERT ??= "" SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_CERT') if d.getVar('SWU_SIGN_CERT') else '' }" do_install() { - if [ -z ${SWU_SIGN_CERT} ] ]; then + if [ -z "${SWU_SIGN_CERT}" ]; then bbfatal "You must set SWU_SIGN_CERT and provide the required file as artifacts to this recipe" fi TARGET=${D}/usr/share/swupdate-signing/