From 0f6432fca4574baec2b9de0e5546291d4119dd95 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 28 Aug 2007 03:50:15 +0000 Subject: rpmlisting.py patch from solj git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3652 ce84e21b-d406-0410-9b95-82705330c041 --- tools/rpmlisting.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/rpmlisting.py b/tools/rpmlisting.py index 0b4f4750c..9cc1d2580 100644 --- a/tools/rpmlisting.py +++ b/tools/rpmlisting.py @@ -6,6 +6,7 @@ import commands import getopt import re import datetime +from socket import gethostname def run_or_die(command): @@ -101,8 +102,8 @@ def subdivide(verstr): return parts -subarch_mapping = {'i686':'x86', 'i586':'x86', 'i486':'x86', 'i386':'x86', 'x86_64':'x86_64', 'noarch':'noarch'} -arch_mapping = {'x86':['i686','i586','i486','i386'], 'x86_64':['x86_64'], 'noarch':['noarch']} +subarch_mapping = {'athlon':'x86', 'i686':'x86', 'i586':'x86', 'i486':'x86', 'i386':'x86', 'x86_64':'x86_64', 'noarch':'noarch'} +arch_mapping = {'x86':['athlon','i686','i586','i486','i386'], 'x86_64':['x86_64'], 'noarch':['noarch']} def parse_rpm(path, filename): @@ -262,7 +263,7 @@ def sorted_values(adict): def scan_rpm_dir(rpmdir, uri, group, priority=0, output=sys.stdout, start_date_desc=None, end_date_desc=None): """the meat of this library.""" - output.write('\n' % (uri, priority)) + output.write('\n' % (uri, priority)) output.write(' \n' % group) pkgs = prune_pkgs_archs(prune_pkgs_latest(prune_pkgs_timely(get_pkgs(rpmdir), start_date_desc, end_date_desc, rpmdir))) for rpmblobs in sorted_values(pkgs): @@ -299,7 +300,7 @@ if __name__ == "__main__": sys.exit(1) group = "base" - uri = "http://localhost/rpms" + uri = "http://"+gethostname()+"/rpms" rpmdir = "." priority = "0" output = None -- cgit v1.2.3-1-g7c22