<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>64260</bug_id>
          
          <creation_ts>2004-09-16 06:16 0000</creation_ts>
          <short_desc>macos:  sed merge fails, deletes system sed</short_desc>
          <delta_ts>2005-02-06 13:33:21 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>clmason@gmail.com</reporter>
          <assigned_to>osx@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>clmason@gmail.com</who>
            <bug_when>2004-09-16 06:16:04 0000</bug_when>
            <thetext>I just attempted a new install of gentoo macos, and the last step of &quot;emerge system&quot;,
which was to install &quot;sed&quot; failed.  Here&apos;s the output of the merge:

&gt;&gt;&gt; Completed installing into /var/tmp/portage/sed-4.0.9/image/

* checking 16 files for package collisions
* spend 0.0283830165863 seconds checking for file collisions
&gt;&gt;&gt; Merging sys-apps/sed-4.0.9 to /
--- /bin/
&gt;&gt;&gt; /bin/gsed
--- /usr/
--- /usr/bin/
&gt;&gt;&gt; /usr/bin/gsed -&gt; ../../bin/gsed
--- /usr/share/
--- /usr/share/doc/
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/AUTHORS.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/BUGS.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/ChangeLog.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/COPYING.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/examples/
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/examples/dos2unix.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/examples/unix2dos.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/NEWS.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/README.boot.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/README.gz
&gt;&gt;&gt; /usr/share/doc/gsed-4.0.9/THANKS.gz
--- /usr/share/info/
&gt;&gt;&gt; /usr/share/info/gsed.info-1.gz
&gt;&gt;&gt; /usr/share/info/gsed.info-2.gz
&gt;&gt;&gt; /usr/share/info/gsed.info.gz
--- /usr/share/man/
--- /usr/share/man/man1/
&gt;&gt;&gt; /usr/share/man/man1/gsed.1.gz
!!! failed to properly create symlink:
!!! /usr/bin/sed -&gt; ../../bin/sed
!!! [Errno 2] No such file or directory: &apos;/usr/bin/sed&apos;
!!! Failed to move file.
!!! /usr/bin/sed -&gt; ../../bin/sed

This resulted in an &quot;INCOMPLETE MERGE&quot; and no working sed on my system.  I had
to manually unmerge all the files, then copy sed.ORIG back to sed.  (Which I had created
a copy months ago out of paranoia.  :)  So, I think it actually wiped out the system sed,
even though collision protection is on.

I&apos;m running Mac OS X 10.3.5.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>usata@gentoo.org</who>
            <bug_when>2004-09-16 06:49:03 0000</bug_when>
            <thetext>Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>usata@gentoo.org</who>
            <bug_when>2004-09-16 06:52:27 0000</bug_when>
            <thetext>Thanks for the bug report. Fixed in CVS.

--- sed-4.0.9.ebuild.orig       Thu Sep 16 11:37:19 2004
+++ sed-4.0.9.ebuild    Thu Sep 16 22:39:51 2004
@@ -45,8 +45,6 @@
        fi
 
        rm -f ${D}/usr/bin/sed
-       use macos &amp;&amp; cd ${D} &amp;&amp; for x in `find . -name &apos;sed*&apos; -print`; do mv &quot;$x&quot; &quot;${x//sed/gsed}&quot;; done &amp;&amp; cd ${WORKDIR}/${P}
-       use macos &amp;&amp; dosym ../../bin/gsed /usr/bin/gsed || dosym ../../bin/sed /usr/bin/sed
-       use ppc-macos &amp;&amp; cd ${D} &amp;&amp; for x in `find . -name &apos;sed*&apos; -print`; do mv &quot;$x&quot; &quot;${x//sed/gsed}&quot;; done &amp;&amp; cd ${WORKDIR}/${P}
-       use ppc-macos &amp;&amp; dosym ../../bin/gsed /usr/bin/gsed || dosym ../../bin/sed /usr/bin/sed
+       ( use macos || use ppc-macos ) &amp;&amp; cd ${D} &amp;&amp; for x in `find . -name &apos;sed*&apos; -print`; do mv &quot;$x&quot; &quot;${x//sed/gsed}&quot;; done &amp;&amp; cd ${WORKDIR}/${P}
+       ( use macos || use ppc-macos ) &amp;&amp; dosym ../../bin/gsed /usr/bin/gsed || dosym ../../bin/sed /usr/bin/sed
 }

pvdabeel, I think you might do similar things to other ebuilds. Could you (or other guys if he&apos;s busy) check it?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>clmason@gmail.com</who>
            <bug_when>2004-09-16 07:40:10 0000</bug_when>
            <thetext>
Thanks a lot.  When I try it now I get:

&gt;&gt;&gt; Completed installing into /var/tmp/portage/sed-4.0.9/image/

Traceback (most recent call last):
  File &quot;/usr/lib/portage/bin/emerge&quot;, line 2755, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File &quot;/usr/lib/portage/bin/emerge&quot;, line 1678, in merge
    retval=portage.doebuild(y,&quot;merge&quot;,myroot,self.pkgsettings,edebug)
  File &quot;/usr/lib/portage/pym/portage.py&quot;, line 2779, in doebuild
    return merge(mysettings[&quot;CATEGORY&quot;],mysettings[&quot;PF&quot;],mysettings[&quot;D&quot;],mysettings[&quot;BUILDDIR&quot;]+&quot;/build-info&quot;,myroot,mysettings,myebuild=mysettings[&quot;EBUILD&quot;])
  File &quot;/usr/lib/portage/pym/portage.py&quot;, line 2901, in merge
    return mylink.merge(pkgloc,infloc,myroot,myebuild)
  File &quot;/usr/lib/portage/pym/portage.py&quot;, line 6694, in merge
    return self.treewalk(mergeroot,myroot,inforoot,myebuild,cleanup=cleanup)
  File &quot;/usr/lib/portage/pym/portage.py&quot;, line 6221, in treewalk
    if catpkgsplit(p)[0] == self.cat and catpkgsplit(p)[1] == pkgsplit(self.pkg)[0]:
TypeError: unsubscriptable object

Is there something I need to do to get my system back into a sane state?

Thanks.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>usata@gentoo.org</who>
            <bug_when>2004-09-16 07:55:42 0000</bug_when>
            <thetext>Do you have something in /var/db/pkg/sys-apps? 
If you are not running emerge, remove -MERGING-blah and foo.lockfile if you find any.
(Just FYI, you can delete files starting with - by &quot;rm ./-MERGING-blah&quot; or &quot;rm -- -MERGING-blah&quot;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>clmason@gmail.com</who>
            <bug_when>2004-09-16 08:03:23 0000</bug_when>
            <thetext>
Thanks for the hints, sed is now merging properly.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gongloo@gentoo.org</who>
            <bug_when>2005-02-06 13:33:21 0000</bug_when>
            <thetext>Closing out bugs that&apos;ve been resolved for a while now... </thetext>
          </long_desc>
      
    </bug>

</bugzilla>