summaryrefslogtreecommitdiff
path: root/baserockimport/lorryset.py
diff options
context:
space:
mode:
Diffstat (limited to 'baserockimport/lorryset.py')
-rw-r--r--baserockimport/lorryset.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/baserockimport/lorryset.py b/baserockimport/lorryset.py
index 8cc73af..f252b9f 100644
--- a/baserockimport/lorryset.py
+++ b/baserockimport/lorryset.py
@@ -107,7 +107,7 @@ class LorrySet(object):
'''Return the lorry entry for the named project.'''
return {name: self.data[name]}
- def find_lorry_for_package(self, kind, package_name):
+ def find_lorry_for_package(self, kind, package_name, comp):
'''Find the lorry entry for a given foreign package, or return None.
This makes use of an extension to the .lorry format made by the
@@ -116,11 +116,12 @@ class LorrySet(object):
named $KIND.
'''
+
key = 'x-products-%s' % kind
for name, lorry in self.data.iteritems():
products = lorry.get(key, [])
for entry in products:
- if entry == package_name:
+ if comp(entry, package_name):
return {name: lorry}
return None