Change in osmo-gsm-manuals[master]: Makefile.asciidoc.inc: always exit 1 on a2x error

2018-11-12 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11722


Change subject: Makefile.asciidoc.inc: always exit 1 on a2x error
..

Makefile.asciidoc.inc: always exit 1 on a2x error

a2x wraps asciidoc. When a2x fails, we run asciidoc without a2x to
print verbose output. Make sure that 'make' fails at this point, even
if asciidoc runs through.

Change-Id: I30931303ecc6094efaedcb08380433a34211a169
---
M build/Makefile.asciidoc.inc
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/22/11722/1

diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index a28a5bb..ee7a60d 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -57,7 +57,8 @@
  NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT 
build/custom-dblatex.sty\n\
and remove three lines starting with '% \"DRAFT\" on first 
page'\n" \
  || true
-   a2x $(A2X_OPTS) $< || asciidoc -v $(ASCIIDOC_OPTS) $<
+   a2x $(A2X_OPTS) $< || (echo "ERROR: a2x failed! Running asciidoc to get 
verbose errors..."; \
+   asciidoc -v $(ASCIIDOC_OPTS) $<; exit 1)

 check: $(ASCIIDOC_CHECKS)


--
To view, visit https://gerrit.osmocom.org/11722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30931303ecc6094efaedcb08380433a34211a169
Gerrit-Change-Number: 11722
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-gsm-manuals[master]: Makefile.asciidoc.inc: always exit 1 on a2x error

2018-11-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11722 )

Change subject: Makefile.asciidoc.inc: always exit 1 on a2x error
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11722/1/build/Makefile.asciidoc.inc
File build/Makefile.asciidoc.inc:

https://gerrit.osmocom.org/#/c/11722/1/build/Makefile.asciidoc.inc@61
PS1, Line 61:   asciidoc -v $(ASCIIDOC_OPTS) $<; exit 1)
isn't this exit 1 applied only to the subshell created by parenthesis? or 
parenthesis don't create a subshell?



--
To view, visit https://gerrit.osmocom.org/11722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I30931303ecc6094efaedcb08380433a34211a169
Gerrit-Change-Number: 11722
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Mon, 12 Nov 2018 10:25:58 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: Makefile.asciidoc.inc: always exit 1 on a2x error

2018-11-12 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11722 )

Change subject: Makefile.asciidoc.inc: always exit 1 on a2x error
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11722/1/build/Makefile.asciidoc.inc
File build/Makefile.asciidoc.inc:

https://gerrit.osmocom.org/#/c/11722/1/build/Makefile.asciidoc.inc@61
PS1, Line 61:   asciidoc -v $(ASCIIDOC_OPTS) $<; exit 1)
> isn't this exit 1 applied only to the subshell created by parenthesis? or 
> parenthesis don't create a […]
They do create a subshell, but the subshell's exit code is the exit code of the 
last program it ran (exit 1 in this case). So the overall exit code is 1.

This can be reproduced on Debian by *not* installing asciidoc-latex: a2x will 
fail, but asciidoc will pass unless the exit1 is added like in this commit.



--
To view, visit https://gerrit.osmocom.org/11722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I30931303ecc6094efaedcb08380433a34211a169
Gerrit-Change-Number: 11722
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Mon, 12 Nov 2018 10:40:59 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: Makefile.asciidoc.inc: always exit 1 on a2x error

2018-11-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11722 )

Change subject: Makefile.asciidoc.inc: always exit 1 on a2x error
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I30931303ecc6094efaedcb08380433a34211a169
Gerrit-Change-Number: 11722
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Mon, 12 Nov 2018 10:52:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: Makefile.asciidoc.inc: always exit 1 on a2x error

2018-11-12 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11722 )

Change subject: Makefile.asciidoc.inc: always exit 1 on a2x error
..

Makefile.asciidoc.inc: always exit 1 on a2x error

a2x wraps asciidoc. When a2x fails, we run asciidoc without a2x to
print verbose output. Make sure that 'make' fails at this point, even
if asciidoc runs through.

Change-Id: I30931303ecc6094efaedcb08380433a34211a169
---
M build/Makefile.asciidoc.inc
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index a28a5bb..ee7a60d 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -57,7 +57,8 @@
  NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT 
build/custom-dblatex.sty\n\
and remove three lines starting with '% \"DRAFT\" on first 
page'\n" \
  || true
-   a2x $(A2X_OPTS) $< || asciidoc -v $(ASCIIDOC_OPTS) $<
+   a2x $(A2X_OPTS) $< || (echo "ERROR: a2x failed! Running asciidoc to get 
verbose errors..."; \
+   asciidoc -v $(ASCIIDOC_OPTS) $<; exit 1)

 check: $(ASCIIDOC_CHECKS)


--
To view, visit https://gerrit.osmocom.org/11722
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I30931303ecc6094efaedcb08380433a34211a169
Gerrit-Change-Number: 11722
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith