diff --git a/openSUSE-MicroOS-release.spec.in b/openSUSE-MicroOS-release.spec.in index bf82868..d34b070 100644 --- a/openSUSE-MicroOS-release.spec.in +++ b/openSUSE-MicroOS-release.spec.in @@ -87,6 +87,19 @@ ln -s ..%{_libexecdir}/os-release %{buildroot}%{_sysconfdir}/os-release ___CREATE_PRODUCT_FILES___ +%post +# Update from openSUSE-Tumbleweed-Kubic to openSUSE-MicroOS +# Fix the baseproduct symlink and make sure, it exists +if [ -L /etc/products.d/baseproduct ] ; then + PRODLINK=$(basename $(readlink -f /etc/products.d/baseproduct)) + if [ "$PRODLINK" == "openSUSE-Tumbleweed-Kubic.prod" ]; then + rm -f /etc/products.d/baseproduct + fi +fi +if [ ! -e /etc/products.d/baseproduct ]; then + ln -sf openSUSE-MicroOS.prod /etc/products.d/baseproduct +fi + %files %defattr(644,root,root,755) %{_sysconfdir}/os-release