head	1.1;
access;
symbols
	rpm-4_4_8-release:1.1
	rpm-4_4_7-release:1.1
	rpm-4_4_6-release:1.1
	rpm-4_4_5-release:1.1
	rpm-4_4_4-release:1.1
	rpm-4_4_3-release:1.1
	jbj_before_tklcpatches:1.1
	rpm-4_4_2-release:1.1
	pjones-sparse-experiment:1.1.0.4
	rpm-4_4_1-release:1.1
	rpm-4_4-release:1.1
	rpm-4_4:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2004.10.13.18.40.33;	author jbj;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Move rpm-python test scripts to test subdirectory.
@
text
@#!/usr/bin/python

import rpm

def printlist(h, tag):
    print "####### %s tag contains:" % tag
    i = 0
    list = h[tag]
    if not list:
        print "NO SUCH TAG"
        return
    
    for file in list:
        print file
        i = i + 1
    print "******** %d files" % i
    

db = rpm.opendb(0)
rc = db.findbyname('redhat-release')
h = db[rc[0]]
printlist (h, 'filenames')
printlist (h, 'oldfilenames')

print "-------------- expand --------------------"
h.expandFilelist()
printlist (h, 'oldfilenames')
printlist (h, 'filenames')

print "-------------- compress --------------------"
h.compressFilelist()
printlist (h, 'oldfilenames')
printlist (h, 'filenames')

print "-------------- expand --------------------"
h.expandFilelist()
printlist (h, 'oldfilenames')
printlist (h, 'filenames')

print "-------------- full --------------------"
h.fullFilelist()
printlist (h, 'oldfilenames')
printlist (h, 'filenames')

@
