dingjian / rpms / kernel-rt

Forked from rpms/kernel-rt 4 years ago
Clone

Blame SOURCES/find-provides

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