On Fri, Mar 2, 2012 at 1:31 PM, Johannes Weberhofer
Hello!
I have additionally defined the following line at the spec's top:
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
And I'm using the bleow lines for post/postun sections:
%post if [ "$1" = "1" ]; then # install (rpm -i) %{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{pear_name}.xml ||: fi if [ "$1" = "2" ]; then # update (rpm -U) %{__pear} upgrade --offline --register-only %{pear_xmldir}/%{pear_name}.xml ||: fi
%postun if [ "$1" -eq "0" ] ; then # uninstall (rpm -e) %{__pear} uninstall --nodeps --ignore-errors --register-only %{pear_name}
/dev/null ||: fi
Note, that the lines end with ||: , which makes the codes fail silently.
Best regards, Johannes
Am 02.03.12 01:06, schrieb Marguerite Su:
Hi, Johannes Weberhofer,
Your fix in php5-pear-channel-xinc ensures php5-pear installed before channel (Requires: php5-pear) . thus fix php5-pear-xinc channel error.
But %post scriptlet still fails:
pear install --nodeps --soft --force --register-only %{xmldir}/%{pear_name}.xml
can you take care of this?
-- Johannes Weberhofer Weberhofer GmbH, Austria, Vienna -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Thanks for your quick help. I have done that and fixed some rpmlint errors & warnings. it can build successfully now. But there're still 3 out of my effort (I'm not familiar with these warnings and 'cause my mother language is not English/I'm not major in CS, I can't understand what they are talking about, even with explanations on Wiki.). can you help me polishing it further ? They are: W: percent in %post (I am not the author of your work. I have no idea which "%" triggers this warning) W: missing-lsb-keyword (not familiar with shell, and I don't know what is "lsb") W: htaccess-file (not familiar with apache rewrite rule and regex) Check it here: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=php5-pear-xinc&project=home%3AMargueriteSu%3Abranches%3Aserver%3Aphp%3Aapplications&repository=openSUSE_Factory -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org