<?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>10749</bug_id>
          
          <creation_ts>2016-11-30 20:11:28 +0000</creation_ts>
          <short_desc>Add a class to update package index automatically</short_desc>
          <delta_ts>2026-03-05 16:09:46 +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>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <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>68756</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-30 20:11:28 +0000</bug_when>
    <thetext>If you have a target machine with an image on it that has package management enabled pointing to a feed served from your build machine, you can install / update packages from it as they get built. However, you currently have to remember to explicitly run bitbake package-index every time so that the index is up-to-date before you run the package manager. It would be fairly easy to write a class that used a bb.event.BuildCompleted event handler to run the same thing that package-index does at the end of every build so that the index is always up-to-date - it could even try to be smart and only do it when it needs to, e.g. check if the mtime of any files under the package feed has changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69168</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-12-15 17:01:29 +0000</bug_when>
    <thetext>I love it when &quot;fairly easy&quot; turns out to be otherwise.

BuildComplete handlers can&apos;t have dependencies, so there&apos;s no way of saying that it needs apt-native etc to execute.  We can&apos;t have the class add PACKAGEINDEXDEPS to DEPENDS as that introduces circular build dependencies.  We need the dependencies in case packages are pulled in from sstate and the native tools are not.

I&apos;m now profiling the index generation and wonder if we should have an option to run it after every do_package_*...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69169</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-12-15 17:18:19 +0000</bug_when>
    <thetext>Hm, package-index takes 10 seconds (just the generate_index_files call) after building a core-image-minimal, so that&apos;s way too heavy for every do_package.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74578</commentid>
    <comment_count>3</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-06-27 16:19:16 +0000</bug_when>
    <thetext>Is there a way to schedule this after all rpm&apos;s are done rather than for each one by looking at all the targets, maybe?  It might also be nice to be able to turn this on and off with a variable as it is very frustrating to forget to run the package-index and have the dnf install on the target fail. but if I&apos;m not maintaining a package index. it is pretty useless to run it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75120</commentid>
    <comment_count>4</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-07-18 21:25:02 +0000</bug_when>
    <thetext>Paul&apos;s idea was to have it be a last run type operation like buildhistory, which is also controlled by a local.conf setting; which seems like a good fit to me. adding paul+henry to cc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79604</commentid>
    <comment_count>5</comment_count>
    <who name="Robin Jordan">robin.l.jordan</who>
    <bug_when>2018-02-26 20:35:35 +0000</bug_when>
    <thetext>Please provide a status on this.  Will it make it into YP 2.5 M3?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79607</commentid>
    <comment_count>6</comment_count>
    <who name="Robin Jordan">robin.l.jordan</who>
    <bug_when>2018-02-26 20:41:27 +0000</bug_when>
    <thetext>Appologies...I see that it has been pushed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86142</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-01-29 16:31:58 +0000</bug_when>
    <thetext>poky-contrib:ross/index has a prototype of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86159</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-01-29 17:03:59 +0000</bug_when>
    <thetext>So it sort of works.  Need to repeat the path generalising I did for opkg to rpm so it can find the binaries it needs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86160</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-01-29 17:04:50 +0000</bug_when>
    <thetext>I lie, it actually works. \o/

Needs to not spam the console with logging from the index.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86540</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-02-21 12:06:21 +0000</bug_when>
    <thetext>Another note: the class should at least warn if PRSERV_HOST isn&apos;t set, as a feed without prserv isn&apos;t useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93208</commentid>
    <comment_count>11</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2022-04-28 15:08:53 +0000</bug_when>
    <thetext>Bruce: is this something the binary distros working group is interested in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93215</commentid>
    <comment_count>12</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2022-04-28 16:14:50 +0000</bug_when>
    <thetext>Yep, this is something that would be handy as part of a &quot;getting started&quot; guide to extending/generating the feeds.

&quot;inherit this class&quot; (or we template it), and you are off to the races with a feed.

I&apos;d think we&apos;d also want that same enable class to consider where the packages are hosted/served, so it could optionally rsync them AND make sure the on-target package manager has the details. But obviously, those are extensions / next steps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95422</commentid>
    <comment_count>13</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-21 18:45:43 +0000</bug_when>
    <thetext>Moved en masse from 4.2 to 4.3 by Randy.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>