FS#14802 - [abs] improve/fix proto-info.install

Attached to Project: Arch Linux
Opened by Jan Spakula (bender02) - Friday, 22 May 2009, 19:36 GMT
Last edited by Jan de Groot (JGC) - Tuesday, 09 June 2009, 08:20 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

If a package uses the current proto-info.install for installing texinfo documentation, and a user builds this package with "options=(!docs)" in makepkg.conf, then there is an error message "scriptlet failed to execute correctly" on installing/upgrading that package. This happens because the scriptlet insists on "installing" the texinfo docs whenever /usr/bin/install-info is present, even when the particular info files were deleted by makepkg.

A simple fix is to check whether the info files are actually present before running install-info on them. a "patch" for post_install():
- install-info $infodir/$file $infodir/dir 2> /dev/null
+ ! [ -f $infodir/$file ] || install-info $infodir/$file $infodir/dir 2> /dev/null
and similarly for pre_remove() function.

By the way, the check for install-info is missing a slash:
- [ -x usr/bin/install-info ] || return 0
+ [ -x /usr/bin/install-info ] || return 0
This task depends upon

Closed by  Jan de Groot (JGC)
Tuesday, 09 June 2009, 08:20 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Will become irrelevant for pacman 3.3.
Comment by Jan Spakula (bender02) - Friday, 22 May 2009, 19:41 GMT
forgot to add: abs-2.3.2-2
Comment by Jan de Groot (JGC) - Friday, 22 May 2009, 19:56 GMT
This bug makes no sense. The proto file needs to be edited to the correct info files anyways and it makes no sense to include the proto instructions when stripping texinfo docs.
Comment by Jan Spakula (bender02) - Friday, 22 May 2009, 20:22 GMT
Example: I have options=(!docs) in my /etc/makepkg.conf and I want to recompile coreutils (or compile any package from AUR which includes texinfo docs). So I run makepkg on coreutils' PKGBUILD, and when installing a package so built, I get an error about the scriptlet. In order to avoid this, I need to either edit that PKGBUILD to have explicitly options=(docs), or I can remove install=coreutils.install (assuming the only thing done there is install .info files) or I can fix the .install file as suggested above, so that it works without an error regardless of my 'docs' setting in makepkg.conf. Or of course I can just ignore the error, which I've been doing so far.
Comment by Jan de Groot (JGC) - Friday, 22 May 2009, 20:52 GMT
The official packages are built with docs, so then this all works fine. If you're changing packages by using other default flags in makepkg.conf and/or options in PKGBUILDs, you should take care of these changes yourself.
Comment by Jan Spakula (bender02) - Friday, 22 May 2009, 21:34 GMT
OK, it's no big deal for me; I know where the error message comes from and I can happily ignore it. Feel free to close this.

However, I'm not going to pretend that I understand your point of view: This is a trivial change in a .proto file, and it solves an error message that appears under not so far-fetched unreasonable circumstances: compiling any package containing texinfo documentation with !docs (this applies mainly to AUR, I understand that when recompiling something for which a working binary package is provided I'm on my own). Why not having a prototype that deals with this situation? People using this proto to create a package (that's what protos are for, isn't they?) will create a more robust package that doesn't unnecesarily spit errors when one wants to get rid of some docs (by the way, changing to !docs should be in my opinion the only thing needed to get of the docs, not some extra editing of .install files or whatever).
Comment by Allan McRae (Allan) - Friday, 22 May 2009, 21:35 GMT
pacman-3.3 will treat info pages like man pages and will not remove them with '!docs'. So once that get released, this becomes not a bug...
Comment by Jan Spakula (bender02) - Saturday, 23 May 2009, 05:44 GMT
That's good news for me; what I actually found the most inconvenient about the texinfo docs is the need to take care of them in an .install file.
Comment by Allan McRae (Allan) - Saturday, 23 May 2009, 06:33 GMT
Info pages will still require an install file (until hooks get implemented in pacman), but you won't need to remove it when using ABS with "!docs"

Loading...