Search code examples
rpm-spec

intermediate update step in own builded RPM


If I build my own RPMs, is there a way, to tell that before upgrade to the latest version, upgrade to a specific other version first? So for example I often made a mistake in my postun actions, that I delete a link. So when I want to update to an newer package that fixes my postun action, the usually RPM behavior is that my new packages will be installed, then the old package will be uninstalled and trigger my mistake in the postun action. So I would need to run a reinstall then or to update again to an even later version, that on the next update, my postun action is correct. So I would imaging something like

UpdateRequires: MyPackage >= 1.1


Solution

  • It is possible to run a step after old packages %postun with %posttrans in new package