'If a distribution is imported from DVD, there is a good chance the path doesn\'t
contain the arch and we should add it back in so that it\'s part of the
meaningful name ... so this code helps figure out the arch name.  This is important
for producing predictable distro names (and profile names) from differing import sources'

def learn_arch_from_tree(self):

    result = {}
    os.path.walk(self.path, self.arch_walker, result)
    if result.pop('amd64', False):
        result['x86_64'] = 1
    if result.pop('i686', False):
        result['i386'] = 1
    if result.pop('i586', False):
        result['i386'] = 1
    if result.pop('x86', False):
        result['i386'] = 1
    return result.keys()
