| 1 |
#!/usr/bin/python
|
| 2 |
#
|
| 3 |
# find-provides: munge the provides dependencies from the kabideps file
|
| 4 |
#
|
| 5 |
# This software may be freely redistributed under the terms of the GNU
|
| 6 |
# General Public License (GPL).
|
| 7 |
#
|
| 8 |
# Takes a directory prefix, then outputs the kabideps file contents.
|
| 9 |
|
| 10 |
__author__ = "Jon Masters <jcm@redhat.com>"
|
| 11 |
__version__ = "1.0"
|
| 12 |
__date__ = "Tue 25 Jul 2006 04:00 GMT"
|
| 13 |
__copyright__ = "Copyright (C) 2006 Red Hat, Inc"
|
| 14 |
__license__ = "GPL"
|
| 15 |
|
| 16 |
import os
|
| 17 |
import re
|
| 18 |
import string
|
| 19 |
import sys
|
| 20 |
|
| 21 |
false = 0
|
| 22 |
true = 1
|
| 23 |
|
| 24 |
kabideps=""
|
| 25 |
|
| 26 |
p = re.compile('^(.*)/symvers-(.*).gz$')
|
| 27 |
while true:
|
| 28 |
foo = sys.stdin.readline()
|
| 29 |
if foo == "":
|
| 30 |
break
|
| 31 |
string.split(foo)
|
| 32 |
m = p.match(foo)
|
| 33 |
if m:
|
| 34 |
kabideps=sys.argv[1] + "/kernel-" + m.group(2) + "-kabideps"
|
| 35 |
|
| 36 |
if kabideps == "":
|
| 37 |
sys.exit(0)
|
| 38 |
|
| 39 |
if not (os.path.isfile(kabideps)):
|
| 40 |
sys.stderr.write(sys.argv[0] + ": cannot locate kabideps file: " + kabideps + "\n")
|
| 41 |
sys.exit(1)
|
| 42 |
|
| 43 |
sys.stderr.write(sys.argv[0] + ": processing kABI: " + kabideps)
|
| 44 |
os.system("cat " + kabideps)
|