AOSC-Dev / acbs

A Package Tree Management Utility
https://AOSC-Dev.github.io/acbs
GNU Lesser General Public License v2.1
8 stars 8 forks source link

parser: Skip source parsing if FAIL_ARCH matches #25

Closed Cyanoxygen closed 5 months ago

Cyanoxygen commented 5 months ago
what-the-diff[bot] commented 5 months ago

PR Summary

MingcongBai commented 5 months ago

Let's test in production.

Cyanoxygen commented 5 months ago

PR Summary

  • Enhanced function 'parse_package_url' The parse_package_url function now accepts an additional parameter ignore_empty_srcs. This parameter helps the function to determine whether to neglect empty sources or not.
  • Removal of 'parse_package_url_legacy' function The function, 'parse_package_url_legacy', is now deprecated and hence, has been deleted.
  • Modification in the 'parse_package' function

    • An extra variable named ignore_empty_srcs has been incorporated, which is initially set to false.
    • The function now examines fail_arch and modifies the ignore_empty_srcs variable to True if the current architecture is not in coherence with the fail_arch.
    • ignore_empty_srcs parameter is passed to the parse_package_url function.
    • The outcome of parse_package_url is now assigned to the acbs_source_info variable.
    • The fail_arch attribute of the ACBSPackageInfo object is now linked to the fail_arch_re variable.
  • Enhanced Package Information Collection Even if the package is not buildable for the current architecture, the parse_package function continues parsing to provide a complete tree of information.
  • Code Cleanup for 'parse_package' Unused variables and logging statements (like fail_arch_re.match(arch), fail_arch_re, arch) have been removed in order to make the code cleaner and more efficient.

Is this an AI bot?