[OE-core] [PATCH] git: add Git perl module to perltools package

Robert Yang liezhi.yang at windriver.com
Wed Oct 8 03:44:55 UTC 2014


Hi Peter,

On 09/20/2014 01:44 AM, Peter A. Bigot wrote:
> Git perl tools such as add--interactive load the Git module at runtime.
> A previous patch to eliminate a QA error by deleting it instead of
> packaging it was incorrect.
>
>      beaglebone[62]$ git add -i
>      Can't locate Git.pm in @INC (you may need to install the Git module) (@INC contains: /usr/lib/perl/5.20.0 /prj/pab/Utils/lib/perl5/linux-arm/5.020000 /prj/pab/Utils/lib/perl5/ /prj/pab/Utils/lib/perl5/site_perl/linux-arm /prj/pab/Utils/lib/perl5/site_perl /etc/perl /usr/lib/perl/site_perl/5.20.0/ /usr/lib/perl/site_perl/5.20.0 /usr/lib/perl/vendor_perl/5.20.0/ /usr/lib/perl/vendor_perl/5.20.0 /usr/lib/perl/5.20.0/ /usr/local/lib/site_perl .) at /usr/lib/git/git-core/git-add--interactive line 7.
>      BEGIN failed--compilation aborted at /usr/lib/git/git-core/git-add--interactive line 7.
>
> [YOCTO#3780]
>
> Signed-off-by: Peter A. Bigot <pab at pabigot.com>
> ---
>   meta/recipes-devtools/git/git.inc | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
> index 7633577..3580275 100644
> --- a/meta/recipes-devtools/git/git.inc
> +++ b/meta/recipes-devtools/git/git.inc
> @@ -30,11 +30,6 @@ do_install () {
>   	oe_runmake install DESTDIR="${D}" bindir=${bindir} \
>   		template_dir=${datadir}/git-core/templates \
>   		GIT_PYTHON_DIR=${D}${datadir}/git-core/python
> -
> -	# ${libdir} is not applicable here, perl-native files are always
> -	# installed to /usr/lib on both 32/64 bits targets.
> -	rm -rf ${D}${exec_prefix}/lib/perl-native
> -	rmdir ${D}${exec_prefix}/lib || true
>   }
>
>   PERLSEDFIXUP = " \
> @@ -48,6 +43,8 @@ REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
>
>   do_install_append_class-target () {
>   	${PERLSEDFIXUP}
> +	mv ${D}${libdir}/perl-native/perl ${D}${libdir}
> +	rmdir ${D}${libdir}/perl-native || true

We can't use the ${libdir} to replace of the {D}${exec_prefix}/lib as
the comment said that:

# ${libdir} is not applicable here, perl-native files are always
# installed to /usr/lib on both 32/64 bits targets.

Other wise we would get errors when:
MACHINE = qemux86-64 and libdir = /usr/lib64:
     mv: cannot stat `/path/to/image/usr/lib64/perl-native/perl': No such file 
or directory

I will send a patch to fix it.

// Robert

>   }
>
>   do_install_append_class-native() {
> @@ -90,6 +87,7 @@ PERLTOOLS = " \
>   PACKAGES =+ "${PN}-perltools"
>   FILES_${PN}-perltools += " \
>       ${PERLTOOLS} \
> +    ${libdir}/perl \
>       ${datadir}/perl \
>   "
>   RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
>



More information about the Openembedded-core mailing list