<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3817</bug_id>
          
          <creation_ts>2013-01-31 12:00:11 +0000</creation_ts>
          <short_desc>dpkg-native:fix dpkg-scanpackages error at deb image creation time on Fedora 17</short_desc>
          <delta_ts>2013-02-06 04:05:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liang.li2</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29395</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-01-31 12:00:11 +0000</bug_when>
    <thetext>*problem
1. On Fedora 17, download poky source and prepare a completely new build environment

2. Add the follow config option to a conf file:
    PACKAGE_CLASSES = &quot;package_deb&quot;

3. Run `bitbake dpkg-native&apos;

4. Run `bitbake core-image-sato&apos; and do_rootfs failed, the following is the error log:
| Can&apos;t locate Dpkg.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share
/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/
share/perl5 .) at /buildarea2/hongxujia/build-20130130-deb/tmp/sysroots/i686-linux/
usr/bin/dpkg-scanpackages line 27.
| BEGIN failed--compilation aborted at /buildarea2/hongxujia/build-20130130-deb/tmp/
sysroots/i686-linux/usr/bin/dpkg-scanpackages line 27.

*analysis
1. The dpkg-scanpackages is invoked at deb image creation time and it is built
by dpkg-native. The dpkg-scanpackages is a perl script and import module `Dpkg&apos;.

2. The Dpkg.pm has been installed in perl&apos;s staging dir at dpkg-native building
time. Such as `tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/Dpkg.pm&apos;

3. The dpkg-native uses create_wrapper to relocate to perl-native if perl-native
has been built. If perl-native isn&apos;t built, it will use the host Dpkg as default.

4. If dpkg-native is built on a new build envionment which means perl-native doesn&apos;t
exist before, and the build system doesn&apos;t install dpkg (such as Fedora 17), the 
dpkg-scanpackages could not work correctly.

*solution
Modify dpkg-native&apos;s depends, change `perl-native-runtime&apos; to `perl-native&apos;, Let
perl-native automatically be built before building dpkg-native.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29396</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-01-31 12:02:29 +0000</bug_when>
    <thetext>Log data follows:
| DEBUG: Executing shell function do_rootfs
| Can&apos;t locate Dpkg.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| BEGIN failed--compilation aborted at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| Can&apos;t locate Dpkg.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| BEGIN failed--compilation aborted at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| Can&apos;t locate Dpkg.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| BEGIN failed--compilation aborted at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| Can&apos;t locate Dpkg.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| BEGIN failed--compilation aborted at /buildarea2/hongxujia/build-20130130-ipk/tmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages line 27.
| Ign file: ./ Release.gpg
| Ign file: ./ Release.gpg
| Ign file: ./ Release.gpg
| Get:1 file: ./ Release [15B]
| Ign file: ./ Packages
| Get:2 file: ./ Release [12B]
| Ign file: ./ Packages
| Get:3 file: ./ Release [11B]
| Ign file: ./ Packages
| Reading package lists...
| Reading package lists...
| Building dependency tree...
| E: Couldn&apos;t find package glibc-localedata-i18n
| ERROR: Function failed: do_rootfs (see /buildarea2/hongxujia/build-20130130-ipk/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.9166 for further information)
ERROR: Task 7 (/buildarea2/hongxujia/poky/meta/recipes-sato/images/core-image-sato.bb, do_rootfs) failed with exit code &apos;1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29479</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-02-02 02:13:12 +0000</bug_when>
    <thetext>Merged into master

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=19ac10a86d1d35aa76cf3c97254e14c5c8de7221</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29551</commentid>
    <comment_count>3</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2013-02-06 04:05:27 +0000</bug_when>
    <thetext>no error when run following commands with git master branch commit 7e9cb437b1b720e656f4a33f73c07c5dc7356a2c when set &quot;PACKAGE_CLASSES = &quot;package_deb&quot; in file &quot;local.conf&quot; on fedora 17 64bit host:
bitbake dpkg-native;bitbake core-image-sato</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>