def add_system_provides(self, names): provider = SystemProvider(self.config) provider.load() for name in names: provider.add(name[0], name[1]) provider.save() if not self.quiet: print "Added software '%s' provided by the system successfully" % \ ", ".join([name[0] for name in names])
def list_system_provides(self): provider = SystemProvider(self.config) provider.load() if provider.is_empty(): print "System provides no dependencies" return max_length = max([len(rules) for rules, version in provider.list()]) for rules, version in sorted(provider.list()): print "%s%s%s" % (rules, self._get_filler(rules, max_length), version)
def remove_system_provides(self, names): provider = SystemProvider(self.config) provider.load() for name in names: success = provider.remove(name) provider.save() if not self.quiet: if success: print "removed '%s' sucessfully" % name else: print "'%s' couldn't be removed" % name