Opened 18 years ago
Last modified 15 years ago
#8401 closed enhancement
RFE: macports installer package postflight tweak — at Version 5
Reported by: | asigel@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.6 |
Component: | base | Version: | 1.2 |
Keywords: | Cc: | ||
Port: |
Description (last modified by jmpp@…)
mktemp is used in the postflight script of the installer. the return of the mktemp is not checked so it may not have succeeded. the subsequent write to can fail when it doesnt have to.
Instead of doing this:
BINPATH=/opt/local/bin SBINPATH=/opt/local/sbin TMP=`/usr/bin/mktemp /tmp/dp.$$` $SHELL -l <<EOF > $TMP /usr/bin/printenv PATH exit EOF if grep $BINPATH $TMP >/dev/null 2>&1; then
maybe you can do something like:
if $SHELL -c "/usr/bin/printenv PATH"|grep -c $BINPATH >/dev/null; then echo "You already have the right PATH - l337!" else
most people would probably never run into a failure case.. but why create a temp file if you dont have to..
Change History (5)
comment:1 Changed 18 years ago by asigel@…
severity: | normal → trivial |
---|
comment:2 Changed 18 years ago by markd@…
Type: | defect → enhancement |
---|
comment:3 Changed 17 years ago by markd@…
Summary: | darwinports installer package postflight tweak → RFE: darwinports installer package postflight tweak |
---|
comment:4 Changed 17 years ago by nox@…
Milestone: | → MacPorts base bugs |
---|---|
Priority: | Expected → Normal |
Summary: | RFE: darwinports installer package postflight tweak → RFE: macports installer package postflight tweak |
comment:5 Changed 17 years ago by jmpp@…
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.