From e7f94617ef01a31ca90550cfa661d1b2618671b1 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 1 Jun 2012 15:56:33 -0400 Subject: fixed caching of Collection objects; moved bcfg2-info packagesources code into Collection.py --- src/sbin/bcfg2-info | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/sbin') diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index fd1012925..859826e67 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -601,30 +601,7 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): print("Unable to build metadata for host %s" % args) return collection = self.plugins['Packages']._get_collection(metadata) - for source in collection.sources: - # get_urls() loads url_map as a side-effect - source.get_urls() - for url_map in source.url_map: - for arch in url_map['arches']: - # make sure client is in all the proper arch groups - if arch not in metadata.groups: - continue - reponame = source.get_repo_name(url_map) - print("Name: %s" % reponame) - print(" Type: %s" % source.ptype) - if url_map['url'] != '': - print(" URL: %s" % url_map['url']) - elif url_map['rawurl'] != '': - print(" RAWURL: %s" % url_map['rawurl']) - if source.gpgkeys: - print(" GPG Key(s): %s" % ", ".join(source.gpgkeys)) - else: - print(" GPG Key(s): None") - if len(source.blacklist): - print(" Blacklist: %s" % ", ".join(source.blacklist)) - if len(source.whitelist): - print(" Whitelist: %s" % ", ".join(source.whitelist)) - print("") + print collection.sourcelist() def do_profile(self, arg): """.""" -- cgit v1.2.3-1-g7c22