Fix: Upgrade of package break install

This commit is contained in:
Laurent Destailleur 2013-07-24 13:44:08 +02:00
parent 7ae06c6f45
commit f4987a6fa5
4 changed files with 142 additions and 109 deletions

View File

@ -297,9 +297,14 @@ echo "-------------------------------------------------------"
echo echo
#---- postun (after uninstall) #---- postun (after upgrade or uninstall)
%postun %postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars # Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
@ -318,7 +323,10 @@ then
echo Restart web server echo Restart web server
/sbin/service httpd restart /sbin/service httpd restart
fi fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog %changelog

View File

@ -488,9 +488,14 @@ echo
#---- postun (after uninstall) #---- postun (after upgrade or uninstall)
%postun %postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars # Define vars
os='unknown'; os='unknown';
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
@ -542,7 +547,10 @@ then
fi fi
%endif %endif
fi fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release

View File

@ -296,9 +296,14 @@ echo "-------------------------------------------------------"
echo echo
#---- postun (after uninstall) #---- postun (after upgrade or uninstall)
%postun %postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars # Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
@ -322,6 +327,10 @@ then
%{_sysconfdir}/init.d/apache2 restart %{_sysconfdir}/init.d/apache2 restart
fi fi
fi fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release

View File

@ -302,9 +302,14 @@ echo "-------------------------------------------------------"
echo echo
#---- postun (after uninstall) #---- postun (after upgrade or uninstall)
%postun %postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars # Define vars
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
@ -328,7 +333,10 @@ then
%{_sysconfdir}/init.d/apache2 restart %{_sysconfdir}/init.d/apache2 restart
fi fi
fi fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release