Lines Matching refs:actions

51 import pkg.actions
52 import pkg.actions.driver as driver
81 and building lists of removal, install and update actions
99 # use during installation). This is used by the pkg.actions
388 # We only want to exclude all actions in the old image that
406 # Only allows actions in new image that cannot be dehydrated
798 # If any dependency actions are tagged with one
1393 # actions lists as we're doing checking with installed
1394 # actions earlier here.
1456 # all matching actions
1474 # build list of actions that will need to be reverted
1521 # return two lists of actions that match pattern at path
1555 # and generate actions
1586 return pkg.actions.link.LinkAction(None,
1589 return pkg.actions.directory.DirectoryAction(None,
1593 return pkg.actions.file.FileAction(None,
1934 # if FMRIs are provided and there are actions with
1936 # pass, only look for actions with overlay=true.
1956 for fmri, actions in repairs:
1962 pp.propose_repair(fmri, m, actions, [])
2054 """Generates actions of type 'atype' from the packages in the
2062 """Generates actions of type 'atype' from packages being
2071 """Generates actions of type 'atype' from packages being
2072 removed (not necessarily actions being removed)."""
2079 """Generate installed actions of type 'atype' from the package
2092 da = pkg.actions.directory.DirectoryAction
2110 """Generate installed actions of type 'atype' from the package
2112 variants and facets which should be excluded from the actions
2125 da = pkg.actions.directory.DirectoryAction
2190 """ return a set of all legacy actions in target image"""
2199 def __check_inconsistent_types(actions, oactions):
2203 ntypes = set((a[0].name for a in actions))
2211 # We have fewer types, so actions are getting removed.
2224 # This implies that the actions remove() method should
2226 if actions[0][0].name != "dir":
2227 return "fixup", actions[0]
2232 for a in actions:
2246 actions = sorted(actions, key=sort_key)
2249 all(o[1] == n[1] for o, n in zip(oactions, actions)):
2252 return "error", actions
2255 def __check_duplicate_actions(actions, oactions):
2260 # We end up with no actions or start with one or none and end
2262 if len(actions) == 0 or (len(oactions) <= len(actions) == 1):
2268 # removal of the overlaid actions (if any) to
2273 # Removing actions.
2274 if len(actions) < len(oactions):
2275 # If any of the new actions is an overlay, suppress
2278 for a in actions):
2283 # any actions.
2284 if len(actions) > 1 or \
2285 any("preserve" in a[0].attrs for a in actions):
2292 return "fixup", actions[0]
2295 # can ignore it. We have to resort to stringifying the actions
2299 actions.sort(key=lambda x: str(x[0]))
2300 if len(oactions) == len(actions) and \
2301 all(o[0] == n[0] for o, n, in zip(oactions, actions)):
2304 # For file actions, delivery of two actions to a single point is
2306 # * there are only two actions in conflict
2309 if len(actions) == 2:
2311 for act, ignored in actions:
2323 actions, ignore=["preserve"])
2328 return ("error", actions,
2332 return "error", actions
2335 def __find_inconsistent_attrs(actions, ignore=misc.EmptyI):
2344 # We iterate over all pairs of actions to see if any conflict
2345 # with the rest. If two actions are "safe" together, then we
2347 # compare the rest of the actions against just one copy of
2348 # essentially identical actions.
2351 for a1, a2 in itertools.combinations(actions, 2):
2360 # two actions, and if there are none, skip the action.
2396 def __check_inconsistent_attrs(actions, oactions):
2397 """Check whether we have non-identical actions delivering to the
2400 nproblems = ImagePlan.__find_inconsistent_attrs(actions)
2408 return "error", actions
2414 if actions[0][0].name != "dir":
2415 return "fixup", actions[0]
2418 for a in actions:
2455 # the list of related actions.
2466 def __process_conflicts(self, key, func, actions, oactions, errclass, errs):
2471 ret = func(actions, oactions)
2477 msg, actions, errclass = ret
2479 msg, actions = ret
2517 # actions.
2520 # Remove conflicting, overlaid actions
2540 # Only interested in overlaid actions.
2564 # Can't modify the p.actions tuple, so modify
2567 pval = getattr(p.actions, prop)
2574 self.__propose_fixup(actions[0], None, actions[1])
2576 errs.append(errclass(actions))
2606 """Check for duplicate actions/fmri tuples in 'tgt', which is
2610 # When checking for duplicate actions we have to account for
2611 # the fact that actions which are part of a package plan are
2612 # not stripped. But the actions we're iterating over here are
2616 # actions we're comparing against. Of course we can't just
2617 # strip the actions which are part of a package plan because
2637 act = pkg.actions.fromstr(str(act))
2653 offsets into the actions.stripped file and the number of lines
2659 The 'sf' parameter is the actions.stripped file from which we
2660 read the actual actions indicated by the offset dictionary
2664 representing the packages which we should not process actions
2695 act = pkg.actions.fromstr(actstr)
2714 """Check whether actions being added and removed are
2716 actions isn't needed.
2719 actions with that as a key. The incoming actions are actions
2723 actions with that as a key. The outgoing actions are actions
2726 The 'ns' parameter is the action namespace for the actions in
2732 actions = new[key]
2733 assert len(actions) > 0
2735 # If new actions are being installed, then we need to do
2745 entry = actions[0][0]
2748 len(actions) > 1:
2752 # outgoing actions.
2754 for act, pfmri in actions:
2764 # these two actions.
2784 # incoming actions.
2789 for act, pfmri in actions:
2815 # If actions that aren't in conflict are being removed,
2822 """Check all the newly installed actions for conflicts with
2823 existing actions."""
2825 for key, actions in six.iteritems(new):
2831 if len(actions) == 1 and len(oactions) < 2:
2840 actions, oactions,
2845 # By virtue of the above check, all actions at
2847 assert(len(set(a[0].name for a in actions)) <= 1)
2850 # Multiple non-refcountable actions delivered to
2852 entry = actions[0][0]
2856 actions, oactions,
2862 # actions delivered to the same name must be
2867 actions, oactions,
2901 map to actions that conflict with each other."""
2912 for key, actions in six.iteritems(key_dict):
2913 if len(actions) == 1:
2915 if type_func(actions, []) is not None:
2918 if not actions[0][0].refcountable and \
2919 actions[0][0].globally_identical:
2921 actions, []) is not None:
2924 elif actions[0][0].globally_identical and \
2926 actions, []) is not None:
2940 """Find all instances of conflicting actions.
2942 There are three categories of conflicting actions. The first
2945 of this is the set of filesystem actions: file, dir, link, and
2947 all of those actions need to be of the same type.
2949 The second category involves actions which cannot be delivered
2955 The third category involves actions which may be delivered
2956 multiple times, but all of those actions must be identical in
3006 types = sorted(six.itervalues(pkg.actions.types), key=key)
3014 # Load information about the actions currently on the system.
3026 # There's no sense in checking actions which have no
3033 # as it will be. We start by accumulating actions from
3040 # as it is now. We start by accumulating actions from
3054 # Update 'old' with all actions from the action
3056 # actions being installed, or with actions
3064 # Now update 'new' with all actions from the
3066 # and could conflict with the actions being
3090 attr_name = pkg.actions.types[name].key_attr
3101 """Return a dictionary of actions of the type given by 'name'
3223 # actions that are being moved somewhere else and to dest
3224 # actions that will be restored from a src action. This only
3231 # actions based on the destination file state.
3272 # At least one of the actions has to be a
3319 # 'abandon' actions are never delivered;
3320 # 'legacy' actions are only delivered if
3855 # Determine which install and update actions should not be
3857 # transform any install or update actions belonging to a
3917 # Install / update actions should only be
3932 ap.p.actions.removed.append((ap.dst,
3972 # Now trim pkgplans and elide empty entries from list of actions
3978 # Can't modify the p.actions tuple directly, so
3980 pval = getattr(p.actions, prop)
4106 merge all the resultant actions for the packages being
4121 # now combine all actions together to create a synthetic
4135 # now combine all actions together to create a synthetic single
4267 # obviously it handles all actions even if they don't have
4381 # Construct a mapping from the install actions in a pkgplan to
4393 # This keeps track of which pkgplans have had install actions
4397 # This maps destination actions to the pkgplans they're
4448 # Similarly, try to prevent files (and other actions)
4466 ap.p.actions.changed.append((ra, ap.dst))
4467 ap.p.actions.added[plan_pos[id(ap.dst)]] = None
4479 # Remove from the pkgplans the install actions which have been
4482 # Can't modify the p.actions tuple, so modify the added
4484 p.actions.added[:] = [
4486 for a in p.actions.added
4493 # We want to cull out actions where they've not changed at all,
4552 # Go over update actions
4556 # iterating over actions is slow, so don't do it
4562 # _any_ hardlink actions, append the hardlink actions
4577 # scan both old and new actions
4587 # sort actions to match needed processing order
4598 p.actions.removed or p.actions.changed or \
4599 p.actions.added:
4652 execute actions need to be sorted across packages
4821 execute actions need to be sorted across packages
4832 # load data from previously downloaded actions
4856 # 1) All non-directory actions (files, users, hardlinks,
4872 # 1) All actions must be ordered across packages; packages
4882 # 2) Installs of new actions must precede updates of existing
4890 # The exception to this rule is driver actions. Aliases of
4973 except pkg.actions.ActionRetry:
5048 act = pkg.actions.unknown.UnknownAction()
5057 except pkg.actions.ActionError:
5558 for astr in metadata.get("actions",
5561 a = pkg.actions.fromstr(
5563 except pkg.actions.ActionError: