diff --git a/.ci/lib/apkbuild_linting.py b/.ci/lib/apkbuild_linting.py index f573323d6..c20d933db 100755 --- a/.ci/lib/apkbuild_linting.py +++ b/.ci/lib/apkbuild_linting.py @@ -42,7 +42,7 @@ if __name__ == "__main__": custom_valid_options += kconfigcheck_categories os.environ["CUSTOM_VALID_OPTIONS"] = " ".join(custom_valid_options) - apkbuilds = {file for file in common.get_changed_files(removed=False) + apkbuilds = {file for file in common.get_changed_files() if os.path.basename(file) == "APKBUILD"} if len(apkbuilds) < 1: print("No APKBUILDs to lint") diff --git a/.ci/lib/common.py b/.ci/lib/common.py index 121a94c3f..8e02898f4 100755 --- a/.ci/lib/common.py +++ b/.ci/lib/common.py @@ -108,7 +108,7 @@ def get_base_commit() -> str: return commit -def get_changed_files(removed=True): +def get_changed_files(removed=False): """ Get all changed files and print them, as well as the branch and the commit that was used for the diff. :param removed: also return removed files (default: True) @@ -133,7 +133,7 @@ def get_changed_files(removed=True): def get_changed_packages(skip_archived: bool = False): ret = set() - for file in get_changed_files(): + for file in get_changed_files(removed=True): dirname, filename = os.path.split(file) # Skip files: diff --git a/.ci/lib/deviceinfo_linting.py b/.ci/lib/deviceinfo_linting.py index bec6d7578..25f069cd9 100755 --- a/.ci/lib/deviceinfo_linting.py +++ b/.ci/lib/deviceinfo_linting.py @@ -12,7 +12,7 @@ if __name__ == "__main__": print("WARNING: not linting deviceinfo files ([ci:skip-dint])") exit(0) # only lint deviceinfo files in the devices repo - deviceinfo_files = {file for file in common.get_changed_files(removed=False) + deviceinfo_files = {file for file in common.get_changed_files() if os.path.basename(file) == "deviceinfo" and file.startswith("device/")} try: diff --git a/.ci/lib/generate_build_jobs.py b/.ci/lib/generate_build_jobs.py index 6ab6cc538..4e6e361b3 100755 --- a/.ci/lib/generate_build_jobs.py +++ b/.ci/lib/generate_build_jobs.py @@ -173,7 +173,7 @@ if __name__ == "__main__": devices_under_test = set() packages_modified = set() # Get and print modified packages - for file in common.get_changed_files(removed=False): + for file in common.get_changed_files(): path = Path(file) # Check if the modified's file parent folder is one of a supported dev diff --git a/.ci/lib/kconfig.py b/.ci/lib/kconfig.py index 32d09b635..3eae5eab7 100755 --- a/.ci/lib/kconfig.py +++ b/.ci/lib/kconfig.py @@ -72,7 +72,7 @@ def show_error_all(): if __name__ == "__main__": - if "kconfigcheck.toml" in common.get_changed_files(removed=False): + if "kconfigcheck.toml" in common.get_changed_files(): print("kconfigcheck.toml changed -> checking all kernels") if not check_kconfig_all(): show_error_all() diff --git a/.ci/testcases/test_ui.py b/.ci/testcases/test_ui.py index 348c46c58..c9ef07ae1 100644 --- a/.ci/testcases/test_ui.py +++ b/.ci/testcases/test_ui.py @@ -14,7 +14,7 @@ def test_aports_ui(): """ pmaports_cfg = pmb.config.pmaports.read_config() for arch in pmaports_cfg["supported_arches"].split(","): - for path in common.get_changed_files(removed=False): + for path in common.get_changed_files(): path = Path(path) if path.name != "APKBUILD":