Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#283 closed defect (fixed)

stat() fails on /@unixroot

Reported by: dmik Owned by: bird
Priority: normal Milestone: libc-0.6.6
Component: libc-backend Version: 0.6.5
Severity: normal Keywords:


If you do

  struct stat st;
  int rc = stat("/@unixroot", &st);

you will get -1 and errno=2. OTOH, stat("/unixroot/")(i.e. with a trailing slash) works fine.

This is a bogus behavior since for all other directory paths the result will be the same, regardless of the trailing slash.

Change History (6)

comment:1 Changed 6 years ago by dmik

This in particular affects the Python's os.path.realpath implementation (together with another defect), see #284 for more details.

comment:2 Changed 6 years ago by dmik

I guess that for the same (or a similar) reason this command

install -d /@unixroot/usr/local

fails with:

install: cannot create directory `/@unixroot': File exists

comment:3 Changed 6 years ago by bird

Milestone: libc-0.6.6
Priority: highnormal
Severity: majornormal

comment:4 Changed 6 years ago by bird

Owner: set to bird
Status: newaccepted

comment:5 Changed 5 years ago by bird

Component: libclibc-backend
Resolution: fixed
Status: acceptedclosed

I guess you may be using UNIXROOT=X: instead of UNIXROOT=X:/. As of r3917 / r3918 that's accepted and corrected automatically (also correcting UNIXROOT=E:/myunix/// to UNIXROOT=E:/myunix automatically). This is possibly a problem with the re-writer rule validation, and/or assumptions in the fsResolveUnix() code about getting something with a root slash after rewriting.

comment:6 Changed 5 years ago by Yuri Dario

I used UNIXROOT=x: in all rpm/yum installations... but it is good to know it is now officially supported :-))

Note: See TracTickets for help on using tickets.