Created
November 7, 2021 14:09
-
-
Save aniruddha2000/ea31bf2afb4d6de8c6f0c68c7fd9d7e3 to your computer and use it in GitHub Desktop.
Script to find the outdated apps in portage stable compared with the gentoo upstream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
path_portage = "../flatcar_proj/flatcar-sdk/src/third_party/portage-stable" | |
path_gentoo = "../flatcar_proj/gentoo" | |
print("Portage ebuilds list") | |
files_portage = [] | |
# r=root, d=directories, f = files | |
for r, d, f in os.walk(path_portage): | |
for file in f: | |
if ".ebuild" in file: | |
files_portage.append(os.path.join(file)) | |
print("\n\nGentoo ebuilds list\n\n") | |
files_gentoo = [] | |
# r=root, d=directories, f = files | |
for r, d, f in os.walk(path_gentoo): | |
for file in f: | |
if ".ebuild" in file: | |
files_gentoo.append(os.path.join(file)) | |
# Create gentoo ebuild list matched with the portage list | |
files_gentoo_match = [] | |
i = 0 | |
while i < len(files_gentoo): | |
if files_portage.count(files_gentoo[i]) > 0: | |
files_gentoo_match.append(files_gentoo[i]) | |
i += 1 | |
def non_match_elements(list_a, list_b): | |
non_match = [] | |
for i in list_a: | |
if i not in list_b: | |
non_match.append(i) | |
return non_match | |
diff_list = non_match_elements(files_portage, files_gentoo_match) | |
for element in diff_list: | |
print(element) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment