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:
Cc:

Description

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 set to libc-0.6.6
  • Priority changed from high to normal
  • Severity changed from major to normal

comment:4 Changed 6 years ago by bird

  • Owner set to bird
  • Status changed from new to accepted

comment:5 Changed 5 years ago by bird

  • Component changed from libc to libc-backend
  • Resolution set to fixed
  • Status changed from accepted to closed

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 ydario

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.