Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Bug1176491: pass the pear channel-update with error due to the internet access problem #6030

Merged
merged 2 commits into from
Jan 5, 2015

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Dec 29, 2014

See also bz1176491

The root cause of bz1176491 is that the script bash sets "-e" option.
So, putting "&& true" like below will be able to fix it.

I know it is better if showing warning messages if the channel-update didn't work out. However, to output such a message needs several change in the other components more than openshift-origin-cartridge-php/bin/install.

So I think putting "&& true" is OK for this issue.

@nak3 nak3 changed the title Fix bz1176491: pass the pear channel-update with error due to the internet access problem Bug1176491: pass the pear channel-update with error due to the internet access problem Dec 29, 2014
@@ -35,6 +35,6 @@ rm -f $OPENSHIFT_HOMEDIR/.pearrc
php_context "pear config-create ${OPENSHIFT_PHP_DIR}phplib/pear/ ${OPENSHIFT_HOMEDIR}.pearrc"
php_context "pear -c ${OPENSHIFT_HOMEDIR}.pearrc config-set php_ini ${OPENSHIFT_PHP_DIR}configuration/etc/php.ini"
php_context "pear -c ${OPENSHIFT_HOMEDIR}.pearrc config-set auto_discover 1"
php_context "pear -c ${OPENSHIFT_HOMEDIR}.pearrc channel-update pear.php.net"
php_context "pear -c ${OPENSHIFT_HOMEDIR}.pearrc channel-update pear.php.net" && true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want || true as the && will short circuit. Otherwise, agree this is a decent approach - try to improve the situation if possible, but let the install continue (with warnings printed) if not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& true is also short circuit, although || true is more understandable.

$ cat foo.sh 
#!/bin/bash -eu
false && true
echo "foo"

$ ./foo.sh 
foo

@sosiouxme
Copy link
Member

[merge]

@openshift-bot
Copy link

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/6241/) (Image: devenv_5373)

@openshift-bot
Copy link

Evaluated for online up to cf008eb

openshift-bot pushed a commit that referenced this pull request Jan 5, 2015
Merged by openshift-bot
@openshift-bot openshift-bot merged commit f7d8679 into openshift:master Jan 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants