Red Hat Bugzilla – Bug 1295219
UX: AssertionError: Can not load repo.
Last modified: 2016-12-20 12:34:36 EST
Description of problem:
I've created local mirrors as I did with yum.
...but using dnf reposync and createrepo_c
dnf reposync --config=/tmp/$repoName.repo --repoid=$repoName --download-path=/u2/Repositories/$ARCH/
createrepo_c -pd --compatibility --workers=8 -g /usr/share/revisor/comps/$repoName-comps.xml /u2/Repositories/$ARCH/$repoName
Version-Release number of selected component (if applicable):
When trying to connect to the local mirrors I get this on the fedora-everything and fedora-updates repos only:
dnf makecache -v
Loaded plugins: noroot, reposync, langpacks, builddep, config-manager, playground, repograph, debuginfo-install, generate_completion_cache, repoclosure, download, needs-restarting, copr, Query, repomanage, protected_packages, system-upgrade
langpacks: No languages are enabled
Adding en_US.UTF-8 to language list
initialized Langpacks plugin
DNF version: 1.1.5
Making cache files for all metadata files.
google-chrome: will expire after 169430 seconds.
cf-config-generic: will expire after 170796 seconds.
cf-software-proprietary-generic: will expire after 170836 seconds.
cf-crossover-bottles-free: will expire after 170957 seconds.
updates: will expire after 161069 seconds.
rpmfusion-nonfree-updates: will expire after 168796 seconds.
negativo17-nvidia: will expire after 172371 seconds.
opensource-generic: will expire after 170796 seconds.
cf-software-proprietary-games: will expire after 170837 seconds.
rpmfusion-free-updates: will expire after 169241 seconds.
adobe-linux: will expire after 169241 seconds.
virtualbox: will expire after 169430 seconds.
fedora: has expired and will be refreshed.
google-earth: will expire after 168796 seconds.
negativo17-HandBrake: will expire after 169249 seconds.
google-talkplugin: will expire after 168796 seconds.
cf-classic-games: will expire after 170957 seconds.
cf-software-opensource: will expire after 170957 seconds.
cf-config-releases: will expire after 170676 seconds.
cf-crossover-bottles-nonfree: will expire after 170836 seconds.
negativo17-steam: will expire after 170796 seconds.
rpmfusion-nonfree: will expire after 169241 seconds.
google: will expire after 169240 seconds.
rpmfusion-free: will expire after 169249 seconds.
repo: using cache for: google-chrome
not found deltainfo for: google-chrome
not found updateinfo for: google-chrome
repo: using cache for: cf-config-generic
not found deltainfo for: CF Generic Configuration/Setup Scripts - 23 - x86_64
not found updateinfo for: CF Generic Configuration/Setup Scripts - 23 - x86_64
repo: using cache for: cf-software-proprietary-generic
not found deltainfo for: Proprietary Software (before using you need to agree to any licenses required)
not found updateinfo for: Proprietary Software (before using you need to agree to any licenses required)
repo: using cache for: cf-crossover-bottles-free
not found deltainfo for: CF Crossover Free Bottles (Software which doesn't require a license)
not found updateinfo for: CF Crossover Free Bottles (Software which doesn't require a license)
repo: using cache for: updates
not found deltainfo for: Fedora 23 - x86_64 - Updates
Traceback (most recent call last):
File "/usr/bin/dnf", line 57, in <module>
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
errcode = main(args)
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
return _main(base, args)
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
File "/usr/lib/python3.4/site-packages/dnf/cli/commands/makecache.py", line 87, in run
self.base.fill_sack() # performs the md sync
File "/usr/lib/python3.4/site-packages/dnf/base.py", line 256, in fill_sack
File "/usr/lib/python3.4/site-packages/dnf/base.py", line 134, in _add_repo_to_sack
AssertionError: Can not load repo.
Realize that the above is probably not a bug with dnf but something I'm missing on my side. However can't seems to figure out what's triggering the "Can not load repo" error... and would be good if there was a way of getting more detail.
The repodata seems to be invalid. With just `createrepo_c` without additional flags works fine. Does yum loads it?
Here's the status so far.
ran: strace -e access,open dnf makecache -v
This was allowing me to guess at what files it was having issues with. Would be nice if dnf could report more about why it can't load the repo. Would make troubleshooting a little easier.
Building with createrepo (yum) on fedora 21...yum worked find, dnf failed. So I revised my upgrade plans and upgraded the server where the repo mirror sits to fedora 23.
Now with createrepo_c was getting same results yum worked dnf worked some times... then stopped all together.
Then found that dnf reposync deletes rpms after downloading them... so the mirrors were all screwed up. (which turns out dnf wasn't using the keepcache from any of the config files... ended up having to add --setopt keepcache=1 to the command line)
Also found if createrepo_c crashes/stops... it can leave the repo in a weird way. Just noticed this .repodata exists message in my logs.
"Temporary repodata directory /u2/Repositories/x86_64/f23-everything/.repodata/ already exists! (Another createrepo process is running?)"
which seems to have deleted the repodata directory at some point.
Now I'm hitting this:
# /usr/bin/createrepo_c /u2/Repositories/x86_64/f23-everything
Directory walk started
Directory walk done - 46074 packages
Temporary output repo path: /u2/Repositories/x86_64/f23-everything/.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Segmentation fault (core dumped)
still working on this... got createrepo_c to create the repos no problem but still have one failing.
As I said would be nice to know why "Can not load repo".
*** Bug 1298495 has been marked as a duplicate of this bug. ***
In my case managed to track down the problem to this updateinfo file. I temporarily changed the load_updateinfo=True to load_updateinfo=False and things started to work.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
It should print better output message. What was wrong, which metadata file is broken, etc.
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
It works in our testing instance without updateinfo data. Probably there's the issue is in repo generation in createrepo_c (-pd, --compatibility)
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.