Project

General

Profile

Bug #346

validate_pkg uses now-removed action.get_variants()

Added by Rich Lowe about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2010-10-13
Due date:
% Done:

0%

Estimated time:
Difficulty:
Tags:

Description

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).

History

#1

Updated by Rich Lowe about 9 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.
#2

Updated by Rich Lowe almost 9 years ago

  • Status changed from In Progress to Resolved

Resolved in r13219 commit:233eeb988b49

Also available in: Atom PDF