Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#57895 closed defect (duplicate)

coreutils: The BSD 'cut' command is still used despite specifying that the GNU version of 'cut' should be used by default instead

Reported by: DanHam (Dan) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: coreutils

Description

It looks as though the paths for GNU cut (installed as part of the coreutils port) have been misconfigured. Unlike all other commands installed by the port, the cut utility is installed under /opt/local/bin with a prefix of 'gnu' rather than 'g'. Additionally, there is no 'non-prefixed' link installed under /opt/local/libexec/gnubin.

Currently, the paths for GNU cut are configured as:

/opt/local/bin/gnucut

and

/opt/local/libexec/gnubin/gnucut

This means that the BSD version of cut (/usr/bin/cut) is used, even when the user has added /opt/local/libexec/gnubin to the front of their PATH variable. Somewhat confusingly, $man cut (correctly) displays the page for the GNU version of cut.

I think the correct paths for GNU cut should instead be:

/opt/local/bin/gcut

With a symlink under /opt/local/libexec/gnubin pointing to the above of:

/opt/local/libexec/gnubin/cut 

Change History (6)

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

Keywords: coreutils cut removed

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed

This was done on purpose to not conflict with another port. See #55327.

comment:3 Changed 6 years ago by DanHam (Dan)

OK. Reading through that ticket, only the actual binary under /opt/local/bin should have been renamed to gnucut to fix #55327. The symlink itself should only have been updated to point to the newly named binary and should not have been renamed.

In other words, after the fix for #55327, we should of had:

/opt/local/bin/gnucut

and a symlink of:

/opt/local/libexec/gnubin/cut -> /opt/local/bin/gnucut

This would have allowed the 'invisible' change alluded to in #55327 and retained the promised behaviour of using the GNU version of cut for those with /opt/local/libexec/gnubin at the head of their $PATH.

comment:4 Changed 6 years ago by DanHam (Dan)

Resolution: duplicate
Status: closedreopened

comment:5 Changed 6 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: reopenedclosed

Please do not re-open duplicate tickets. If you have a better solution, re-open the original and submit a git pull request to fix it.

comment:6 Changed 6 years ago by DanHam (Dan)

Understood. However, for me this was a new defect caused by the fix for #55327 - not a duplicate of it.

I've taken a quick look on GitHub and it seems the fix would be quite straight forward. Hopefully I can get a PR raised to fix it.

Many thanks

Note: See TracTickets for help on using tickets.