]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
script/build-with-container: refactor LinuxDistro to use instances instead of subclasses copilot/refactor-distrokind-structure 67775/head
authorcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sat, 14 Mar 2026 10:31:53 +0000 (10:31 +0000)
committercopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Sat, 14 Mar 2026 10:31:53 +0000 (10:31 +0000)
commit11fb8f9f744d8286b9760d65b36db248ba2d565f
treea4d44553b7cf56fab5e0ba7dedc8c2931f6c83b6
parentc6a9784fe45756ca948e3bc1513d2379bf481251
script/build-with-container: refactor LinuxDistro to use instances instead of subclasses

- Add LinuxDistro.PackageManager enum replacing PKG_DNF/PKG_APT/PKG_ZYPPER string constants
- Add LinuxDistro.Release class with full comparison operator support
- Change LinuxDistro to support instance-based concrete distros
- Add _make_name/_make_image/_make_aliases to family classes for auto-guessing
- Introduce CentOSLinuxDistro, RockyLinuxDistro, UbuntuLinuxDistro family classes
- Update DebianLinuxDistro with codename-based auto-guessing
- Replace all concrete subclasses with instance instantiation calls
- Remove global concrete distro class objects
- Remove unsupported decorator and related globals
- Update parse_cli to use LinuxDistro["centos9"].name instead of CentOS9.name
- Add comparison operators to LinuxDistro for release-based ordering
- Remove unnecessary comments per problem statement

Co-authored-by: epuertat <37327689+epuertat@users.noreply.github.com>
src/script/build-with-container.py