Hi Johannes On 22.12.23 11:21, Johannes Kastl wrote:
Hi all,
I packaged rubygem-krane recently, but could not get rid of one error in rpmlint:
https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev...
[ 11s] ruby3.2-rubygem-krane.x86_64: E: update-alternatives-postun-call-missing [ 11s] The package does not call update-alternatives --remove in postun phase to [ 11s] remove all the configuration for each individual --install binary that was [ 11s] done in postun.
Not sure if this is a false positive, as there is a call to update-alternatives in %postun:
%postun update-alternatives --remove krane %{_bindir}/krane
Or is there something wrong with this one (that I copied from another package using update-alternatives?
does the other package show the same "problem"? I'm guessing here: * you do the %post and %postun for the rubygem-krane package * the error / warning comes from ruby3.2-rubygem-krane package * the ruby3.2-rubygem-krane subpackage is generated by the %gem_packages macro(?) => maybe the %gem_packages macro is faulty after all? If I build this locally for Tumbleweed and look into the generated rpm, everything seems ok, even though I never remember what the [ "$1 = 0" ] stuff is supposed to look like :-) # rpm -qp --scripts ruby3.2-rubygem-krane-3.4.0-0.x86_64.rpm postinstall scriptlet (using /bin/sh): /usr/sbin/update-alternatives --install \ /usr/bin/krane krane /usr/bin/krane.ruby3.2-3.4.0 30400 /usr/sbin/update-alternatives --install \ /usr/bin/krane-3.4.0 krane-3.4.0 /usr/bin/krane.ruby3.2-3.4.0 30400 /usr/sbin/update-alternatives --install \ /usr/bin/krane.ruby3.2 krane.ruby3.2 /usr/bin/krane.ruby3.2-3.4.0 30400 preuninstall scriptlet (using /bin/sh): if [ "$1" = 0 ] ; then /usr/sbin/update-alternatives --remove krane /usr/bin/krane.ruby3.2-3.4.0 /usr/sbin/update-alternatives --remove krane-3.4.0 /usr/bin/krane.ruby3.2-3.4.0 /usr/sbin/update-alternatives --remove krane.ruby3.2 /usr/bin/krane.ruby3.2-3.4.0 fi Actually this also results in the same thing if you remove the %post and %postun from your specfile, so there seems to be no way for you to influence these scriptlets. I'd write it off as either a false positive or "something that the ruby macro maintainers have to fix" :-) Have fun, seife -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman