GNU bug report logs - #15173
[cp] --link overrides dereference settings

Previous Next

Package: coreutils;

Reported by: Gian Piero Carrubba <gpiero <at> rm-rf.it>

Date: Fri, 23 Aug 2013 21:55:02 UTC

Severity: normal

Tags: fixed

Merged with 23120

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


Message #89 received at control <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 15173 <at> debbugs.gnu.org
Cc: Bernhard Voelker <mail <at> bernhard-voelker.de>, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#15173: [cp] --link overrides dereference settings
Date: Mon, 09 Dec 2013 01:24:46 +0000
[Message part 1 (text/plain, inline)]
unarchive 15173
stop

The test for this is failing on solaris 10 (NFS)
It does seem that hardlinks to symlinks are supported:

$ touch tfile
$ ln -s tfile tlink
$ src/ln -L tlink tlink-ln-L
$ src/ln -P tlink tlink-ln-P
$ src/ln tlink tlink-ln
$ ls -li tfile tlink*
      8550 -rw-r--r--   3 padraig  csw            0 Dec  9 01:18 tfile
      8551 lrwxrwxrwx   2 padraig  csw            5 Dec  9 01:19 tlink -> tfile
      8550 -rw-r--r--   3 padraig  csw            0 Dec  9 01:18 tlink-ln
      8550 -rw-r--r--   3 padraig  csw            0 Dec  9 01:18 tlink-ln-L
      8551 lrwxrwxrwx   2 padraig  csw            5 Dec  9 01:19 tlink-ln-P -> tfile

But we have linkat() emulation in place I think:

$ grep LINK lib/config.h
/* #undef CHOWN_MODIFIES_SYMLINK */
#define GNULIB_AREADLINKAT 1
#define GNULIB_TEST_LINK 1
#define GNULIB_TEST_LINKAT 1
#define GNULIB_TEST_READLINK 1
#define GNULIB_TEST_READLINKAT 1
#define GNULIB_TEST_SYMLINK 1
#define GNULIB_TEST_SYMLINKAT 1
#define GNULIB_TEST_UNLINK 1
#define GNULIB_TEST_UNLINKAT 1
#define HAVE_LINK 1
/* #undef HAVE_LINKAT */
#define HAVE_READLINK 1
/* #undef HAVE_READLINKAT */
#define HAVE_SYMLINK 1
/* #undef HAVE_SYMLINKAT */
#define HAVE_UNLINKAT 1
/* #undef LINKAT_TRAILING_SLASH_BUG */
#define LINK_FOLLOWS_SYMLINKS -1
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
#define PIPE_LINK_COUNT_MAX (0)
/* #undef READLINK_TRAILING_SLASH_BUG */
/* #undef RENAME_HARD_LINK_BUG */
/* #undef UNLINK_CANNOT_UNLINK_DIR */
/* #undef UNLINK_PARENT_BUG */

I've attached the verbose log for the test,
as I've not time to look into it at present.

thanks,
Pádraig.

[test-suite.log (text/x-log, attachment)]

This bug report was last modified 6 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.