xuexiaolei / rpms / kernel-rt

Forked from rpms/kernel-rt 4 years ago
Clone

Blame SOURCES/find-provides

ab7326
#!/usr/bin/python
ab7326
#
ab7326
# find-provides: munge the provides dependencies from the kabideps file
ab7326
#
ab7326
# This software may be freely redistributed under the terms of the GNU
ab7326
# General Public License (GPL).
ab7326
#
ab7326
# Takes a directory prefix, then outputs the kabideps file contents.
ab7326
ab7326
__author__ = "Jon Masters <jcm@redhat.com>"
ab7326
__version__ = "1.0"
ab7326
__date__ = "Tue 25 Jul 2006 04:00 GMT"
ab7326
__copyright__ = "Copyright (C) 2006 Red Hat, Inc"
ab7326
__license__ = "GPL"
ab7326
ab7326
import os
ab7326
import re
ab7326
import string
ab7326
import sys
ab7326
ab7326
false = 0
ab7326
true = 1
ab7326
ab7326
kabideps=""
ab7326
ab7326
p = re.compile('^(.*)/symvers-(.*).gz$')
ab7326
while true:
ab7326
	foo = sys.stdin.readline()
ab7326
	if foo == "":
ab7326
		break
ab7326
	string.split(foo)
ab7326
	m = p.match(foo)
ab7326
	if m:
ab7326
		kabideps=sys.argv[1] + "/kernel-" + m.group(2) + "-kabideps"
ab7326
	
ab7326
if kabideps == "":
ab7326
	sys.exit(0)
ab7326
ab7326
if not (os.path.isfile(kabideps)):
ab7326
	sys.stderr.write(sys.argv[0] + ": cannot locate kabideps file: " + kabideps + "\n")
ab7326
	sys.exit(1)
ab7326
ab7326
sys.stderr.write(sys.argv[0] + ": processing kABI: " + kabideps)
ab7326
os.system("cat " + kabideps)