summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Server/Plugins/Packages/Source.py5
-rwxr-xr-xsrc/sbin/bcfg2-info34
2 files changed, 23 insertions, 16 deletions
diff --git a/src/lib/Server/Plugins/Packages/Source.py b/src/lib/Server/Plugins/Packages/Source.py
index 1dfeecc40..f13267da1 100644
--- a/src/lib/Server/Plugins/Packages/Source.py
+++ b/src/lib/Server/Plugins/Packages/Source.py
@@ -135,8 +135,9 @@ class Source(Bcfg2.Server.Plugin.Debuggable):
def get_repo_name(self, url_map):
# try to find a sensible name for a repo
- if url_map['component']:
- rname = url_map['component']
+ if url_map['components']:
+ # use the first component as the name
+ rname = url_map['components'][0]
else:
name = None
for repo_re in (self.mrepo_re,
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 808761d7e..3c1a0a3da 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -46,7 +46,7 @@ groups - List groups
help - Print this list of available commands
mappings <type*> <name*> - Print generator mappings for optional type and name
packageresolve <hostname> <package> [<package>...] - Resolve the specified set of packages
-packagesources - Show package sources
+packagesources <hostname> - Show package sources
profile <command> <args> - Profile a single bcfg2-info command
quit - Exit the bcfg2-info command line
showentries <hostname> <type> - Show abstract configuration entries for a given host
@@ -508,20 +508,26 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core):
# get_urls() loads url_map as a side-effect
source.get_urls()
for url_map in source.url_map:
- if url_map['arch'] in metadata.groups:
- reponame = source.get_repo_name(url_map)
- print("Name: %s" % reponame)
- print(" Type: %s" % source.ptype)
+ 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'])
- 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("")
+ 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("")
def do_profile(self, arg):
"""."""