<?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>9755</bug_id>
          
          <creation_ts>2016-06-10 07:13:03 +0000</creation_ts>
          <short_desc>buildhistory-diff contains loads of PKGR spam when used with PRSERV</short_desc>
          <delta_ts>2016-07-29 15:59:35 +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>Scripts and Tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="David Rodriguez">david.israelx.rodriguez.castellanos</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62889</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-06-10 07:13:03 +0000</bug_when>
    <thetext>When using PR service the buildhistory-diff output contains a lot of PKGR changes: In practice the mass of PKGR updates hide other important changes as they often account for 80% of all changes.


I realise PKGR changes are sometimes important but at least for my work the negatives outweigh the positives. I could use &quot;grep -v PKGR&quot; but this often hides the package name:
  packages/core2-64-poky-linux/at-spi2-core/at-spi2-core-locale-ug: PKGR changed from r0.5 to r0.4
    * PV changed from &quot;2.18.3&quot; to &quot;2.20.2&quot;
In this case I would not know which package got a PV change if I used grep.


I propose PKGR should be hidden unless &quot;--report-all&quot; is used (or alternatively a new flag is added to hide PKGR changes).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62892</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-06-10 07:53:16 +0000</bug_when>
    <thetext>It&apos;s easy to identify PR service changes as they&apos;re all of the form rX.N -&gt; rX.N+1, so these could be filtered out globally.  A change from r1 to r2 is something that should be in the diff as that&apos;s done by the recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63060</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-06-16 16:44:23 +0000</bug_when>
    <thetext>Ed wanted a bit more clarification so here we go.

Usually a PR (package revision) is of the form &quot;r0&quot;, &quot;r1&quot;, &quot;r3&quot; and so on, with r0 the default.  Historically when a recipe was edited the PR would be bumped from r0 to r1 to r2.

Now that we&apos;ve said that there are two classes of users: those that care about PRs as they have package feeds and those that don&apos;t care.  The former *really* care so the PR service was created for them, this ensure that *every* rebuild of a recipe causes the PR to increase.  The latter don&apos;t care at all and the PR doesn&apos;t need to change.

The PR service simply adds a &quot;.n&quot; suffix to the existing PR, so if a recipe says PR=r2 then the first build becomes r2.0, then r2.1, r2.2 and so on.  These PR bumps are meaningless as they&apos;re simply markers of a build happening.

Thus, buildhistory-diff should filter out PR changes which are simply of the form rN.X -&gt; rN.X+1, such as r1.1 to r1.2.  Changes such as r1 to r2 should still be displayed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63067</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-06-16 17:00:37 +0000</bug_when>
    <thetext>Thank you for the explanations!

Should filtering out be a default or should I add new flag?
I&apos;d say it&apos;s safer to add new flag than change default behavior.

Any suggestions on option name?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63080</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-06-16 21:48:19 +0000</bug_when>
    <thetext>I&apos;d be happy with PR service bumps filtered out always, but add an option if you prefer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63667</commentid>
    <comment_count>5</comment_count>
      <attachid>3270</attachid>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-07-06 12:20:35 +0000</bug_when>
    <thetext>Created attachment 3270
fix

Jussi, can you check if this patch works for you?

It strips only 0.1 increments and decrements as Ross suggested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63702</commentid>
    <comment_count>6</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-07-07 07:56:30 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Created attachment 3270 [details]
&gt; fix
&gt; 
&gt; Jussi, can you check if this patch works for you?
&gt; 
&gt; It strips only 0.1 increments and decrements as Ross suggested.

This failed with

Traceback (most recent call last):
  File &quot;/home/jku/src/poky/scripts/buildhistory-diff&quot;, line 100, in &lt;module&gt;
    main()
  File &quot;/home/jku/src/poky/scripts/buildhistory-diff&quot;, line 84, in main
    changes = oe.buildhistory_analysis.process_changes(options.buildhistory_dir, fromrev, torev, options.report_all, options.report_ver)
  File &quot;/home/jku/src/poky/meta/lib/oe/buildhistory_analysis.py&quot;, line 392, in process_changes
    changes.extend(compare_dict_blobs(path, d.a_blob, d.b_blob, report_all, report_ver))
  File &quot;/home/jku/src/poky/meta/lib/oe/buildhistory_analysis.py&quot;, line 372, in compare_dict_blobs
    if abs(float(vera) - float(verb)) == 0.1:
ValueError: could not convert string to float: &apos;2.1.11&apos;


when processing &quot;packages/all-poky-linux/encodings/encodings-dbg&quot;. The encodings recipe has this curious thing in it:
    PR = &quot;${INC_PR}.1&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63704</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-07 08:16:43 +0000</bug_when>
    <thetext>&quot;    if abs(float(vera) - float(verb)) == 0.1:&quot;

Don&apos;t expect that versions are going to be floats, and also float arithmetic like that just doesn&apos;t work: float(0.2)-float(0.1) could easily equal 0.10000000001.

You&apos;ll have to split the version on dots and see if all the parts match expect the final fragment where one is an int and the other is the same int +1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63710</commentid>
    <comment_count>8</comment_count>
      <attachid>3273</attachid>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-07-07 09:28:51 +0000</bug_when>
    <thetext>Created attachment 3273
fix v2

Fair enough :)
How about this one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63757</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-07-08 14:49:19 +0000</bug_when>
    <thetext>sent for review to the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2016-July/123654.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64264</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-07-21 14:53:51 +0000</bug_when>
    <thetext>implementation has been merged into oe-core master.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3270</attachid>
            <date>2016-07-06 12:20:35 +0000</date>
            <delta_ts>2016-07-07 09:28:51 +0000</delta_ts>
            <desc>fix</desc>
            <filename>file_9755.txt</filename>
            <type>text/plain</type>
            <size>797</size>
            <attacher name="Ed Bartosh">eduard.bartosh</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL21ldGEvbGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weSBiL21ldGEv
bGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weQ0KaW5kZXggNDM1MzM4MS4uOTY1ZTAwNSAx
MDA2NDQNCi0tLSBhL21ldGEvbGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weQ0KKysrIGIv
bWV0YS9saWIvb2UvYnVpbGRoaXN0b3J5X2FuYWx5c2lzLnB5DQpAQCAtMzU5LDYgKzM1OSwxMyBA
QCBkZWYgY29tcGFyZV9kaWN0X2Jsb2JzKHBhdGgsIGFibG9iLCBiYmxvYiwgcmVwb3J0X2FsbCwg
cmVwb3J0X3Zlcik6DQogICAgICAgICAgICAgICAgIGlmICcgJy5qb2luKGFsaXN0KSA9PSAnICcu
am9pbihibGlzdCk6DQogICAgICAgICAgICAgICAgICAgICBjb250aW51ZQ0KIA0KKyAgICAgICAg
ICAgIGlmIGtleSA9PSAnUEtHUicgYW5kIG5vdCByZXBvcnRfYWxsOg0KKyAgICAgICAgICAgICAg
ICAjIHNraXAgaW5jcmVtZW50YWwgUEtHUiByZWNvcmRzDQorICAgICAgICAgICAgICAgIHZlcmEg
PSBhc3RyLnNwbGl0KClbMF1bMTpdDQorICAgICAgICAgICAgICAgIHZlcmIgPSBic3RyLnNwbGl0
KClbMF1bMTpdDQorICAgICAgICAgICAgICAgIGlmIGFicyhmbG9hdCh2ZXJhKSAtIGZsb2F0KHZl
cmIpKSA9PSAwLjE6DQorICAgICAgICAgICAgICAgICAgICBjb250aW51ZQ0KKw0KICAgICAgICAg
ICAgIGNoZyA9IENoYW5nZVJlY29yZChwYXRoLCBrZXksIGFzdHIsIGJzdHIsIG1vbml0b3JlZCkN
CiAgICAgICAgICAgICBjaGFuZ2VzLmFwcGVuZChjaGcpDQogICAgIHJldHVybiBjaGFuZ2VzDQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3273</attachid>
            <date>2016-07-07 09:28:51 +0000</date>
            <delta_ts>2016-07-07 09:28:51 +0000</delta_ts>
            <desc>fix v2</desc>
            <filename>file_9755.txt</filename>
            <type>text/plain</type>
            <size>1172</size>
            <attacher name="Ed Bartosh">eduard.bartosh</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL21ldGEvbGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weSBiL21ldGEv
bGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weQ0KaW5kZXggNDM1MzM4MS4uYjZjMDI2NSAx
MDA2NDQNCi0tLSBhL21ldGEvbGliL29lL2J1aWxkaGlzdG9yeV9hbmFseXNpcy5weQ0KKysrIGIv
bWV0YS9saWIvb2UvYnVpbGRoaXN0b3J5X2FuYWx5c2lzLnB5DQpAQCAtMzU5LDYgKzM1OSwyNCBA
QCBkZWYgY29tcGFyZV9kaWN0X2Jsb2JzKHBhdGgsIGFibG9iLCBiYmxvYiwgcmVwb3J0X2FsbCwg
cmVwb3J0X3Zlcik6DQogICAgICAgICAgICAgICAgIGlmICcgJy5qb2luKGFsaXN0KSA9PSAnICcu
am9pbihibGlzdCk6DQogICAgICAgICAgICAgICAgICAgICBjb250aW51ZQ0KIA0KKyAgICAgICAg
ICAgIGlmIGtleSA9PSAnUEtHUicgYW5kIG5vdCByZXBvcnRfYWxsOg0KKyAgICAgICAgICAgICAg
ICB2ZXJzID0gW10NCisgICAgICAgICAgICAgICAgIyBzdHJpcCBsZWFkaW5nICdyJyBhbmQgZG90
cw0KKyAgICAgICAgICAgICAgICBmb3IgdmVyIGluIChhc3RyLnNwbGl0KClbMF0sIGJzdHIuc3Bs
aXQoKVswXSk6DQorICAgICAgICAgICAgICAgICAgICBpZiB2ZXIuc3RhcnRzd2l0aCgncicpOg0K
KyAgICAgICAgICAgICAgICAgICAgICAgIHZlciA9IHZlclsxOl0NCisgICAgICAgICAgICAgICAg
ICAgIHZlcnMuYXBwZW5kKHZlci5yZXBsYWNlKCcuJywgJycpKQ0KKyAgICAgICAgICAgICAgICBt
YXhsZW4gPSBtYXgobGVuKHZlcnNbMF0pLCBsZW4odmVyc1sxXSkpDQorICAgICAgICAgICAgICAg
IHRyeToNCisgICAgICAgICAgICAgICAgICAgICMgcGFkIHdpdGggJzAnIGFuZCBjb252ZXJ0IHRv
IGludA0KKyAgICAgICAgICAgICAgICAgICAgdmVycyA9IFtpbnQodmVyLmxqdXN0KG1heGxlbiwg
JzAnKSkgZm9yIHZlciBpbiB2ZXJzXQ0KKyAgICAgICAgICAgICAgICBleGNlcHQgVmFsdWVFcnJv
cjoNCisgICAgICAgICAgICAgICAgICAgIHBhc3MNCisgICAgICAgICAgICAgICAgZWxzZToNCisg
ICAgICAgICAgICAgICAgICAgICAjIHNraXAgZGVjcmVtZW50cyBhbmQgaW5jcmVtZW50cw0KKyAg
ICAgICAgICAgICAgICAgICAgaWYgYWJzKHZlcnNbMF0gLSB2ZXJzWzFdKSA9PSAxOg0KKyAgICAg
ICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlDQorDQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>