Rework package exclusions in tools/version.rb (#13769)

* Add --all argument to tools/version.rb

* Remove CREW_AUTOMATIC_VERSION_UPDATE_EXCLUSION_REGEX

* Move CREW_UPDATER_EXCLUDED_PKGS to tools/version.rb

* Simplify handling of upstream versions not being found in tools/version.rb

* Fix handling of fake packages in tools/version.rb

* Fix indentation on file-update excluded packages

* Separately handle packages with no upstream versions in tools/version.rb

* Update util_linux exclusion comment

* Add more exclusions for packages with no upstream versions to tools/version.rb
This commit is contained in:
Max Downey Twiss
2025-12-09 13:50:28 +11:00
committed by GitHub
parent 1d6440370a
commit 4f9e3d760f
2 changed files with 54 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ require 'etc'
require 'open3'
OLD_CREW_VERSION = defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
CREW_VERSION = '1.68.7' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
CREW_VERSION = '1.68.8' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
# Kernel architecture.
KERN_ARCH = Etc.uname[:machine]
@@ -371,22 +371,6 @@ end
Dir.glob("#{CREW_LIB_PATH}/lib/buildsystems/*.rb") { |file| @buildsystems << File.foreach(file, encoding: Encoding::UTF_8).grep(/^class/).to_s.split[1] }
CREW_VALID_BUILDSYSTEMS = @buildsystems.sort!
# Some packges need manual adjustments of URLS for different versions.
CREW_UPDATER_EXCLUDED_PKGS = Set[
{ pkg_name: 'clear_cache', comments: 'Internal Chromebrew Package.' },
{ pkg_name: 'gdk_base', comments: 'Internal Chromebrew Package.' },
{ pkg_name: 'glibc', comments: 'Requires manual update.' },
{ pkg_name: 'gpm', comments: 'Upstream is defunct.' },
{ pkg_name: 'hello_world_chromebrew', comments: 'Internal Chromebrew Package.' },
{ pkg_name: 'ld_default', comments: 'Internal Chromebrew Package.' },
{ pkg_name: 'linuxheaders', comments: 'Requires manual update.' },
{ pkg_name: 'pkg_config', comments: 'Upstream is abandoned.' },
{ pkg_name: 'ruby', comments: 'i686 needs building with GCC 14.' },
{ pkg_name: 'util_linux', comments: '2.41.2 build broken. See https://github.com/util-linux/util-linux/issues/3763' },
{ pkg_name: 'xdg_base', comments: 'Internal Chromebrew Package.' }
].to_h { |h| [h[:pkg_name], h[:comments]] }
CREW_AUTOMATIC_VERSION_UPDATE_EXCLUSION_REGEX = "(#{CREW_UPDATER_EXCLUDED_PKGS.keys.map { |p| "^#{p}$" }.join('|')})"
# Some packages have different names in anitya.
CREW_ANITYA_PACKAGE_NAME_MAPPINGS = Set[
{ pkg_name: 'asdf', anitya_pkg: 'asdf-vm', comments: '' },