<?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>13038</bug_id>
          
          <creation_ts>2018-11-22 07:12:45 +0000</creation_ts>
          <short_desc>[2.4.4RC1][Package Management][Getting Error Message &quot;Failed to synchronize cache for repo &apos;repository&apos;&quot;]</short_desc>
          <delta_ts>2018-11-29 04:05:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>Package Management Issues</product>
          <component>package-management-issues</component>
          <version>2.4.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="pankaj yadav">pankaj-y</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</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>82289</commentid>
    <comment_count>0</comment_count>
    <who name="pankaj yadav">pankaj-y</who>
    <bug_when>2018-11-22 07:12:45 +0000</bug_when>
    <thetext>Steps to reproduce :
Step 1: Bitbake a core-image-minimal image with the current release of Yocto Project (rocko in this case), make sure the following variables are set in build/conf/local.conf.
PACKAGE_CLASSES = &quot;package_rpm&quot;
IMAGE_INSTALL_append = &quot;dnf openssh&quot;
MACHINE = &quot;qemux86-64&quot;
EXTRA_IMAGE_FEATURES = &quot;debug-tweaks package-management&quot;
Step 2: runqemu with the resulting image, make sure the tap device shows an ip. ssh from your laptop to the target.
Step 3: Setup your server so that it can service the packages to the target.
$ cd (TMPDIR)/deploy/rpm
python -m SimpleHTTPServer
Step 4: Configure the repositories on the target system by:
[For Rocko release] On target system, edit /etc/dnf/dnf.conf:
[main]
gpgcheck=0
[repository]
name=myrepo
baseurl=http://192.168.7.1:8000
enabled=1
installonly_limit=3
clean_requirements_on_remove=True
Step 5: fetch the repository on target:
$ dnf makecache

Please find result of step 5 :
root@qemux86-64:~# dnf makecache
Failed to synchronize cache for repo &apos;repository&apos;, disabling.
Metadata cache created.
root@qemux86-64:~#

Regression : 
Issue is reproducible with 2.4.3RC2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82295</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-22 13:22:30 +0000</bug_when>
    <thetext>Did you run bitbake package-index?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82302</commentid>
    <comment_count>2</comment_count>
    <who name="pankaj yadav">pankaj-y</who>
    <bug_when>2018-11-23 01:40:48 +0000</bug_when>
    <thetext>I have run bitbake package-index in step 8 as mentioned below :
Step 6: bitbake minicom on host.
Step 7: bitbake core-image-minimal 
Step 8: bitbake package-index
Step 9: Restart the SimpleHTTPServer
Step 10: fetch the repository and generate the update on target system.
$ dnf makecache
$ dnf update
$ dnf install minicom</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82304</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-11-23 11:42:37 +0000</bug_when>
    <thetext>You need to run &quot;bitbake package-index&quot; before running the makecache command on target so this error isn&apos;t surprising.

Also, isn&apos;t this test automated? I&apos;m not sure why we&apos;d need to manually test this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82306</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-23 12:04:51 +0000</bug_when>
    <thetext>This should be automated with the selftest runtime_test.test_testimage_dnf.  Latest master run:

2018-11-22 00:24:35,992 - oe-selftest - INFO - RESULTS - runtime_test.TestImage.test_testimage_dnf - Testcase 1883: PASSED (539.97s)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82349</commentid>
    <comment_count>5</comment_count>
    <who name="pankaj yadav">pankaj-y</who>
    <bug_when>2018-11-29 04:05:45 +0000</bug_when>
    <thetext>Running &quot;bitbake package-index&quot; before running the &quot;dnf makecache&quot; command on target, resolves this error.
Hence closing this ticket.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>