--- portage.py.orig 2004-11-11 20:25:22.302739990 -0500 +++ portage.py 2004-11-11 20:26:38.028430608 -0500 @@ -797,6 +797,30 @@ items[-1] != items[0]: version += items[1] + # now look in .config for a local version + config_pathname = os.path.join(base_dir, '.config') + try: + f = open(config_pathname, 'r') + except OSError, details: + return (None, str(details)) + except IOError, details: + return (None, str(details)) + # dunno how much of a performance hit this is.. + # it basically does a grep through the whole .config + try: + data = f.read() + except OSError, details: + return (None, str(details)) + except IOError, details: + return (None, str(details)) + data = data.split('\n') + pattern = re.compile('CONFIG_LOCALVERSION="(.*)"') + for line in data: + match = pattern.search(line) + if (match): + version += match.group(1) + f.close() + return (version,None) aumtime=0