-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unecessary re-download of repo when not using metalink #601
Fix unecessary re-download of repo when not using metalink #601
Conversation
@sourcejedi master branch pass the test suite. Can you rebase it on top of master and we'll see? |
return True | ||
|
||
def _try_revive(self): | ||
"""Use metalink to check whether our metadata are still current.""" | ||
if not self.metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this as it is something what you fixed ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No? It's ok if self.metalink is None, but if metadata is None, then there is nothing for us to verify in the first place :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh oh, I need new eyes ;)
d7686ab
to
b95bd7c
Compare
Rebased, thanks for the quick response :). The Jenkins build says it finished successfully. I'm not sure what's happened to make GitHub still show pending checks. |
@sourcejedi there is flow of jobs. Link points to |
Thanks, all becomes clear now. Looks like I'm supposed to develop on a Rawhide system (at least if I want to follow the Let's see if I can set up an environment with |
1: ======================================================================
1: ERROR: test_reviving_baseurl (tests.test_repo.LocalRepoTest)
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1191, in patched
1: arg = patching.__enter__()
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1266, in __enter__
1: original, local = self.get_original()
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1240, in get_original
1: "%s does not have the attribute %r" % (target, name)
1: AttributeError: <class 'dnf.repo.Metadata'> does not have the attribute u'reset_age'
1:
1: ======================================================================
1: ERROR: test_reviving_baseurl_404 (tests.test_repo.LocalRepoTest)
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1199, in patched
1: return func(*args, **keywargs)
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/test_repo.py", line 446, in test_reviving_baseurl_404
1: self.repo.md_expire_cache()
1: AttributeError: 'Repo' object has no attribute 'md_expire_cache'
1:
1: ======================================================================
1: ERROR: test_reviving_baseurl_mismatched (tests.test_repo.LocalRepoTest)
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1191, in patched
1: arg = patching.__enter__()
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1266, in __enter__
1: original, local = self.get_original()
1: File "/builddir/build/BUILD/dnf-2.0.0-0.392gaa2c8a0/tests/mock.py", line 1240, in get_original
1: "%s does not have the attribute %r" % (target, name)
1: AttributeError: <class 'dnf.repo.Metadata'> does not have the attribute u'reset_age'
1:
1: ----------------------------------------------------------------------
1: Ran 557 tests in 6.194s
1:
1: FAILED (errors=3) |
Sorry, yeah, I found that. I'm shaving some yaks on my way to a rawhide chroot, so I should actually be able to run the tests. I probably found all the updated field names already, but I don't want to spam the build server in case there's a few I missed |
@sourcejedi btw, you will need latest |
b95bd7c
to
484bc66
Compare
Thanks for that. This update should pass, apart from the test that also fails in master |
@sourcejedi there are no tests which are failing in master now. I think it's just not supposed to run on real system. |
https://bugzilla.redhat.com/show_bug.cgi?id=1373992 * Passes existing tests * Tested `dnf --refresh check-update` now avoids re-downloading repos specified using baseurl (e.g. for mirror on local network). * Includes new test cases. The test for a new repomd.xml just uses an empty file... there doesn't seem much point writing a whole fake one.
484bc66
to
170aacc
Compare
@dnf-bot r+ |
📌 Commit 170aacc has been approved by |
☀️ Test successful - status-jenkins |
https://bugzilla.redhat.com/show_bug.cgi?id=1373992
dnf --refresh check-update
: it now avoids re-downloadingrepos specified using baseurl (e.g. a mirror on the local network).
This is based on dnf-1.1.8-1. The master branch doesn't seem to pass the test suite at the moment. Is that expected?