diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-02 22:20:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-03 17:40:08 +0100 |
commit | 4806a459880d0860b563d30d3fa8d7cde3461cc6 (patch) | |
tree | 779b75824780d2d2d698e8ccf2f20b6d0f19e911 /meta | |
parent | 07864a16baf18046b726ec72b688594a91c6e4b4 (diff) | |
download | openembedded-core-4806a459880d0860b563d30d3fa8d7cde3461cc6.tar.gz openembedded-core-4806a459880d0860b563d30d3fa8d7cde3461cc6.tar.bz2 openembedded-core-4806a459880d0860b563d30d3fa8d7cde3461cc6.zip |
libzypp: Correctly handle - in package architecture names
If package architectures contain - characters this needs to be mapped
to something else in (_) since its illegal in C variable names.
[YOCTO #1313 partially]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/libzypp/libzypp_git.bb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb index 6e8fe16a15..bb36a9069e 100644 --- a/meta/recipes-extended/libzypp/libzypp_git.bb +++ b/meta/recipes-extended/libzypp/libzypp_git.bb @@ -54,7 +54,7 @@ do_archgen () { echo "" >> zypp/poky-arch.h echo "#ifndef POKY_ARCH_H" >> zypp/poky-arch.h echo "#define POKY_ARCH_H 1" >> zypp/poky-arch.h - echo "#define Arch_machine Arch_${MACHINE_ARCH}" >> zypp/poky-arch.h + echo "#define Arch_machine Arch_${MACHINE_ARCH}" | tr - _ >> zypp/poky-arch.h echo "#endif /* POKY_ARCH_H */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then @@ -65,7 +65,7 @@ do_archgen () { all | any | noarch) continue;; esac - echo " DEF_BUILTIN( ${each_arch} );" >> zypp/poky-arch.h + echo " DEF_BUILTIN( ${each_arch} );" | tr - _ >> zypp/poky-arch.h done echo "#endif /* DEF_BUILTIN */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h @@ -77,7 +77,7 @@ do_archgen () { all | any | noarch) continue;; esac - echo " extern const Arch Arch_${each_arch};" >> zypp/poky-arch.h + echo " extern const Arch Arch_${each_arch};" | tr - _ >> zypp/poky-arch.h done echo "#endif /* POKY_EXTERN_PROTO */" >> zypp/poky-arch.h echo "" >> zypp/poky-arch.h @@ -89,9 +89,11 @@ do_archgen () { continue;; esac if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then - echo " const Arch Arch_${each_arch} (_${each_arch});" >> zypp/poky-arch.h + echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/poky-arch.h + echo "(_${each_arch});" >> zypp/poky-arch.h else - echo " const Arch Arch_${each_arch} ( IdString ( \"${each_arch}\" ) );" >> zypp/poky-arch.h + echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/poky-arch.h + echo "( IdString ( \"${each_arch}\" ) );" >> zypp/poky-arch.h fi done echo "#endif /* POKY_PROTO */" >> zypp/poky-arch.h |