summaryrefslogtreecommitdiffstats
path: root/tools/rpmlisting.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-08-28 03:50:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-08-28 03:50:15 +0000
commit0f6432fca4574baec2b9de0e5546291d4119dd95 (patch)
tree45049fd19302c93b712b4c1c3ba0df455919d023 /tools/rpmlisting.py
parent9f0950c83eaed72fecd522c13fc762989329a3b6 (diff)
downloadbcfg2-0f6432fca4574baec2b9de0e5546291d4119dd95.tar.gz
bcfg2-0f6432fca4574baec2b9de0e5546291d4119dd95.tar.bz2
bcfg2-0f6432fca4574baec2b9de0e5546291d4119dd95.zip
rpmlisting.py patch from solj
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3652 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'tools/rpmlisting.py')
-rw-r--r--tools/rpmlisting.py9
1 files 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('<PackageList uri="%s" type="rpm" priority="%s">\n' % (uri, priority))
+ output.write('<PackageList uri="%s" type="yum" priority="%s">\n' % (uri, priority))
output.write(' <Group name="%s">\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