/pkg/src/modules/actions/ |
H A D | attribute.py | 47 def __init__(self, data=None, **attrs): 48 generic.Action.__init__(self, data, **attrs) 51 self.attrs["name"] 52 self.attrs["value"] 58 if len(attrs) == 1: 59 self.attrs["name"], self.attrs["value"] = \ 60 self.attrs.popitem() 75 (self.name, self.attrs["name"], 85 if isinstance(self.attrs["valu [all...] |
H A D | group.py | 57 """ return a dictionary containing attrs in attr list 58 from self.attrs; omit if no such attrs in self.attrs""" 59 return dict((a, self.attrs[a]) 60 for a in self.attrs 90 if "gid" not in self.attrs: 91 self.attrs["gid"] = cur_attrs["gid"] 92 elif self.attrs["gid"] != cur_attrs["gid"]: 95 template["gid"] = self.attrs["gi [all...] |
H A D | user.py | 73 out = self.attrs.copy() 113 username = self.attrs["username"] 131 update any attrs that changed from orig 139 username = self.attrs["username"] 145 self.attrs["gid"] = str(pkgplan.image.get_group_by_name( 146 self.attrs["group"])) 157 orig_attrs.update(orig.attrs) 167 # add default values to new attrs if not present 169 if attr not in self.attrs: 170 self.attrs[att [all...] |
H A D | legacy.py | 57 self.attrs["pkg"]))] 65 self.attrs["pkg"]) 86 "pkg": self.attrs["pkg"], 87 "pkginst": self.attrs["pkg"], 94 attrs = [ 97 for b in ( self.attrs.get(a, svr4attrs[a]), ) 101 attrs.append(("INSTDATE", 105 for k, v in attrs: 147 self.attrs["pkg"]) 154 self.attrs["pk [all...] |
H A D | link.py | 60 target = self.attrs["target"] 82 target = self.attrs["target"] 113 (self.name, "basename", os.path.basename(self.attrs["path"]), 115 (self.name, "path", os.path.sep + self.attrs["path"], None), 117 if "mediator" in self.attrs: 120 for k, v in six.iteritems(self.attrs) 141 if "mediator" not in self.attrs and \ 142 "mediator-version" not in self.attrs and \ 143 "mediator-implementation" not in self.attrs and \ 144 "mediator-priority" not in self.attrs [all...] |
H A D | signature.py | 56 def __init__(self, data, **attrs): 57 generic.Action.__init__(self, data, **attrs) 64 self.attrs["algorithm"]) 68 if "value" not in self.attrs: 69 self.attrs["value"] = "" 70 if "version" not in self.attrs: 71 self.attrs["version"] = \ 124 self.attrs.setdefault("chain.sizes", []) 125 self.attrs.setdefault("chain.csizes", []) 172 self.attrs["chai [all...] |
H A D | driver.py | 58 def __init__(self, data=None, **attrs): 59 generic.Action.__init__(self, data, **attrs) 84 self.attrs["name"] + " " + cp) 88 self.attrs["clone_perms"] = new_cloneperms[0] 90 self.attrs["clone_perms"] = new_cloneperms 96 ret = (self.attrs["name"] > other.attrs["name"]) - \ 97 (self.attrs["name"] < other.attrs["name"]) 102 if self.attrs["nam [all...] |
H A D | generic.py | 149 __slots__ = ["attrs", "data"] 215 if "pkg.size" not in self.attrs: 218 self.attrs["pkg.size"] = str(fs.st_size) 230 if "pkg.size" in self.attrs: 260 self.attrs["pkg.size"] = str(sz) 279 sattrs = list(self.attrs.keys()) 300 if k == "mode" and isinstance(self.attrs[k], str) and \ 301 self.attrs[k].startswith("0o"): 302 self.attrs[k] = "0" + self.attrs[ [all...] |
H A D | _common.c | 88 _generic_init_common(PyObject *action, PyObject *data, PyObject *attrs) argument 100 if (attrs != NULL) { 101 if (PyObject_SetAttrString(action, "attrs", attrs) == -1) 105 if ((attrs = PyDict_New()) == NULL) 107 if (PyObject_SetAttrString(action, "attrs", attrs) == -1) { 108 Py_DECREF(attrs); 111 Py_DECREF(attrs); 134 if ((key_attr = PyDict_GetItem(attrs, key_anam 247 _generic_init(PyObject *self, PyObject *args, PyObject *attrs) argument 261 _file_init(PyObject *self, PyObject *args, PyObject *attrs) argument [all...] |
H A D | directory.py | 54 return (self.attrs["path"] > other.attrs["path"]) - \ 55 (self.attrs["path"] < other.attrs["path"]) 67 int(self.attrs.get("mode", "0"), 8) == int(other.attrs.get("mode", "0"), 8): 73 return [os.path.normpath(self.attrs["path"])] 134 mode = int(self.attrs.get("mode", None), 8) 145 omode = int(orig.attrs.get("mode", None), 8) 238 if not self.attrs [all...] |
H A D | file.py | 135 mode = int(self.attrs.get("mode", None), 8) 154 "preserve" in self.attrs and 155 self.attrs["preserve"] not in ("abandon", 167 if "save_file" in self.attrs: 190 if orig.attrs.get("preserve", None) != "legacy": 290 if do_content and "timestamp" in self.attrs: 291 t = misc.timestamp_to_time(self.attrs["timestamp"]) 305 sattr = self.attrs.get("sysattr") 325 self.attrs["path"]) 335 path=self.attrs["pat [all...] |
H A D | license.py | 62 def __init__(self, data=None, **attrs): 63 generic.Action.__init__(self, data, **attrs) 67 # Set attrs["path"] so filelist can handle this action; 69 self.attrs["path"] = misc.relpath(os.path.join( 71 "license." + quote(self.attrs["license"], "")), 141 "license." + quote(self.attrs["license"], "")) 165 "license." + quote(self.attrs["license"], "")) 179 indices = [("license", idx, self.attrs[idx], None) 188 hash = self.attrs[attr] 236 "license." + self.attrs["licens [all...] |
H A D | __init__.py | 240 return fromstr("unknown {0}".format(string)).attrs 270 attrs = {} 288 if a not in attrs: 289 attrs[a] = v 291 av = attrs[a] 293 attrs[a].append(v) 295 attrs[a] = [ av, v ] 310 if "data" in attrs: 316 action = types[atype](data, **attrs) 372 filepath = os.path.sep + action.attrs["pat [all...] |
H A D | _actions.c | 56 add_to_attrs(PyObject *attrs, PyObject *key, PyObject *attr, bool concat) argument 60 PyObject *av = PyDict_GetItem(attrs, key); 63 return (PyDict_SetItem(attrs, key, attr)); 104 ret = PyDict_SetItem(attrs, key, av); 117 ret = PyDict_SetItem(attrs, key, list); 169 PyObject *attrs = NULL; local 191 Py_XDECREF(attrs);\ 292 if ((attrs = PyDict_New()) == NULL) { 302 if (PyDict_Size(attrs) > 0 || hash != NULL) { 510 if (add_to_attrs(attrs, ke [all...] |
/pkg/src/modules/publish/ |
H A D | dependencies.py | 297 attrs = d.attrs.copy() 298 attrs.update(c) 299 norm_attrs(attrs) 300 tmp.append(actions.depend.DependencyAction(**attrs)) 302 attrs = d.attrs.copy() 303 norm_attrs(attrs) 304 tmp.append(actions.depend.DependencyAction(**attrs)) 346 a.attrs["pat [all...] |
/pkg/src/tests/cli/ |
H A D | t_pkgdep_resolve.py | 775 self.assertEqual(len(pkg_deps[m1_path][0].attrs["{0}.reason".format( 779 self.assertEqual(d.attrs["fmri"], p2_name) 781 self.assertEqual(d.attrs["fmri"], p1_name) 808 if d.attrs["fmri"] == p2_name: 810 d.attrs["{0}.file".format(self.depend_dp)], 812 elif d.attrs["fmri"] == p3_name: 814 d.attrs["{0}.file".format(self.depend_dp)], 819 d.attrs["fmri"], d)) 833 if d.attrs["fmri"] == p2_name: 835 d.attrs["{ [all...] |
/pkg/src/util/publish/ |
H A D | pkgdiff.py | 170 a.attrs.pop(vname, None) 218 if k not in a.attrs or a.attrs[k] != v: 220 elif k in a.attrs: 251 res = misc.cmp(a.attrs[a.key_attr], b.attrs[b.key_attr]) 269 def attrval(attrs, k, elide_iter=tuple()): 276 v = attrs[k] 292 if not set(a.attrs.keys()) & onlyattrs: 295 if not set(a.attrs [all...] |
H A D | pkgfmt.py | 189 act.attrs.get("type") not in dep_types): 192 "action").format(act.attrs.get("type"))) 235 if a[0].name == "set" and a[0].attrs["name"] == "pkg.fmri": 237 if b[0].name == "set" and b[0].attrs["name"] == "pkg.fmri": 242 if a[0].name == "set" and a[0].attrs["name"].startswith("pkg.") and \ 243 not (b[0].name != "set" or b[0].attrs["name"].startswith("pkg.")): 245 if b[0].name == "set" and b[0].attrs["name"].startswith("pkg.") and \ 246 not (a[0].name != "set" or a[0].attrs["name"].startswith("pkg.")): 254 a[0].attrs["name"] == attr and 255 not b[0].attrs["nam [all...] |
/pkg/src/modules/flavor/ |
H A D | base.py | 117 def __init__(self, action, pkg_vars, proto_dir, attrs): 129 'attrs' is a dictionary to containing the relevant action tags 137 attrs.update([ 144 attrs.update(action.get_variant_template()) 146 for k, v in attrs.items(): 148 attrs[k] = list(v) 150 depend.DependencyAction.__init__(self, **attrs) 182 return self.action.attrs["path"] 287 attrs = {"{0}.type".format(self.DEPEND_DEBUG_PREFIX): kind} 289 attrs["{ [all...] |
H A D | python.py | 189 local_file = action.attrs[PD_LOCAL_PATH] 207 install_match = py_lib_re.match(action.attrs["path"]) 228 local_file, action.attrs["path"])) 239 local_file, action.attrs["path"])) 254 os.path.dirname(action.attrs["path"]), run_paths=run_paths) 267 dirs, pkg_vars, action.attrs[PD_PROTO_DIR])) 271 action.attrs[PD_LOCAL_PATH])) 273 errs.append(PythonSyntaxError(e, action.attrs["path"], 285 os.path.dirname(action.attrs["path"]), local_file] 314 dirs, pkg_vars, action.attrs[PD_PROTO_DI [all...] |
/pkg/src/modules/bundle/ |
H A D | __init__.py | 108 print(file.type, file.attrs) 110 print(file.attrs["file"]) 111 print(os.stat(file.attrs["file"]))
|
/pkg/src/modules/lint/ |
H A D | pkglint_action.py | 129 if attr not in action.attrs: 137 action.attrs[k] = list(v) 139 action.attrs[k] = v 141 p = action.attrs[attr] 308 p = action.attrs.get(attr, None) 361 if key in a.attrs: 362 val = a.attrs[key] 396 "Duplicated reference counted actions should have the same attrs.") 425 if attr_name not in action.attrs: 431 name = action.attrs[attr_nam [all...] |
/pkg/src/modules/ |
H A D | digest.py | 285 if attr in action.attrs: 286 return (attr, action.attrs[attr], 295 if attr in action.attrs: 296 ch = ContentHash(action.attrs[attr]) 304 if attr in action.attrs: 305 return attr, action.attrs[attr], hash_dic[attr] 307 # fallback to the default hash member since it's not in action.attrs 385 new_hashes = frozenset(a for a in action.attrs if a in hash_attrs) 386 old_hashes = frozenset(a for a in old_action.attrs if a in hash_attrs) 397 new_hash = action.attrs [all...] |
H A D | api_common.py | 74 return self.__action.attrs["license"] 140 attrs=None, last_update=None, last_install=None): 163 self.attrs = attrs or {} 201 return self.attrs.get(name, {modifiers: []}).get( 231 deps.append(a.attrs.get(a.key_attr)) 236 attr_name = a.attrs["name"] 239 summ = a.attrs["value"] 243 summ = a.attrs["value"] 245 desc = a.attrs["valu [all...] |
H A D | manifest.py | 78 if attr in action.attrs: 234 a.attrs.get("mediator"): 236 a.attrs[a.key_attr], 237 a.attrs.get("mediator-version"), 238 a.attrs.get("mediator-implementation") 241 akey = (a.name, hashify(a.attrs.get( 307 a.attrs.get("mediator"): 312 a.attrs.get(v))]) 314 "{0}={1}".format(v, a.attrs[v]) 406 "mediator" in a.attrs [all...] |