[MacPorts] #50427: sqlite3 @3.10.2_0 Cannot open database via symlink

MacPorts noreply at macports.org
Sun Jan 24 06:26:33 PST 2016


#50427: sqlite3 @3.10.2_0 Cannot open database via symlink
-----------------------+--------------------------------
  Reporter:  hanche@…  |      Owner:  macports-tickets@…
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.3.4
Resolution:            |   Keywords:
      Port:  sqlite3   |
-----------------------+--------------------------------

Comment (by cal@…):

 Yes, this seems to be an upstream bug. Relative symlink seem to be
 expanded relative to the current working directory, not to the path of the
 database given on the command line. See:

 {{{
 $ mkdir x y
 $ sqlite3 x/foo.sqlite 'create table foo(x);'
 $ ln -s ../x/foo.sqlite y
 $ sudo dtruss -f sqlite3 y/foo.sqlite 'select count(*) from foo;'
 [...]
 15929/0xc741:
 stat64("/private/var/folders/6t/nzy5y3kn1f5fg1xhxvgg4gr00000gn/T\0",
 0x7FFF579EEC00, 0x7FFF579EE800)              = 0 0
 15929/0xc741:
 stat64("/private/var/folders/6t/nzy5y3kn1f5fg1xhxvgg4gr00000gn/T/../x/foo.sqlite\0",
 0x7FFF579EE060, 0x7FFF579EE800)              = -1 Err#2
 15929/0xc741:
 open("/private/var/folders/6t/nzy5y3kn1f5fg1xhxvgg4gr00000gn/T/../x/foo.sqlite\0",
 0x1000202, 0x1A4)              = -1 Err#2
 15929/0xc741:
 open("/private/var/folders/6t/nzy5y3kn1f5fg1xhxvgg4gr00000gn/T/../x/foo.sqlite\0",
 0x1000000, 0x1A4)              = -1 Err#2
 15929/0xc741:  write_nocancel(0x2, "Error: unable to open database
 \"y/foo.sqlite\": unable to open database file\n\0", 0x4C)            = 76
 0
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/50427#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list