Date: Sun, 21 Mar 2004 16:31:34 +0100 (CET) From: Dimitry Andric <dimitry@andric.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/64540: zsh port doesn't add info file to package list Message-ID: <20040321153134.676B222827@tensor.xs4all.nl> Resent-Message-ID: <200403211540.i2LFeO6R037079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 64540 >Category: ports >Synopsis: zsh port doesn't add info file to package list >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 21 07:40:23 PST 2004 >Closed-Date: >Last-Modified: >Originator: Dimitry Andric >Release: FreeBSD 5.2-CURRENT i386 >Organization: n/a >Environment: System: FreeBSD tensor.xs4all.nl 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Mar 18 09:04:06 CET 2004 dim@vfbsd5.dim:/usr/obj/usr/src/sys/TENSOR i386 >Description: When you install the zsh port, the zsh.info file is successfully installed. However, it doesn't end up in the package list, so it isn't uninstalled if the port is removed. If you package the port, the file isn't included in the result. This is caused by revision 1.63 of ports/shell/zsh/Makefile, which has the comment: "utilize INFO". It does utilize the INFO variable, but the .info file itself is only installed in the post-install stage of the port, which is *AFTER* the add-plist-info stage, where the addition of the info file to the package list is done, with: # Process GNU INFO files at package install/deinstall time .for i in ${INFO} @${ECHO_CMD} "@unexec install-info --delete %D/info/$i.info %D/info/dir" \ >> ${TMPPLIST} @${LS} ${PREFIX}/info/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST} @${ECHO_CMD} "@exec install-info %D/info/$i.info %D/info/dir" \ >> ${TMPPLIST} .endfor What I thus observe, is that the ls command above fails, because the info file is not yet installed at the time it is run. This causes the temp package list to contain something like the following (near the end): @unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi @unexec install-info --delete %D/info/zsh.info %D/info/dir @exec install-info %D/info/zsh.info %D/info/dir Note the missing entry for the zsh.info file itself. The end result is: - If you build and install the port, the zsh.info file gets installed, but when you subsequently remove the port, the file stays behind. - If you build, install and package the port, and install the package on another system, the zsh.info file is missing. >How-To-Repeat: Install and/or package the zsh port. >Fix: The simplest way would be to revert the "utilize INFO" part of the last commit. I don't think swapping the add-plist-info and post-install stages in bsd.port.mk would be a good idea, the more because IMHO the do-install stage itself should take care of installing any .info files. At the moment the zsh port does this in the post-install stage, but I have no idea of the rationale for using that stage, so I'm hesitant to modify anything in there. Anyway, here is a simple patch, which only undoes the INFO part, and fixes the package list. diff -urNd zsh/Makefile zsh.dim/Makefile --- zsh/Makefile Thu Jan 1 18:39:18 2004 +++ zsh.dim/Makefile Sun Mar 21 16:27:03 2004 @@ -93,9 +93,6 @@ MAN1= zsh.1 zshbuiltins.1 zshcompctl.1 zshcompwid.1 zshcompsys.1 \ zshcontrib.1 zshexpn.1 zshmisc.1 zshmodules.1 zshoptions.1 \ zshparam.1 zshzftpsys.1 zshzle.1 zshall.1 -.if !defined(NOPORTDOCS) -INFO= zsh -.endif DOCS= LICENCE META-FAQ README Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ \ Etc/FEATURES Etc/NEWS Etc/completion-style-guide \ Doc/zsh*.html Doc/zsh.dvi Doc/zsh_a4.ps Doc/zsh_us.ps diff -urNd zsh/pkg-plist zsh.dim/pkg-plist --- zsh/pkg-plist Thu Jan 1 18:39:18 2004 +++ zsh.dim/pkg-plist Sun Mar 21 16:28:22 2004 @@ -5,6 +5,9 @@ bin/zsh-%%ZSH_VER%% @exec mkdir %%ZSH_ETCDIR%% 2> /dev/null || true @unexec rmdir %%ZSH_ETCDIR%% 2> /dev/null || true +%%PORTDOCS%%@unexec install-info --delete %D/info/zsh.info %D/info/dir +%%PORTDOCS%%info/zsh.info +%%PORTDOCS%%@exec install-info %D/info/zsh.info %D/info/dir %%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/cap.so %%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/clone.so %%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/compctl.so >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040321153134.676B222827>