False positive: update-alternatives-postun-call-missing in rubygem package?
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? Kind Regards, Johannes P.S.: Have a merry christmas y'all!
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
Hi Seife, damn, I completely forgot this question. Sorry for the late THANK YOU... On 22.12.23 12:15 Stefan Seyfried wrote:
On 22.12.23 11:21, Johannes Kastl wrote:
does the other package show the same "problem"?
If only I could remember where I stole it from...
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?
Maybe, yes.
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 :-)
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" :-)
Thanks for digging into this. Then I will ignore this. Have a nice day! Johannes
Hi Johannes, Am 04.02.24 um 15:00 schrieb Johannes Kastl:
Hi Seife,
damn, I completely forgot this question. Sorry for the late THANK YOU...
On 22.12.23 12:15 Stefan Seyfried wrote:
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" :-) Thanks for digging into this. Then I will ignore this.
IMHO you should not ignore it. It ties right into your other question about your manual addtion to gem2rpm.yml. Your plain %postun directives probably don't propagate to the subpackages for individual flavors generated by %gem_packages. Note that the build generates "ruby3.?-rubygem-krane-.*rpm" packages but a "rubygem-krane*.src" . A plain %postun would be for a rubygem-krane*.rpm package.
Have a nice day!
Johannes
- Ben
On 04.02.24 16:18 Ben Greiner wrote:
Hi Johannes,
Am 04.02.24 um 15:00 schrieb Johannes Kastl:
Hi Seife,
damn, I completely forgot this question. Sorry for the late THANK YOU...
On 22.12.23 12:15 Stefan Seyfried wrote:
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" :-) Thanks for digging into this. Then I will ignore this.
IMHO you should not ignore it. It ties right into your other question about your manual addtion to gem2rpm.yml.
If someone has an idea how to fix it, I'll eagerly test...
Your plain %postun directives probably don't propagate to the subpackages for individual flavors generated by %gem_packages.
Yes, but how to specify directives for the auto-generated packages? There is only a generic "post" in the gem2rpm.yml. Kind Regards, Johannes
participants (3)
-
Ben Greiner
-
Johannes Kastl
-
Stefan Seyfried