Lines Matching refs:self
84 def __init__(self): argument
85 self.path = None
86 self.isdir = False
87 self.target = None
88 self.owner = None
89 self.group = None
90 self.mode = None
91 self.hardkey = None
92 self.hardpaths = set()
93 self.editable = False
95 def name(self): argument
98 if self.isdir:
101 if self.target:
104 if self.hardkey:
109 def checkmodes(self, modechecks): argument
116 t = self.name()
119 m = int(self.mode, 8)
120 o = self.owner
121 p = self.path
133 e = self.editable
159 def __ne__(self, other): argument
173 if isinstance(self, ActionInfo):
174 lhs = self
178 rhs = self
243 def __str__(self): argument
249 name = self.name()
253 out += " " + label + str(getattr(self, member))
257 def protostr(self): argument
264 mode = self.mode
265 owner = self.owner
266 group = self.group
268 name = self.name()
275 target = self.target
281 (ftype, self.path, target, mode, owner, group, 0, 1)
292 def __init__(self, action): argument
293 FileInfo.__init__(self)
299 self.path = action.attrs["path"]
302 self.owner = action.attrs["owner"]
303 self.group = action.attrs["group"]
304 self.mode = action.attrs["mode"]
305 self.hash = action.hash
307 self.editable = True
310 self.target = os.path.normpath(target)
311 self.mediator = action.attrs.get("mediator")
313 self.owner = action.attrs["owner"]
314 self.group = action.attrs["group"]
315 self.mode = action.attrs["mode"]
316 self.isdir = True
319 self.hardkey = target
320 self.hardpaths.add(target)
337 def __init__(self, path, mode): argument
338 Exception.__init__(self)
339 self.path = path
340 self.mode = mode
342 def __str__(self): argument
343 return '%s: unsupported S_IFMT %07o' % (self.path, self.mode)
356 def __init__(self, root=None, path=None): argument
357 FileInfo.__init__(self)
358 self.path = path
367 self.hash = self.path
369 self.isdir = True
371 self.target = os.path.normpath(os.readlink(path))
372 self.mediator = None
377 self.mode = "%04o" % stat.S_IMODE(mode)
384 self.owner = "owner"
385 self.group = "group"
395 self.hardkey = lstat.st_ino
401 def __init__(self, name): argument
402 dict.__init__(self)
403 self.name = name
405 def compare(self, other): argument
408 keys1 = frozenset(self.keys())
417 (self.name, other.name)
419 print("\t%s" % str(self[path]))
424 (other.name, self.name)
431 if self[path] != other[path]:
435 % (self.name, other.name)
436 print("%14s %s" % (self.name, self[path]))
447 def __str__(self): argument
448 return 'bad proto list entry: "%s"' % Exception.__str__(self)
456 def adddir(self, proto, exceptions): argument
500 self.update(newentries)
502 def addprotolist(self, protolist, exceptions): argument
552 self.update(newentries)
560 def __init__(self, mfile, error): argument
561 Exception.__init__(self)
562 self.mfile = mfile
563 self.error = error
565 def __str__(self): argument
566 return "unable to parse manifest %s: %s" % (self.mfile, self.error)
577 def addmanifest(self, root, mfile, arch, modechecks, exceptions): argument
634 if path in self:
655 self[path] = ActionInfo(action)
657 modewarnings.update(self[path].checkmodes(modechecks))
665 def adddir(self, mdir, arch, modechecks, exceptions): argument
672 self.addmanifest(mdir, mfile, arch, modechecks, exceptions)
676 def resolvehardlinks(self): argument
680 for info in self.values():
683 if tgt in self:
684 tgtinfo = self[tgt]
694 def __init__(self, files, arch): argument
695 set.__init__(self)
698 self.readexceptionfile(fname, arch)
703 def readexceptionfile(self, efile, arch): argument
717 self.add(os.path.normpath(exc[0]))