<?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>13682</bug_id>
          
          <creation_ts>2019-12-05 12:45:03 +0000</creation_ts>
          <short_desc>cve-check might end up with read-only database when bitbake was interrupted with double Control-C</short_desc>
          <delta_ts>2020-04-02 06:11:24 +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>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>cve-check.bbclass</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Bunk">bunk</reporter>
          <assigned_to name="Chee Yang">chee.yang.lee</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>85723</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2019-12-05 12:45:03 +0000</bug_when>
    <thetext>Aborting a build during CVE database download with double Control-C sometimes leads to:

ERROR: nspr-native-4.23-r0 do_cve_check: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_cve_check(d)
     0003:
File: &apos;/home/bunk/yoctomaster/yocto-test/sources/poky/meta/classes/cve-check.bbclass&apos;, lineno: 56, function: do_cve_check
     0052:    &quot;&quot;&quot;
     0053:
     0054:    if os.path.exists(d.getVar(&quot;CVE_CHECK_DB_FILE&quot;)):
     0055:        patched_cves = get_patches_cves(d)
 *** 0056:        patched, unpatched = check_cves(d, patched_cves)
     0057:        if patched or unpatched:
     0058:            cve_data = get_cve_info(d, patched + unpatched)
     0059:            cve_write_data(d, patched, unpatched, cve_data)
     0060:    else:
File: &apos;/home/bunk/yoctomaster/yocto-test/sources/poky/meta/classes/cve-check.bbclass&apos;, lineno: 200, function: check_cves
     0196:        else:
     0197:            vendor = &quot;%&quot;
     0198:
     0199:        # Find all relevant CVE IDs.
 *** 0200:        for cverow in conn.execute(&quot;SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?&quot;, (product, vendor)):
     0201:            cve = cverow[0]
     0202:
     0203:            if cve in cve_whitelist:
     0204:                bb.note(&quot;%s-%s has been whitelisted for %s&quot; % (product, pv, cve))
Exception: sqlite3.OperationalError: attempt to write a readonly database


It would be good if old files were removed first since they might be in a partially updated state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86860</commentid>
    <comment_count>1</comment_count>
    <who name="Chee Yang">chee.yang.lee</who>
    <bug_when>2020-03-30 02:31:50 +0000</bug_when>
    <thetext>this should fix the problem 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5cd9d19813d8cbe2e74d4fdbd424b6a15ca828c8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>