gather: Don't resolve dependencies in lookaside
When looking at a package in a lookaside repo, it does not make much sense to process its dependencies. We should just assume that the lookaside can satisfy them. In the worst case, this could result in packages being pulled into the compose just so that they could satisfy a dep of something in lookaside. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
68351fa5a8
commit
3130d837c0
@ -606,6 +606,9 @@ class Pungi(PungiBase):
|
||||
"""Add the dependencies for a given package to the
|
||||
transaction info"""
|
||||
added = set()
|
||||
if po.repoid in self.lookaside_repos:
|
||||
# Don't resolve deps for stuff in lookaside.
|
||||
return added
|
||||
if po in self.completed_depsolve:
|
||||
return added
|
||||
self.completed_depsolve.add(po)
|
||||
@ -1111,6 +1114,9 @@ class Pungi(PungiBase):
|
||||
|
||||
added = set()
|
||||
for srpm_po in srpms:
|
||||
if srpm_po.repoid in self.lookaside_repos:
|
||||
# Don't run fulltree on packages in lookaside
|
||||
continue
|
||||
include_native = False
|
||||
include_multilib = False
|
||||
has_native = False
|
||||
|
@ -289,6 +289,10 @@ class Gather(GatherBase):
|
||||
assert pkg is not None
|
||||
result = set()
|
||||
|
||||
if pkg.repoid in self.opts.lookaside_repos:
|
||||
# Don't resolve deps for stuff in lookaside.
|
||||
return result
|
||||
|
||||
# DNF package has the _pre and _post attributes only if they are not
|
||||
# empty.
|
||||
requires = (pkg.requires +
|
||||
|
@ -617,7 +617,6 @@ class DepsolvingBase(object):
|
||||
self.assertNotIn("dummy-krb5-1.10-5.src.rpm", pkg_map["srpm"])
|
||||
|
||||
self.assertItemsEqual(pkg_map["rpm"], [
|
||||
"dummy-bash-4.2.37-6.x86_64.rpm",
|
||||
"dummy-basesystem-10.0-6.noarch.rpm",
|
||||
"dummy-filesystem-4.2.37-6.x86_64.rpm",
|
||||
"Dummy-firefox-16.0.1-1.x86_64.rpm", # Important
|
||||
@ -626,7 +625,6 @@ class DepsolvingBase(object):
|
||||
"Dummy-xulrunner-16.0.1-1.x86_64.rpm",
|
||||
])
|
||||
self.assertItemsEqual(pkg_map["srpm"], [
|
||||
"dummy-bash-4.2.37-6.src.rpm",
|
||||
"dummy-basesystem-10.0-6.src.rpm",
|
||||
"dummy-filesystem-4.2.37-6.src.rpm",
|
||||
"Dummy-firefox-16.0.1-1.src.rpm",
|
||||
@ -634,7 +632,6 @@ class DepsolvingBase(object):
|
||||
"Dummy-xulrunner-16.0.1-1.src.rpm",
|
||||
])
|
||||
self.assertItemsEqual(pkg_map["debuginfo"], [
|
||||
"dummy-bash-debuginfo-4.2.37-6.x86_64.rpm",
|
||||
"Dummy-firefox-debuginfo-16.0.1-1.x86_64.rpm",
|
||||
"dummy-glibc-debuginfo-2.14-5.x86_64.rpm",
|
||||
"dummy-glibc-debuginfo-common-2.14-5.x86_64.rpm",
|
||||
@ -1713,10 +1710,8 @@ class DNFDepsolvingTestCase(DepsolvingBase, unittest.TestCase):
|
||||
|
||||
def test_firefox_selfhosting_with_krb5_lookaside(self):
|
||||
super(DNFDepsolvingTestCase, self).test_firefox_selfhosting_with_krb5_lookaside()
|
||||
self.assertFlags("dummy-krb5-1.10-5.x86_64", [PkgFlag.lookaside])
|
||||
self.assertFlags("dummy-krb5-devel-1.10-5.x86_64", [PkgFlag.lookaside])
|
||||
self.assertFlags("dummy-krb5-libs-1.10-5.x86_64", [PkgFlag.lookaside])
|
||||
self.assertFlags("dummy-krb5-1.10-5.src", [PkgFlag.lookaside, PkgFlag.self_hosting])
|
||||
self.assertFlags("dummy-krb5-1.10-5.src", [PkgFlag.lookaside])
|
||||
self.assertFlags("dummy-krb5-debuginfo-1.10-5.x86_64", [PkgFlag.lookaside])
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user