https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181636

Jose Luis Duran <jldu...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jldu...@freebsd.org

--- Comment #4 from Jose Luis Duran <jldu...@freebsd.org> ---
Created attachment 255615
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=255615&action=edit
Change modification time for symlinks

The bug is no longer present as reported, however the modification times are
not changed.  The fix might be as simple as utimes(2) -> lutimes(2), but it has
to be upstreamed (and accepted) first:

# mkdir /tmp/mtree
# cd /tmp/mtree
# mkdir dir
# touch file
# ln -s dir dirlink
# ln -s file filelink
# chown -R 206:30 .

# ls -aln
total 27
drwxr-xr-x  3 206 30 6 Dec  4 12:00 .
drwxrwxrwt  4 0   0  4 Dec  4 12:00 ..
drwxr-xr-x  2 206 30 2 Dec  4 12:00 dir
lrwxr-xr-x  1 206 30 3 Dec  4 12:00 dirlink -> dir
-rw-r--r--  1 206 30 0 Dec  4 12:00 file
lrwxr-xr-x  1 206 30 4 Dec  4 12:00 filelink -> file

# cat ../mtree.file
#          user: on
#       machine: banyan.cs.ait.ac.th
#          tree: /home/java/on/Mtree/dir
#          date: Thu Aug 29 09:58:26 2013

# .
/set type=file uid=4096 gid=30 mode=0755 nlink=1 flags=none
.               type=dir gid=5030 nlink=3 time=1377745075.000000000
    dirlink     type=link gid=5030 time=1377745073.000000000 link=dir
    file        gid=5030 mode=0644 size=0 time=1377743843.000000000
    filelink    type=link uid=206 time=1377743896.000000000 link=file

# ./dir
dir             type=dir gid=5030 nlink=2 time=1377745068.000000000
# ./dir
..

# mtree -F freebsd9 -U -f ../mtree.file
mtree: Adding -i to -U for FreeBSD compatibility
mtree: Adding -t to -U for FreeBSD compatibility
...(omitted for brevity)

# ls -aln
total 27
drwxr-xr-x  3 4096 5030 6 Aug 28  2013 .
drwxrwxrwt  4 0    0    6 Dec  4 12:00 ..
drwxr-xr-x  2 4096 5030 2 Aug 28  2013 dir
lrwxr-xr-x  1 4096 5030 3 Dec  4 12:00 dirlink -> dir
-rw-r--r--  1 4096 5030 0 Aug 28  2013 file
lrwxr-xr-x  1 206  30   4 Dec  4 12:00 filelink -> file

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to