<?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>7037</bug_id>
          
          <creation_ts>2014-12-08 10:11:21 +0000</creation_ts>
          <short_desc>Support for perl in &quot;recipetool create&quot;</short_desc>
          <delta_ts>2026-04-23 15:02:13 +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>devtools / tool chain</component>
          <version>3.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS IMPLEMENTATION</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>Future</target_milestone>
          <dependson>6406</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          <cc>jstephan</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>stephano</cc>
    
    <cc>tim.orling</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>47412</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-12-08 10:11:21 +0000</bug_when>
    <thetext>Add support for generation of recipes for perl software in &quot;recipetool create&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68014</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2016-11-05 05:36:36 +0000</bug_when>
    <thetext>Plan is using MetaCPAN API [0] to avoid any need to touch &quot;fetcher&quot; or actually run CPAN locally.

[0] https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79148</commentid>
    <comment_count>2</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2018-01-18 16:20:37 +0000</bug_when>
    <thetext>This is a good task for incoming Yocto folks. It is also a great intro to recipe-tool / devtool. I&apos;m taking this with the hopes of delegating it to someone in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87590</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-06-25 08:07:11 +0000</bug_when>
    <thetext>Once the perldeps enhancement is in, this will be easier to do (simpler than the metacpan API plan I had previously started on).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87794</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-07-18 17:06:40 +0000</bug_when>
    <thetext>Turns out the implementation in Comment 1 is actually quite doable.

Need to use either package data or layer index (via rest API) to query what recipes are available and then create a &quot;missing&quot; list to iterate recipetool on.

Would also benefit from implementation of ptest logic (look at what is in /t folder and add to FILES_${PN}-ptest and intelligently add ptest requirements vs. what is provided in e.g. /t/lib).

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=timo/recipetool-perl-v3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89495</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-03-04 16:08:27 +0000</bug_when>
    <thetext>Rebased on top of latest tip of poky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94864</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-02-02 16:04:01 +0000</bug_when>
    <thetext>Still on the back burner simmering.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95802</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-06-22 14:57:51 +0000</bug_when>
    <thetext>Still valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96523</commentid>
    <comment_count>8</comment_count>
    <who name="Julien Stephan">jstephan</who>
    <bug_when>2023-09-20 15:14:20 +0000</bug_when>
    <thetext>Hi Tim, 
I would like to play with this, but I am not sure how to use it? 
I tried something like: devtool add https://metacpan.org/pod/Aard but the handler is never called, I get an error before that: 

Traceback (most recent call last):                                                                                 
  File &quot;/home/jstephan/upstream/yocto/poky/scripts/recipetool&quot;, line 111, in &lt;module&gt;                              
    ret = main()                                                                                                   
          ^^^^^^                                                                                                   
  File &quot;/home/jstephan/upstream/yocto/poky/scripts/recipetool&quot;, line 100, in main                                  
    ret = args.func(args)                                                                                          
          ^^^^^^^^^^^^^^^                                                                                          
  File &quot;/home/jstephan/upstream/yocto/poky/scripts/lib/recipetool/create.py&quot;, line 509, in create_recipe
    check_single_file(dirlist[0], fetchuri)
  File &quot;/home/jstephan/upstream/yocto/poky/scripts/lib/recipetool/create.py&quot;, line 915, in check_single_file
    with open(fn, &apos;r&apos;, errors=&apos;surrogateescape&apos;) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: &apos;Aard&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96524</commentid>
    <comment_count>9</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-09-20 15:49:04 +0000</bug_when>
    <thetext>It needs you to use the &quot;Download&quot; link (usually a tarball) e.g. https://cpan.metacpan.org/authors/id/M/MG/MGV/Aard-0.001.tar.gz

Like most other recipetool plugins, it needs to be pointing to the source.

However, I have not touched this code in quite some time and not sure what state it is in at the moment. The last time I worked on it I was blocked by the &quot;nested&quot; build/runtime/test dependencies in the ElasticSearch results. This made the _build_dependency_query(), _runtime_dependency_query() and _test_dependency_query() functions not useful.

It was not possible to get the &quot;inner&quot; values as far as I could see. If you have some ElasticSearch expertise, perhaps you can help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96525</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-09-20 16:00:12 +0000</bug_when>
    <thetext>Rebased on top of latest &quot;master&quot;.

https://git.yoctoproject.org/poky-contrib/log/?h=timo/recipetool-perl-v3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96526</commentid>
    <comment_count>11</comment_count>
    <who name="Julien Stephan">jstephan</who>
    <bug_when>2023-09-20 16:50:08 +0000</bug_when>
    <thetext>(In reply to Tim Orling from comment #9)
&gt; It needs you to use the &quot;Download&quot; link (usually a tarball) e.g.
&gt; https://cpan.metacpan.org/authors/id/M/MG/MGV/Aard-0.001.tar.gz
&gt; 
&gt; Like most other recipetool plugins, it needs to be pointing to the source.
&gt; 
&gt; However, I have not touched this code in quite some time and not sure what
&gt; state it is in at the moment. The last time I worked on it I was blocked by
&gt; the &quot;nested&quot; build/runtime/test dependencies in the ElasticSearch results.
&gt; This made the _build_dependency_query(), _runtime_dependency_query() and
&gt; _test_dependency_query() functions not useful.
&gt; 
&gt; It was not possible to get the &quot;inner&quot; values as far as I could see. If you
&gt; have some ElasticSearch expertise, perhaps you can help.

Oh right! thank you! 
Unfortunately I do not have ElasticSearch expertise at all :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97305</commentid>
    <comment_count>12</comment_count>
    <who name="Julien Stephan">jstephan</who>
    <bug_when>2023-11-22 16:17:50 +0000</bug_when>
    <thetext>Hi Tim, 
I would like to help on this to get it merged  :)

I recently sent a patch adding an optional callback &quot;process_url&quot; that can be implemented by plugin to handle urls. See https://lists.openembedded.org/g/openembedded-core/message/190840. I use it to handle pypi url for python packages (see https://lists.openembedded.org/g/openembedded-core/message/190841). I think it would be nice to implement it here so we can use &quot;devtool add https://metacpan.org/pod/Aard&quot;. This is not merged yet. 

I can add this if you want. 

Also, you mentioned issues with elastic search, can you explain me how I can reproduce them and see if I can help to fix it? 


Cheers
Julien</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98733</commentid>
    <comment_count>13</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2024-04-11 14:46:49 +0000</bug_when>
    <thetext>The issue is that we would like to have build/runtime/test dependencies be determined from the metacpan.org metadata. Because of how nested Elastic Search references work, we cannot query the dependencies (they are inside a nested element that is sort of like a foreign key).

I was also looking at just querying the META.json or META.yml files but those are inconsistent per CPAN package/tarball.

I might need to talk to the upstream metacpan.org devs to see if there is a non-obvious way to do the query.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105228</commentid>
    <comment_count>14</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-04-23 15:02:13 +0000</bug_when>
    <thetext>Still valid.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>