debian-forge/tools/debian-version-info
robojerk f93e3a447c
Some checks are pending
Checks / Spelling (push) Waiting to run
Checks / Python Linters (push) Waiting to run
Checks / Shell Linters (push) Waiting to run
Checks / 📦 Packit config lint (push) Waiting to run
Checks / 🔍 Check for valid snapshot urls (push) Waiting to run
Checks / 🔍 Check JSON files for formatting consistency (push) Waiting to run
Generate / Documentation (push) Waiting to run
Generate / Test Data (push) Waiting to run
Tests / Unittest (push) Waiting to run
Tests / Assembler test (legacy) (push) Waiting to run
Tests / Smoke run: unittest as normal user on default runner (push) Waiting to run
Add dynamic Debian version detection system (Fedora-style)
2025-08-26 16:08:44 -07:00

84 lines
2.6 KiB
Python
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
"""
Debian Version Info Tool
Shows current Debian version information and compatibility status
"""
import sys
import os
# Add the project root to the Python path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
try:
from osbuild.version_detector import print_version_info, is_debian_system, get_recommended_suite
from osbuild.config_manager import config
except ImportError as e:
print(f"Error importing modules: {e}")
print("Make sure you're running this from the project root directory")
sys.exit(1)
def main():
"""Main function"""
print("🔍 Debian Forge Version Information")
print("=" * 50)
# Show version detection
print_version_info()
print()
# Show configuration status
print("📋 Configuration Status:")
print("=" * 30)
if is_debian_system():
print("✅ Running on Debian system")
suite = get_recommended_suite()
print(f"📦 Recommended suite: {suite}")
# Check if suite is supported
if suite in ['trixie', 'forky', 'sid']:
print("✅ Suite is officially supported")
else:
print("⚠️ Suite may have limited support")
else:
print(" Running on non-Debian system")
print("📦 Using default Debian Forge settings")
print(f"📦 Default suite: {get_recommended_suite()}")
print()
# Show current configuration
print("⚙️ Current Configuration:")
print("=" * 30)
print(f"Default suite: {config.get_build_setting('default_suite', 'not set')}")
print(f"Default arch: {config.get_build_setting('default_arch', 'not set')}")
print(f"APT proxy: {config.get_apt_proxy() or 'not set'}")
print()
# Show recommendations
print("💡 Recommendations:")
print("=" * 30)
if not is_debian_system():
print("• Consider using a Debian system for best compatibility")
print("• Current system will use default Debian Forge settings")
else:
suite = get_recommended_suite()
if suite == 'trixie':
print("• ✅ Using stable Debian 13 (Trixie) - recommended for production")
elif suite == 'forky':
print("• 🔄 Using testing Debian 14 (Forky) - good for development")
elif suite == 'sid':
print("• ⚠️ Using unstable (Sid) - use with caution")
else:
print(f"• ⚠️ Using {suite} - may have limited support")
print()
print("For more information, see config/README.md")
if __name__ == '__main__':
main()