Mailinglist Archive: opensuse-packaging (105 mails)

< Previous Next >
Re: [opensuse-packaging] Incompatibility between info_del macro and 06-check-installtest post-build-check
  • From: Ludwig Nussel <ludwig.nussel@xxxxxxx>
  • Date: Fri, 29 May 2009 09:50:09 +0200
  • Message-id: <200905290950.10158.ludwig.nussel@xxxxxxx>
Cristian Morales Vega wrote:
The OBS defines a cross-distribution macro, info_del, to call
install-info --delete

%info_del(:-:) test -x /sbin/install-info -a ! -f
%{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet
--delete --info-dir=%{?2}%{?!2:%{_infodir}}
%{?2}%{?!2:%{_infodir}}/%{1}%ext_info \

The important part is the "! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info"
that makes sure it is called in postun and no in preun.

The problem is that the 06-check-installtest script executes all the
{pre,post}[un] scriptlets without really uninstalling the package so,
when executing info_del, "%{?2}%{?!2:%{_infodir}}/%{1}%ext_info" still
exists and the test fails.

Who invented that macro and why? Obviously the use of .. && .. is
wrong. %install_info_delete however will do the right thing.

In any case... preun or postun? install-info needs the file to remove
it from the index?

Looks like it doesn't need the file so preun or postun doesn't matter

And, if it should be called only in upgrades,
shouldn't be

%post -n %{name}
if [ $1 -eq 1 ] ; then
%info_add %{name}.info

The check doesn't make sense. The description of the new info page
could have changed so you want to call info_add always.

%preun -n %{name}
if [ $1 -eq 0 ] ; then
%info_del %{name}.info

The check should be made by %info_del itself so the packager doesn't
have to care. Since arguments to %preun and %postun are the same it
doesn't matter where you call it.

Also I wonder why one has to add the '.info' suffix there. The macro
could take care of that as well.


(o_ Ludwig Nussel
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
List Navigation