Opened 15 years ago

Closed 14 years ago

#21170 closed defect (fixed)

gcc_select: incorrect error message

Reported by: akimd (Akim Demaille) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: gcc_select

Description

When there are errors, gcc_select reports that there are "0 errors". The problem is:

select_version ${1}
if [ 0 != ${?} ]; then
        echo "there were ${?} errors selecting version \"${version}\"!"
        exit 5
fi

The test 0 != ${?} changes the current status, so next time ${?} is used, in the message, it has changed.

While trying to fix this, I originally thought the error was elsewhere, so I accidentally improved other parts of the code. I think these changes are worth being included, although they are not really needed.

Attachments (1)

gcc_select.patch (2.0 KB) - added by akimd (Akim Demaille) 15 years ago.

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by akimd (Akim Demaille)

Attachment: gcc_select.patch added

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

This was fixed in r39797. See #24924 for the request to update gcc_select.

Note: See TracTickets for help on using tickets.