Date: Sat, 15 Aug 2015 21:51:36 +0200 From: Xavier <xavier@groumpf.org> To: FreeBSD Ports ML <freebsd-ports@freebsd.org> Subject: Perl 5.20 breaks /usr/bin/perl Message-ID: <55CF9848.3050302@groumpf.org>
next in thread | raw e-mail | index | archive | help
Hi, Wondering why nobody does report it yet. I noticed a couple weeks ago, an confirmed today on another computer, that : portupgrade -o lang/perl5.20 lang/perl5.18 removes the symlink in /usr/bin, and doesn't recreate it, thus broking all perl scripts and programs. In fact, this line : /bin/ln -sf "${PKG_PREFIX}/bin/perl${PERL_VERSION}" "/usr/bin/${binary}" in function do_create_links() thas was in lang/perl5.18/files/use.perl.in is missing in 5.20 port. All links handling has been removed from use.perl.in, and the knob in make config too. [root@aragorn perl5.20]# diff files/use.perl.in ../perl5.18/files/use.perl.in 3c3 < # $FreeBSD: head/lang/perl5.20/files/use.perl.in 384051 2015-04-15 13:46:34Z mat $ --- > # $FreeBSD: head/lang/perl5.18/files/use.perl.in 373771 2014-12-02 16:27:00Z mat $ 4a5 > LINK_USRBIN="%%LINK_USRBIN%%" 7a9,42 > special_link_list="perl perl5" > > do_remove_links() > { > for binary in ${special_link_list} ; do > if [ -L "/usr/bin/${binary}" ] ; then > /bin/rm -f "/usr/bin/${binary}" > fi > done > bins=`/bin/ls /usr/bin/*perl*5.* ${PKG_PREFIX}/bin/*perl*5.* 2>/dev/null` > for binary in ${bins} ; do > if [ -L "${binary}" ] ; then > echo "use.perl: Removing ${binary} installed by an older perl port" > /bin/rm -f "${binary}" > fi > done > } > > do_create_links() > { > for binary in ${special_link_list} ; do > if [ -f "/usr/bin/${binary}" ] ; then > echo "use.perl: Backing up /usr/bin/${binary} as /usr/bin/${binary}.freebsd" > /bin/mv -f "/usr/bin/${binary}" "/usr/bin/${binary}.freebsd" > fi > if [ -e "/usr/bin/${binary}" ] ; then > echo "use.perl: /usr/bin/${binary} is still there, which should not happen" > elif [ -e "${PKG_PREFIX}/bin/perl${PERL_VERSION}" ] ; then > /bin/ln -sf "${PKG_PREFIX}/bin/perl${PERL_VERSION}" "/usr/bin/${binary}" > else > echo "use.perl: ${PKG_PREFIX}/bin/perl${PERL_VERSION} is not there, a symlink won't do any good" > fi > done > } 36,37c71,78 < do_cleanup_manpath < do_spam_manpath --- > if [ ${LINK_USRBIN} = yes ] ; then > do_remove_links > do_create_links > fi > if [ "${OSVERSION}" -lt 900022 ] ; then > do_cleanup_manpath > do_spam_manpath > fi 39c80,81 < do_cleanup_manpath --- > [ ${LINK_USRBIN} = yes ] && do_remove_links > [ "${OSVERSION}" -lt 900022 ] && do_cleanup_manpath Regards, Xav -- Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55CF9848.3050302>