Lines Matching full:action
47 # Dictionary used to map action names to output format. Each entry is
48 # indexed by action name, and consists of a list of tuples that map
84 object (RealFileInfo) or an IPS manifest action (ActionInfo).
99 """Return the IPS action name of a FileInfo object.
247 """Return an action-style representation of a FileInfo object.
289 def __init__(self, action, error): argument
291 self.action = action
295 return "Error in '%s': %s" % (self.action, self.error)
304 def __init__(self, action): argument
311 self.path = action.attrs["path"]
313 if action.name == "file":
314 self.owner = action.attrs["owner"]
315 self.group = action.attrs["group"]
316 self.mode = action.attrs["mode"]
317 self.hash = action.hash
318 if "preserve" in action.attrs:
320 elif action.name == "link":
322 target = action.attrs["target"]
324 raise ActionInfoError(str(action),
328 self.mediator = action.attrs.get("mediator")
329 elif action.name == "dir":
330 self.owner = action.attrs["owner"]
331 self.group = action.attrs["group"]
332 self.mode = action.attrs["mode"]
334 elif action.name == "hardlink":
336 target = os.path.normpath(action.get_target_path())
338 raise ActionInfoError(str(action),
345 def supported(action): argument
346 """Indicates whether the specified IPS action time is
349 return action in frozenset(("file", "dir", "link", "hardlink"))
580 could not be parsed, rather than what action error we hit.
595 given action.
621 for action in mfest.gen_actions():
622 if "path" not in action.attrs or \
623 not ActionInfo.supported(action.name):
627 # The dir action is currently fully specified, in that it
644 if getattr(action, "hash", "NOHASH") != "NOHASH":
645 path = action.hash
647 path = action.attrs["path"]
659 # As with the manifest itself, if an action has specified
669 if hasattr(action, 'get_variants'):
670 var = action.get_variants()
672 var = action.get_variant_template()
677 self[path] = ActionInfo(action)