A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1824 ====================================================================== Reported By: dag-erling Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1824 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Dag-Erling Smørgrav Organization: User Reference: Section: Utilities Page Number: 2741-2748 Line Number: 90593-90715, 90876-90880 Final Accepted Text: ====================================================================== Date Submitted: 2024-04-01 15:31 UTC Last Modified: 2024-04-08 08:39 UTC ====================================================================== Summary: cp: directories and symlinks ======================================================================
---------------------------------------------------------------------- (0006743) geoffclare (manager) - 2024-04-08 08:39 https://austingroupbugs.net/view.php?id=1824#c6743 ---------------------------------------------------------------------- > Line 90628 is within a section about -R. That doesn't imply "its context is traversal of the source". You can use -R without any traversal occurring, e.g.: cp -RL symlink_to_regfile copy_of_regfile cp -RP symlink copy_of_symlink and lines 90623-90625 (for -L) and 90626-90628 (for -P) apply to these cases. > Furthermore, lines 90714-90715, which describe -P in the options section, speak only of source_file or traversal, which we've established is about the source, not the destination. Aha! You've finally identified something I agree is a problem. This text conflicts with line 90628, as it implies (together with the pathname resolution rules) that symlinks are always followed for the destination whereas 90628 says they aren't. The description of -P in OPTIONS was missing from the final POSIX.2b draft and was added by IEEE PASC Interpretation 1003.2 #194. I suspect the working group which processed that interpretation just came up with the wording by comparison to the -H and -L descriptions and missed the significance of the DESCRIPTION text for -P saying "shall not follow any symbolic links" as regards the destination. Note that the rationale for the interpretation says "The standard is clear as the -P option is described in the description section. However, it would be better to have the option described in the Options section as well." (See https://web.archive.org/web/20050116074829/http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-194.html). So, it is clear the intention was for the new -P text in OPTIONS to match the existing DESCRIPTION text. Issue History Date Modified Username Field Change ====================================================================== 2024-04-01 15:31 dag-erling New Issue 2024-04-01 15:31 dag-erling Name => Dag-Erling Smørgrav 2024-04-01 15:31 dag-erling Section => Utilities 2024-04-01 15:31 dag-erling Page Number => 2741-2748 2024-04-01 15:31 dag-erling Line Number => 90593-90715, 90876-90880 2024-04-02 06:19 dannyniu Note Added: 0006731 2024-04-02 06:20 dannyniu Note Added: 0006732 2024-04-02 06:21 dannyniu Note Deleted: 0006732 2024-04-02 06:22 dannyniu Note Edited: 0006731 2024-04-02 15:51 geoffclare Note Added: 0006734 2024-04-04 14:30 geoffclare Note Added: 0006737 2024-04-04 16:01 dag-erling Note Added: 0006739 2024-04-04 16:59 geoffclare Note Added: 0006740 2024-04-04 18:19 geoffclare Note Edited: 0006740 2024-04-05 08:16 geoffclare Note Edited: 0006740 2024-04-05 11:33 dag-erling Note Added: 0006741 2024-04-08 08:39 geoffclare Note Added: 0006743 ======================================================================