bugmake - Bugs: bug #54816, $(wildcard ...) function does not...

 
 

bug #54816: $(wildcard ...) function does not report dangling symlinks

Submitter:  David Boyce <boyski>
Submitted:  Wed 10 Oct 2018 01:32:48 PM UTC
   
 
Severity:  3 - Normal Item Group:  Documentation
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.3 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 06 Dec 2020 08:13:13 PM UTC, comment #3: 

This issue appears to be resolved by glibc so I'm closing it.

Paul D. Smith <psmith>
Group administrator
Wed 10 Oct 2018 02:49:35 PM UTC, comment #2: 

See glibc bug 866 <https://sourceware.org/bugzilla/show_bug.cgi?id=866> which was only fixed recently.

Andreas Schwab <schwab>
Wed 10 Oct 2018 02:30:54 PM UTC, comment #1: 

wildcard invokes the system glob() function.  It doesn't do any extra checking beyond that, that I recall (like a stat etc.)  I don't know why glob() would not return symlinks but I couldn't find anything in the man page about it, either way.  I'll need to debug it.

Paul D. Smith <psmith>
Group administrator
Wed 10 Oct 2018 01:32:48 PM UTC, original submission:  

According to the manual the wildcard function "is replaced by a space-separated list of names of existing files ...". However, it does not find a symbolic link which exists but does not point to an existing file (apparently wildcard uses stat, not lstat). It's not clear to me whether this is a code or a documentation bug but it ought to be clarified in the doc at the least. Here's a test case:

% ls -lrt
total 4
-rw-rw-r-- 1 xxxxxxx users 42 Oct 10 06:24 Makefile
lrwxrwxrwx 1 xxxxxxx users 11 Oct 10 06:24 yes -> /etc/passwd
lrwxrwxrwx 1 xxxxxxx users  9 Oct 10 06:25 no -> /etc/asdf

% cat Makefile
$(info FOUND: $(wildcard yes no))
all:;@:

% make
FOUND: yes

David Boyce <boyski>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by boyski (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-06 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code