def METHOD_NAME(arch):
    regex_package='echo ([\w-]+)'
    regex_arch='arch=([\w-]+)'
    packages = []
    for filename in glob.glob('features/*/pkg.include'):
        with open(filename, 'r') as file:
            for line in file:
                line = line.strip()
                if line.startswith('#'):
                    continue
                if not line:
                    continue
                if line.startswith("$(if"):
                    # If line matches '$(if', then extract the package name
                    match_pkg = re.search(regex_package, line)
                    match_arch = re.search(regex_arch, line)
                    if match_pkg and match_arch and match_arch.group(1) == arch:
                        package_name = match_pkg.group(1).replace('$arch', arch)
                        packages.append(package_name)
                else:
                    package_name = line.replace('$arch', arch)
                    packages.append(package_name)
    return packages