Open johanneskastl opened 9 months ago
rpm -q --scripts ruby3.2-rubygem-pry-0.14.2-66.3.x86_64
postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --install \
/usr/bin/pry pry /usr/bin/pry.ruby3.2-0.14.2 1402
/usr/sbin/update-alternatives --install \
/usr/bin/pry-0.14.2 pry-0.14.2 /usr/bin/pry.ruby3.2-0.14.2 1402
/usr/sbin/update-alternatives --install \
/usr/bin/pry.ruby3.2 pry.ruby3.2 /usr/bin/pry.ruby3.2-0.14.2 1402
preuninstall scriptlet (using /bin/sh):
if [ "$1" = 0 ] ; then
/usr/sbin/update-alternatives --remove pry /usr/bin/pry.ruby3.2-0.14.2
/usr/sbin/update-alternatives --remove pry-0.14.2 /usr/bin/pry.ruby3.2-0.14.2
/usr/sbin/update-alternatives --remove pry.ruby3.2 /usr/bin/pry.ruby3.2-0.14.2
fi
you shouldnt have to care about this. it is done automatically by https://github.com/openSUSE/gem2rpm/blob/master/templates/gem_packages.spec.erb#L167
Hi Darix, thanks for the quick reply.
Hmm, I'm confused. Are you saying that I do not have to add that scripts:
stanza to gem2rpm.yml?
And this would imply that the OBS "warning" is a false warning, i.e. the check does not properly detect the calls being present?
it could be false yes. maybe the multiline stuff confuses it.
How does one set
%post
or %postun settings for the per-ruby-version subpackages?I tried this in gem2rpm.yml:
https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_devel_kubic/rubygem-krane
But OBS aka rpmlint still complains about missing update-alternatives calls
Question
Is this a false positive in OBS or is this not the right way to do that? What would be the right way?
Thanks in advance Johannes