validate_pkg uses now-removed action.get_variants()
pkg-gate removed action.get_variants() in their rev 2091,
validate_pkg, in ON, makes use of it. It needs to cease doing so (preferably in a way compatible with both old and new pkg bits).
Updated by Rich Lowe over 10 years ago
- Status changed from New to In Progress
- Assignee set to Rich Lowe
Something akin to:
@@ -631,11 +631,20 @@ continue # - # As with the manifest itself, if an action has specified + # As with the manifest itself, if an action has specified # variant.arch, we look for the target architecture # therein. # - var = action.get_variants() + var = None + + # + # The name of this method changed in pkg(5) build 150, we need to + # work with both sets. + # + if hasattr(action, 'get_variants'): + var = action.get_variants() + else: + var = action.get_variant_template() if "variant.arch" in var and arch not in var["variant.arch"]: return
Should deal with this issue, and work with pkg both before and after pkg build 150.