Lines 797-802
Link Here
|
797 |
items[-1] != items[0]: |
797 |
items[-1] != items[0]: |
798 |
version += items[1] |
798 |
version += items[1] |
799 |
|
799 |
|
|
|
800 |
# now look in .config for a local version |
801 |
config_pathname = os.path.join(base_dir, '.config') |
802 |
try: |
803 |
f = open(config_pathname, 'r') |
804 |
except OSError, details: |
805 |
return (None, str(details)) |
806 |
except IOError, details: |
807 |
return (None, str(details)) |
808 |
# dunno how much of a performance hit this is.. |
809 |
# it basically does a grep through the whole .config |
810 |
try: |
811 |
data = f.read() |
812 |
except OSError, details: |
813 |
return (None, str(details)) |
814 |
except IOError, details: |
815 |
return (None, str(details)) |
816 |
data = data.split('\n') |
817 |
pattern = re.compile('CONFIG_LOCALVERSION="(.*)"') |
818 |
for line in data: |
819 |
match = pattern.search(line) |
820 |
if (match): |
821 |
version += match.group(1) |
822 |
f.close() |
823 |
|
800 |
return (version,None) |
824 |
return (version,None) |
801 |
|
825 |
|
802 |
aumtime=0 |
826 |
aumtime=0 |