Skip to content
Tcl Source Code History Of Ticket 833713ffff
Login

History Of Ticket 833713ffff

Artifacts Associated With Ticket 833713ffff

  1. Ticket change [3692e21822] (rid 107125) by hemanglavana on 2003-10-31 15:34:03:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When I create symbolic links (on solaris and linux,
      tcl8.4.4) using [file link -symbolic ...] command, the
      created link file always points to an absolute path
      even when a relative path is specified. This is causing
      problems when the directory is moved around and the
      links have to be deleted and re-created. Is this the
      correct behavior (dictated by cross-platform support)?
      
      It would be nice if the [file link] command behaved
      like the unix 'ln' utility in this respect so that I
      don't have to invoke [exec ln -s ...] for creating
      relative links.
      
      Hemang.
      
      -----------------------------
      
      I don't see that this is specifically mentioned
      anywhere in the docs
      of the implementation.  It seems a byproduct of the
      Tcl_FSGetNativePath
      request returning a fully qualified path.  I'm not sure
      whether this
      is a bug, so I've cc'ed the implementor, Vince Darley.
      
      Jeff Hobbs
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "hemanglavana"
    9. subsystem initialized to: "37. File System"
    10. title initialized to:
      Creating relative links with "file link .." command?
      
    11. type initialized to: "Bug"
  2. Ticket change [90d54afe09] (rid 120520) by vincentdarley on 2003-10-31 22:42:54:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      It's hard to say if this is a bug or a feature. On balance
      (for Unix) I suppose it is a bug.  The solution is to modify
      TclpObjLink's creation of 'target':
      
      CONST char *target = Tcl_FSGetNativePath(toPtr);
      
      so that it just uses 'Tcl_GetString' and a manual
      Tcl_UtfToExternal conversion.  I don't know if Windows/MacOS
      support such relative links or not.
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  3. Ticket change [6ae7cd2b63] (rid 128229) by dgp on 2003-11-13 08:05:55:

    1. foundin changed to: "obsolete: 8.4.4"
  4. Ticket change [0327ecc97f] (rid 119774) by vincentdarley on 2003-12-11 17:59:15:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      I'll set about fixing this, but first a question.  Is a
      symbolic link on Unix effectively just a link to an
      arbitrary 'string' or is some pre-processing done first? 
      For example, what should:
      
      % file link -symbolic foo ~vince
      
      do?  Should it genuinely link to '~vince' or should it first
      expand '~vince' and link to the expanded version?
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  5. Ticket change [a6c92eea8e] (rid 98665) by vincentdarley on 2003-12-11 18:29:32:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Please try the attached patch.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  6. Ticket change [43d7f87e9b] (rid 116624) by vincentdarley on 2003-12-11 18:29:33:

    1. icomment:
      
      
      File Added - 70240: unixlink.diff
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  7. Ticket change [19aa99bc1e] (rid 122832) by hemanglavana on 2003-12-12 00:49:02:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      On unix systems, "~/foo" is first expanded by the shell
      before passing it onto the link command. So such files will
      have absolute paths, see below:
      
      godel:271> ln -s ~/foo bar
      godel:272> ls -l bar
      lrwxrwxrwx   1 hlavana  eng           18 Dec 11 10:20 bar ->
      /users/hlavana/foo
      godel:273> 
      
      I have verified that your patch work correctly for relative
      links. As for the ~ chars, it should expand into absolute
      paths, otherwise on unix the link is not created properly:
      
      hlavana-u5:165> ./tcltk/bin/tclsh8.4
      % file link -symbolic foo ~/ddts
      ~/ddts
      % cat foo
      cat: cannot open foo
      child process exited abnormally
      % file exists foo
      0
      % file exists ~/ddts
      1
      % exit
      hlavana-u5:166> ls -l foo 
      lrwxrwxrwx   1 hlavana  eng8           6 Dec 11 12:41 foo ->
      ~/ddts
      hlavana-u5:167> cat foo
      cat: cannot open foo
      hlavana-u5:168>
      
      As you can see, ~/ddts is a valid file but foo not exist.
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"
  8. Ticket change [31e4fb6c84] (rid 93515) by vincentdarley on 2003-12-12 16:52:31:

    1. icomment:
      
      
      File Added - 70333: linknorm.diff
      
      Logged In: YES 
      user_id=32170
      
      Could you try this updated patch? -- it fixes the ~user
      issue and also patches some generic normalization code so
      that it can handle these relative links.  It would be very
      helpful if you could run the file*.test tests after applying
      this patch.
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  9. Ticket change [19ba77ce1e] (rid 122841) by hemanglavana on 2003-12-13 00:05:07:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      I am seeing some failures on solaris2.8 with your patch
      applied to cvs head:
      
      fCmd.test
      
      ==== fCmd-9.14.2 file rename: comprehensive: dir into self
      FAILED
      ==== Contents of test case:
      
          cleanup
          file mkdir td1
          set dir [pwd]
          cd td1
          set res [list [catch {file rename [file join .. td1]
      [file join .. td1x]} ms
      g] $msg]
          cd $dir
          set res
      
      ---- Result was:
      0 {}
      ---- Result should have been (exact matching):
      1 {error renaming "../td1" to "../td1x": permission denied}
      ==== fCmd-9.14.2 FAILED
      
      fileSystem.test
      
      ==== filesystem-1.7 link normalisation FAILED
      ==== Contents of test case:
      
         string equal [file normalize [file join dir.link
      linkinside.file foo]]  [file
       normalize [file join dir.file inside.file foo]]
      
      ---- Result was:
      0
      ---- Result should have been (exact matching):
      1
      ==== filesystem-1.7 FAILED
      
      
      ==== filesystem-1.9 link normalisation FAILED
      ==== Contents of test case:
      
          file delete -force dir.link
          file link dir.link [file nativename dir.file]
          string equal [file normalize [file join dir.file
      linkinside.file foo]]  [fil
      e normalize [file join dir.link inside.file foo]]
      
      ---- Result was:
      0
      ---- Result should have been (exact matching):
      1
      ==== filesystem-1.9 FAILED
      
      
      ==== filesystem-1.10 link normalisation: double link FAILED
      ==== Contents of test case:
      
          file link dir2.link dir.link
          string equal [file normalize [file join dir.file
      linkinside.file foo]]  [fil
      e normalize [file join dir2.link inside.file foo]]
      
      ---- Result was:
      0
      ---- Result should have been (exact matching):
      1
      ==== filesystem-1.10 FAILED
      
      
      ==== filesystem-1.11 link normalisation: double link, back
      in tree FAILED
      ==== Contents of test case:
      
          file link [file join dir2.file dir2.link] dir2.link
          string equal [file normalize [file join dir.file
      linkinside.file foo]]  [fil
      e normalize [file join dir2.file dir2.link inside.file foo]]
      
      ---- Result was:
      0
      ---- Result should have been (exact matching):
      1
      ==== filesystem-1.11 FAILED
      
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"
  10. Add attachment "linknorm.diff" [e9630d00ae] (rid 104813) by vincentdarley on 2003-12-13 00:17:41.

  11. Ticket change [6c2b0d3c4b] (rid 128453) by vincentdarley on 2003-12-13 00:17:41:

    1. icomment:
      
      
      File Deleted - 70333: 
      
      
      
      File Added - 70362: linknorm.diff
      
      Logged In: YES 
      user_id=32170
      
      Hmm -- I'll have to think about those.  I've updated
      fileSystem.test to be more informative.  Could you please
      re-run the tests with those changes in place?
      
      (either (a) just update fileSystem.test from cvs and re-run,
      or (b) update everything from cvs then apply the patch
      attached to this report and re-run).
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  12. Ticket change [6f109cdc81] (rid 100247) by hemanglavana on 2003-12-13 01:36:59:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      Okay, I tried option (b) and now I get only one error:
      
      fCmd.test
      
      ==== fCmd-9.14.2 file rename: comprehensive: dir into self
      FAILED
      ==== Contents of test case:
      
          cleanup
          file mkdir td1
          set dir [pwd]
          cd td1
          set res [list [catch {file rename [file join .. td1]
      [file join .. td1x]} ms
      g] $msg]
          cd $dir
          set res
      
      ---- Result was:
      0 {}
      ---- Result should have been (exact matching):
      1 {error renaming "../td1" to "../td1x": permission denied}
      ==== fCmd-9.14.2 FAILED
      
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"
  13. Ticket change [68f3fab64f] (rid 103154) by dgp on 2003-12-13 06:28:24:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      See Tcl Bug 747629.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [f3a3867a20] (rid 129748) by vincentdarley on 2003-12-16 17:37:53:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Can you tell me what 'file norm [file join .. td1]' and
      'file norm [file join .. td1x]' give at this point in the
      test suite?  Do they appear to be correct?  What is '$dir'
      in this test?
      
      thanks!
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  15. Ticket change [6be4fee565] (rid 128403) by hemanglavana on 2003-12-16 22:08:35:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      This is on solaris 2.8.
      
      godel:144> /tmp/hlavana/tcltk/bin/tclsh8.5
      % info patch
      8.5a0
      % file mkdir td1
      % set dir [pwd]
      /tmp/hlavana
      % cd td1
      % set f1 [file normalize [file join .. td1]]
      /tmp/hlavana/td1
      % set f2 [file normalize [file join .. td2]]
      /tmp/hlavana/td2
      % file join .. td1
      ../td1
      % file join .. td2
      ../td2
      % file rename [file join .. td1] [file join .. td2]
      % pwd
      /tmp/hlavana/td2
      % file rename [file join .. td2] [file join .. td3]
      % pwd
      /tmp/hlavana/td3
      % 
      
      It seems that it is possible to change the name of the
      current directory on solaris platforms.
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"
  16. Ticket change [53140871b7] (rid 126420) by vincentdarley on 2003-12-16 22:26:30:

    1. closedate changed to: "2003-12-16T15:26:30"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Thanks -- all appears fine, as you say.  I'll mark that test
      as nonPortable and close this.
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "vincentdarley"
  17. Ticket change [819f94fd06] (rid 117070) by hobbs on 2004-02-07 01:10:32:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      Reopening for 8.4.6 backport.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. status changed to: "Open"
    6. username: "hobbs"
  18. Ticket change [24f4f548bd] (rid 131200) by dgp on 2004-12-16 05:21:43:

    1. title changed to: "Creating relative links with "file link .." comman"
  19. Ticket change [85f4d87513] (rid 131418) by dgp on 2004-12-16 05:21:44:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      this was never backported?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  20. Ticket change [ac033dd846] (rid 101220) by matzek on 2005-07-29 19:52:14:

    1. icomment:
      Logged In: YES 
      user_id=330806
      
      Are there any plans to backport this into 8.4? I would
      really need it there!
      
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  21. Ticket change [6fb31dd55b] (rid 100357) by dgp on 2006-03-10 10:59:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Getting this backported for 8.4.13
      would be really nice.  I realize it's
      a tall order...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "dgp"
  22. Ticket change [94ce721a05] (rid 106059) by dgp on 2006-03-31 23:19:00:

    1. priority changed to: "7 High"