Bug 64540 - zsh port doesn't add info file to package list
Summary: zsh port doesn't add info file to package list
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergei Kolobov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-21 15:40 UTC by Dimitry Andric
Modified: 2004-03-24 07:04 UTC (History)
0 users

See Also:


Attachments
file.diff (1.10 KB, patch)
2004-03-21 15:40 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2004-03-21 15:40:23 UTC
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.

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.
How-To-Repeat: Install and/or package the zsh port.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-03-21 17:15:01 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sergei

Over to maintainer.
Comment 2 Sergei Kolobov freebsd_committer freebsd_triage 2004-03-24 07:04:43 UTC
State Changed
From-To: open->closed

Committed, thanks!