<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11643</bug_id>
          
          <creation_ts>2017-06-11 05:23:21 +0000</creation_ts>
          <short_desc>Special dot files . and .. exist for both for directories and files</short_desc>
          <delta_ts>2018-04-04 03:09:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Pseudo</product>
          <component>pseudo</component>
          <version>master</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>2.5 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Liu">net147</reporter>
          <assigned_to name="Seebs">seebs</assigned_to>
          <cc>richard.purdie</cc>
    
    <cc>seebs</cc>
    
    <cc>yp.pseudo.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73969</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Liu">net147</who>
    <bug_when>2017-06-11 05:23:21 +0000</bug_when>
    <thetext>Running outside of pseudo inside an empty directory:
# touch test; ls -l test test/. test/..
ls: cannot access &apos;test/.&apos;: Not a directory
ls: cannot access &apos;test/..&apos;: Not a directory
-rw-r--r-- 1 root root 0 Jun 11 15:15 test


Running inside of pseudo  inside an empty directory:
# touch test; ls -l test test/. test/..
-rw-r--r-- 1 root root 0 Jun 11 15:15 test
-rw-r--r-- 1 root root 0 Jun 11 15:15 test/.

test/..:
total 0
-rw-r--r-- 1 root root 0 Jun 11 15:15 test


This is causing &quot;make headers_install&quot; with Linux kernel (v4.12-rc2 and later) to fail since commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=05d8cba4a1e8c7e2d1f91a24a2f3d26852938a04

This is because in the &quot;$(wildcard $(srcdir)/*/.)&quot; in scripts/Makefile.headersinst will match not only directories, but files as well when run under pseudo. It will also affect any code that determines if a path is a directory based on whether it contains a file with a single dot as the name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73970</commentid>
    <comment_count>1</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2017-06-11 05:27:47 +0000</bug_when>
    <thetext>Huh, that&apos;s fascinating. We already had a similar thing about handling of names ending with a slash, but this is a variant I hadn&apos;t considered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79729</commentid>
    <comment_count>2</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2018-03-06 15:07:52 +0000</bug_when>
    <thetext>I have a tentative patch for this but I am not super happy with it. It&apos;s living in pseudo master now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80056</commentid>
    <comment_count>3</comment_count>
    <who name="Seebs">seebs</who>
    <bug_when>2018-03-30 21:13:56 +0000</bug_when>
    <thetext>I&apos;ve revised the patch significantly after someone found bugs in it, and then i found more bugs, and more bugs after that, and then i rewrote the path canonicalization code substantially and it seems okay now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80083</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-04-04 03:09:56 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5b68f72e590546958a742f64f3501f1abaa22267</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>