Hi,

collision-protect isn't always wrong... but sometimes it for sure is.
That's the weird thing of it.  I can't tell when it will bail out, and
when it will be happy.

On 27-09-2006 23:06:44 +0200, Michael Haubenwallner wrote:
> Hi,
> 
> here's a patch to install perl-modules correctly, tested with
> perl-core/Test-Harness and perl-core/PodParser.
> 
> Initial problem was:
> 
> * checking 18 files for package collisions
> existing file 
> /tools/haubi/gentoo/usr/lib/perl5/5.8.8/i386-linux/perllocal.pod is not owned 
> by this package
> * spent 0.000946998596191 seconds checking for file collisions
> * This package is blocked because it wants to overwrite 
> * files belonging to other packages (see messages above).
> * If you have no clue what this is all about report it
> * as a bug for this package on http://bugs.gentoo.org
> 
> package perl-core/PodParser-1.34 NOT merged
> 
> It turned out that this perllocal.pod indeed was owned by previously
> installed perl-core/Test-Harness, because of broken perl-module.eclass's
> pod-handling functions.
> 
> So what I think of collision-protect: It works as expected, but the
> ebuilds/eclasses are incorrect for prefix.
> 
> /haubi/
> -- 
> Michael Haubenwallner                    SALOMON Automation GmbH
> Forschung & Entwicklung                  A-8114 Friesach bei Graz
> mailto:[EMAIL PROTECTED]  http://www.salomon.at
> No HTML/MIME please, see http://expita.com/nomime.html

> Index: eclass/perl-module.eclass
> ===================================================================
> --- eclass/perl-module.eclass (revision 1663)
> +++ eclass/perl-module.eclass (working copy)
> @@ -108,7 +108,7 @@
>               einfo "Using ExtUtils::MakeMaker"
>               #perl Makefile.PL ${myconf} \
>               perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\
> -             PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
> +             PREFIX=${EPREFIX}/usr INSTALLDIRS=vendor DESTDIR=${EDEST}
>       fi
>  }
>  
> @@ -224,7 +224,7 @@
>               fi
>       fi
>  
> -     if [ -f /usr/bin/perl ]
> +     if [ -f ${EPREFIX}/usr/bin/perl ]
>       then
>               POD_DIR="/usr/share/perl/gentoo-pods/${version}"
>       fi
> @@ -234,51 +234,51 @@
>       perlinfo
>       dodir ${POD_DIR}
>  
> -     if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
> +     if [ -f ${EDEST}${ARCH_LIB}/perllocal.pod ];
>       then
>               touch ${D}/${POD_DIR}/${P}.pod
>               sed -e "s:${D}::g" \
> -                     ${D}${ARCH_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
> +                     ${EDEST}${ARCH_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
>               touch ${D}/${POD_DIR}/${P}.pod.arch
>               cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch
> -             rm -f ${D}/${ARCH_LIB}/perllocal.pod
> +             rm -f ${EDEST}/${ARCH_LIB}/perllocal.pod
>       fi
>  
> -     if [ -f ${D}${SITE_LIB}/perllocal.pod ];
> +     if [ -f ${EDEST}${SITE_LIB}/perllocal.pod ];
>       then
>               touch ${D}/${POD_DIR}/${P}.pod
>               sed -e "s:${D}::g" \
> -                     ${D}${SITE_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
> +                     ${EDEST}${SITE_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
>               touch ${D}/${POD_DIR}/${P}.pod.site
>               cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
> -             rm -f ${D}/${SITE_LIB}/perllocal.pod
> +             rm -f ${EDEST}/${SITE_LIB}/perllocal.pod
>       fi
>  
> -     if [ -f ${D}${VENDOR_LIB}/perllocal.pod ];
> +     if [ -f ${EDEST}${VENDOR_LIB}/perllocal.pod ];
>       then
>               touch ${D}/${POD_DIR}/${P}.pod
>               sed -e "s:${D}::g" \
> -                     ${D}${VENDOR_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
> +                     ${EDEST}${VENDOR_LIB}/perllocal.pod >> 
> ${D}/${POD_DIR}/${P}.pod
>               touch ${D}/${POD_DIR}/${P}.pod.vendor
>               cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.vendor
> -             rm -f ${D}/${VENDOR_LIB}/perllocal.pod
> +             rm -f ${EDEST}/${VENDOR_LIB}/perllocal.pod
>       fi
>  }
>  
>  updatepod() {
>       perlinfo
>  
> -     if [ -d "${POD_DIR}" ]
> +     if [ -d "${EPREFIX}${POD_DIR}" ]
>       then
> -             for FILE in `find ${POD_DIR} -type f -name "*.pod.arch"`; do
> +             for FILE in `find ${EPREFIX}${POD_DIR} -type f -name 
> "*.pod.arch"`; do
>                  cat ${FILE} >> ${ARCH_LIB}/perllocal.pod
>                  rm -f ${FILE}
>               done
> -             for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
> +             for FILE in `find ${EPREFIX}${POD_DIR} -type f -name 
> "*.pod.site"`; do
>                  cat ${FILE} >> ${SITE_LIB}/perllocal.pod
>                  rm -f ${FILE}
>               done
> -             for FILE in `find ${POD_DIR} -type f -name "*.pod.vendor"`; do
> +             for FILE in `find ${EPREFIX}${POD_DIR} -type f -name 
> "*.pod.vendor"`; do
>                  cat ${FILE} >> ${VENDOR_LIB}/perllocal.pod
>                  rm -f ${FILE}
>               done


-- 
Fabian Groffen
Gentoo on a different level
-- 
[EMAIL PROTECTED] mailing list

Reply via email to