summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-01 15:56:33 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-06-01 15:56:33 -0400
commite7f94617ef01a31ca90550cfa661d1b2618671b1 (patch)
tree55cf560d0149672a775d8b6913bfd668ccc5ccad /src/sbin
parent8ddf1d0b4a08dd3786d2c135c5a0312f589f3657 (diff)
downloadbcfg2-e7f94617ef01a31ca90550cfa661d1b2618671b1.tar.gz
bcfg2-e7f94617ef01a31ca90550cfa661d1b2618671b1.tar.bz2
bcfg2-e7f94617ef01a31ca90550cfa661d1b2618671b1.zip
fixed caching of Collection objects; moved bcfg2-info packagesources code into Collection.py
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-info25
1 files changed, 1 insertions, 24 deletions
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):
"""."""