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

 
 

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

Submitted by:  David Boyce <boyski>
Submitted on:  Wed 10 Oct 2018 01:32:48 PM UTC  
 
Severity:  3 - Normal Item Group:  Documentation
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  SCM Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5