<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>1369</bug_id>
          
          <creation_ts>2002-10-08 00:48:42 +0400</creation_ts>
          <short_desc>coreutils\&apos; ln: fails with --target-dir</short_desc>
          <delta_ts>2003-08-25 15:18:34 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>fileutils</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="imz">vanyaz</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1291</commentid>
    <comment_count>0</comment_count>
    <who name="imz">vanyaz</who>
    <bug_when>2002-10-08 00:48:42 +0400</bug_when>
    <thetext>Does its job, but complains about an error and exits with an error code.

---
$ mkdir dir; touch src; ln -s --target-dir=dir ../src; echo $?; ls -l src dir
ln: `dir/.\&apos;: cannot overwrite directory
1
-rw-r--r--    1 imz      imz             0 Окт  8 00:36 src

dir:
итого 0
lrwxrwxrwx    1 imz      imz             6 Окт  8 00:36 src -&amp;gt; ../src
[&lt;a href=&quot;mailto:imz@basalt&quot; target=&quot;_new&quot;&gt;imz@basalt&lt;/a&gt; tmp]$ rpm -qf /bin/ln
coreutils-4.5.1-alt2
[&lt;a href=&quot;mailto:imz@basalt&quot; target=&quot;_new&quot;&gt;imz@basalt&lt;/a&gt; tmp]$

---
Putting \&amp;quot;dir\&amp;quot; as the last argument makes it work.

Similar 

cp --target-dir=dir src

works fine.

This:

cp --symbolic-link --target-dir=dir \&amp;quot;$(pwd)\&amp;quot;/src

also works; can be regarded as a workaround.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4228</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2002-10-08 17:28:14 +0400</bug_when>
    <thetext>Fixed in coreutils-4.5.2-alt1
(patch for coreutils-4.5.2 attached).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7593</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2002-10-08 17:28:14 +0400</bug_when>
    <thetext>Fixed in coreutils-4.5.2-alt1
(patch for coreutils-4.5.2 attached).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4229</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2002-10-08 18:48:14 +0400</bug_when>
    <thetext>Merged into coreutils-4.5.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7594</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2002-10-08 18:48:14 +0400</bug_when>
    <thetext>Merged into coreutils-4.5.3</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>119</attachid>
            <date>2002-10-08 17:26:40 +0400</date>
            <delta_ts>2002-10-08 17:26:40 +0400</delta_ts>
            <desc>0001369-coreutils-4.5.2-alt-ln-target_directory.patch</desc>
            <filename>0001369-coreutils-4.5.2-alt-ln-target_directory.patch</filename>
            <type>application/octet-stream</type>
            <size>586</size>
            <attacher name="imz">vanyaz</attacher>
            
              <data encoding="base64">LS0tIGNvcmV1dGlscy00LjUuMi9zcmMvbG4uYy5vcmlnCTIwMDItMDgtMzEgMTI6NTI6MTAgKzA0
MDAKKysrIGNvcmV1dGlscy00LjUuMi9zcmMvbG4uYwkyMDAyLTEwLTA4IDE3OjE2OjQzICswNDAw
CkBAIC00OTUsOSArNDk1LDkgQEAKICAgaWYgKCF0YXJnZXRfZGlyZWN0b3J5KQogICAgIHRhcmdl
dF9kaXJlY3RvcnkgPSBmaWxlW25fZmlsZXMgLSAxXTsKIAotICAvKiBJZiB0aGVyZSdzIG9ubHkg
b25lIGZpbGUgYXJndW1lbnQsIHRoZW4gcHJldGVuZCBgLicgd2FzIGdpdmVuCi0gICAgIGFzIHRo
ZSBzZWNvbmQgYXJndW1lbnQuICAqLwotICBpZiAobl9maWxlcyA9PSAxKQorICAvKiBJZiB0YXJn
ZXQgZGlyZWN0b3J5IGlzIG5vdCBzcGVjaWZpZWQsIGFuZCB0aGVyZSdzIG9ubHkgb25lCisgICAg
IGZpbGUgYXJndW1lbnQsIHRoZW4gcHJldGVuZCBgLicgd2FzIGdpdmVuIGFzIHRoZSBzZWNvbmQg
YXJndW1lbnQuICAqLworICBpZiAoIXRhcmdldF9kaXJlY3Rvcnlfc3BlY2lmaWVkICYmIG5fZmls
ZXMgPT0gMSkKICAgICB7CiAgICAgICBzdGF0aWMgY2hhciAqZHVtbXlbMl07CiAgICAgICBkdW1t
eVswXSA9IGZpbGVbMF07Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>