<?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>11442</bug_id>
          
          <creation_ts>2017-05-03 09:12:31 +0000</creation_ts>
          <short_desc>svn AUTOREV recipe parse time explosion</short_desc>
          <delta_ts>2021-04-08 15:26:53 +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>BitBake</product>
          <component>bitbake</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Niko Mauno">niko.mauno</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>72990</commentid>
    <comment_count>0</comment_count>
    <who name="Niko Mauno">niko.mauno</who>
    <bug_when>2017-05-03 09:12:31 +0000</bug_when>
    <thetext>While testing/deploying Yocto 2.3_M3 (Pyro) I noticed that bitbake initial parse phase duration is significantly longer than in yocto-2.2.1 (Morty). I pinpointed the problem to a company-specific recipe which has:

SRC_URI = &quot;svn://remote-subversion-server.company.com/foo;module=bar;\
protocol=https;trustcert=true&quot;
SRCREV = &quot;${AUTOREV}&quot;

As a difference between yocto-2.2.1 and 2.3_M3, the latter seems to suffer from nearly 30 redundant hits to &apos;except KeyError:&apos; in bitbake/lib/bb/fetch2/__init__.py (each of which leads to a new &quot;svn --non-interactive --trust-server-cert log --limit 1 --no-auth-cache https://remote-subversion-server.company.com/foo/bar/&quot; call under bitbake hood).

Since each such &apos;svn log --limit 1&apos; call takes (in this particular case) around 1.6 seconds to complete, this introduces an additional ~45..47 seconds initial parsing delay every time bitbake command is issued.

Eg. while in yocto-2.2.1 a sample &apos;bitbake -c listtasks myrecipe&apos; command takes about 7 or 8 seconds to complete, in 2.3_M3 the same command takes almost 55 seconds. If the &quot;${AUTOREV}&quot; is replaced with a static revision value, then in both yocto-2.2.1 and 2.3_M3 the sample command takes in both cases about 6.5 seconds -- thus to me this would strongly seem like a regression with recipes making use of svn/AUTOREV combination.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73189</commentid>
    <comment_count>1</comment_count>
    <who name="Niko Mauno">niko.mauno</who>
    <bug_when>2017-05-11 14:40:57 +0000</bug_when>
    <thetext>As a related observation in 2.3_M3, svn+AUTOREV recipes prevent bitbake parsing without &apos;svn&apos; in HOSTTOOLS. Failure looks like:

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression
was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher
failure: Fetch command ... failed with exit code 127, output:
/usr/bin/env: svn: No such file or directory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83460</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-04-05 11:22:47 +0000</bug_when>
    <thetext>Another report of this on IRC so people are still using subversion.

The problem is that we don&apos;t use host svn but build our own.  AUTOREV has to be expanded at parse time though which is before we&apos;ve built svn.

Thus, the work around is to install subversion on the host and add svn to HOSTTOOLS so that binary is available at parse time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89907</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-04-08 15:26:53 +0000</bug_when>
    <thetext>Fewer and fewer people are using subversion.
The subversion + autorev time isn&apos;t something that we can do anything about and it isnt&apos; an advised workflow. There is a cache policy in bitbake that would prevent hitting the network as much BB_SRCREV_POLICY is the variable.


If you&apos;re going to use subversion, then as people have pointed out you are well advised to install it on the host.

If there are still subversion users and this is a problem, please send a patch to deal with the issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>