At Mon, 11 Jan 2010 19:18:47 -0800 walt <[email protected]> wrote:

> On 01/11/2010 04:09 PM, Allan Gottlieb wrote:
>> My usual update world rebuilt gcc and then tried to reinstall pcmcia-cs.
>> The later failed and googling showed that I should use instead
>> pcmciautils.
>>
>> Merging pcmciautils required merging dev-util/yacc.
>> I don't know why it wouldn't accept bison.
>> dev-util/yacc failed to build due to a file collision with
>> /usr/bin/yacc, an unowned file.
>>
>> /usr/bin/yacc is unowned by any package; it is a symlink, to
>> /usr/bin/yacc.bison.  The bison ebuild moves any existing /usr/bin/yacc
>> to /usr/bin/yacc.bison and installs the symlink...
>
> Me too:
>
>  $ls -l /usr/bin/yac*
> lrwxrwxrwx 1 root root 10 2005-09-30 18:09 /usr/bin/yacc -> yacc.bison
> -rwxr-xr-x 1 root root 39 2009-05-10 05:46 /usr/bin/yacc.bison
>
> That symlink is from 2005, and no package claims it.  I, personally,
> would not hesitate to nuke that five-year-old unclaimed symlink.
>
> Hm.  My bison-2.3 does *not* claim credit for that yacc symlink.
> I think it's an orphan and should be deleted.

I don't know about "credit" but bison-2.3 does seem to create the link
in pkg_postinst().

allan

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/bison/bison-2.3.ebuild,v 1.10 
2007/12/27 19:29:06 vapier Exp $

inherit toolchain-funcs flag-o-matic

DESCRIPTION="A yacc-compatible parser generator"
HOMEPAGE="http://www.gnu.org/software/bison/bison.html";
SRC_URI="mirror://gnu/bison/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc 
~sparc-fbsd x86 ~x86-fbsd"
IUSE="nls static"

DEPEND="nls? ( sys-devel/gettext )"

RDEPEND="sys-devel/m4"

src_compile() {
        use static && append-ldflags -static
        econf $(use_enable nls) || die
        emake || die
}

src_install() {
        emake DESTDIR="${D}" install || die

        # This one is installed by dev-util/yacc
        mv "${D}"/usr/bin/yacc{,.bison} || die

        # We do not need this.
        rm -r "${D}"/usr/lib* || die

        dodoc AUTHORS NEWS ChangeLog README OChangeLog THANKS TODO
}

pkg_postinst() {
        if [[ ! -e ${ROOT}/usr/bin/yacc ]] ; then
                ln -s yacc.bison "${ROOT}"/usr/bin/yacc
        fi
}

Reply via email to