[opensuse-packaging] info handling in specfile
Hi as some of you have probably noticed there are some mildly annoying messages when packages which installed info files are being uninstalled - i.e: ... Additional rpm output: install-info: No such file or directory for /usr/share/info/autoconf.info.gz warning: %postun(autoconf-2.69-11.2.noarch) scriptlet failed, exit status 1 It is my understanding that this is caused by install-info --delete being called in postun stage, when info file is already gone. This issue has already been reported and discussed [1] but not resolved. I have also noticed that in some packages, issue has been solved/hidden by moving install-info to preun, but [1] indicates that such solution has side effect of info entries being removed on update of package. On the other hand, fedora seems to be currently using same solution - i.e [2] . I have meanwhile updated our wiki [3] - but I have some doubts whether this solution is actually correct. I would welcome any suggestions or comments (preferably constructive :) ). Kind regards Martin Pluskal [1] https://bugzilla.opensuse.org/show_bug.cgi?id=776008 [2] http://pkgs.fedoraproject.org/cgit/make.git/tree/make.spec [3] https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets#Texinfo
On Wed, 2015-03-18 at 09:26 +0100, Martin Pluskal wrote:
Hi as some of you have probably noticed there are some mildly annoying messages when packages which installed info files are being uninstalled - i.e: ... Additional rpm output: install-info: No such file or directory for /usr/share/info/autoconf.info.gz warning: %postun(autoconf-2.69-11.2.noarch) scriptlet failed, exit status 1
It is my understanding that this is caused by install-info --delete being called in postun stage, when info file is already gone. This issue has already been reported and discussed [1] but not resolved. I have also noticed that in some packages, issue has been solved/hidden by moving install-info to preun, but [1] indicates that such solution has side effect of info entries being removed on update of package. On the other hand, fedora seems to be currently using same solution - i.e [2] . I have meanwhile updated our wiki [3] - but I have some doubts whether this solution is actually correct.
I would welcome any suggestions or comments (preferably constructive :) ).
I doubt that the concern is very valid; unless the install-info --delete
is wrapped in a if [$1 == 0]; as postun as well as preun of the 'package
to be removed after upgrade' are both called after post of the 'new
version of the package.
Wrapping the whole thing into if [$1 == 0] might help this out a bit,
BUT it will result in the same cosmetic error if info pages change over
time...
In general, I'd say install-info --delete should be able to remove a
file that no longer exists (postun) and only be executed if the file is
no longer there (thus: on an upgrade it is skipeed, but on a complete
removal of the package done). This would require the warning to be
suppressed though.
Cheers,
Dominique
--
Dimstar / Dominique Leuenberger
On Wed, Mar 18, 2015 at 11:37 AM, Dimstar / Dominique Leuenberger
In general, I'd say install-info --delete should be able to remove a file that no longer exists (postun) and only be executed if the file is no longer there (thus: on an upgrade it is skipeed, but on a complete removal of the package done). This would require the warning to be suppressed though.
I'm not sure it is possible; IIRC install-info is actually using information from within info file to decide where to put it (and what to delete). I'd rather say invocation should be moved in preun. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Dimstar / Dominique Leuenberger
-
Martin Pluskal