<?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>3190</bug_id>
          
          <creation_ts>2012-09-27 22:58:55 +0000</creation_ts>
          <short_desc>Refactor packaging sanity tests from package.bbclass to insane.bbclass</short_desc>
          <delta_ts>2013-09-05 07:26:52 +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>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=3307</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=4396</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.5 M2</target_milestone>
          
          <blocked>4647</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>mihai.lindner</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sen.zhang</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>25875</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-09-27 22:58:55 +0000</bug_when>
    <thetext>The sanity tests in insane.bbclass need refactoring to make it easier to extend. In particular, some packaging tests are currently ending up in package.bbclass. These should be in insane.bbclass with hooks added as appropriate.

Further, all tests should honour the settings of QA_WARN and QA_ERROR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32271</commentid>
    <comment_count>1</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-04-17 09:16:54 +0000</bug_when>
    <thetext>Postpone to 1.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33718</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-06-08 03:08:55 +0000</bug_when>
    <thetext>Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=43713b9e17707992569d807cdd61aaaf969ec6fc
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b4371dd0e41713979b59875fff8d8724761b69d1
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=829d6bf005882137aeea397fa1896285a17bee72
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5a0f74ac0418e219c6127e7906fd550a15809920</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34749</commentid>
    <comment_count>3</comment_count>
    <who name="Mihai Lindner">mihai.lindner</who>
    <bug_when>2013-07-22 10:33:26 +0000</bug_when>
    <thetext>.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36316</commentid>
    <comment_count>4</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-09-05 07:26:52 +0000</bug_when>
    <thetext>Test case:

Steps:
1. Add the following lines to a .bb file. For expample, gzip_1.6.bb:
PACKAGES += &quot;${PN}-dbg&quot;

2. Run &quot;bitbake gzip&quot;

3. Modify the meta-yocto/conf/distro/poky.conf. Move the &quot;packages-list&quot; from ERROR_QA to WARN_QA. Run &quot;bitbake gzip&quot; again.

Expected results:
In step 2, the build should failed and show the following error:
########################
ERROR: QA Issue: gzip-dbg is listed in PACKAGES multiple times, this leads to packaging errors.
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /buildarea1/yzhao1/poky/build-test/tmp/work/i586-poky-linux/gzip/1.6-r0/temp/log.do_package.28207
ERROR: Task 10 (/buildarea1/yzhao1/poky/meta/recipes-extended/gzip/gzip_1.6.bb, do_package) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 734 tasks of which 733 didn&apos;t need to be rerun and 1 failed.
No currently running tasks (498 of 738)

Summary: 1 task failed:
  /buildarea1/yzhao1/poky/meta/recipes-extended/gzip/gzip_1.6.bb, do_package
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
##########################
Check the return value of the command,should be 1.
echo $?
1

In step 3, the build can finish but will show a warning message:
####################
WARNING: QA Issue: gzip-dbg is listed in PACKAGES multiple times, this leads to packaging errors.
NOTE: Tasks Summary: Attempted 738 tasks of which 577 didn&apos;t need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
####################

Check the return value of the command,should be 0.
echo $?
0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>