deb-mock/debian/deb-mock-cache/usr/bin/mock-cache-clean
robojerk 811b639407
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 1m32s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 42s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 59s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
Fix multi-package build: Rename packages to match source name
- Rename all packages from 'deb-mock-*' to 'mock-*' to match source name 'mock'
- Update debian/control package definitions and dependencies
- Rename .install files to match new package names
- Update CI workflow to look for 'mock_*.deb' instead of 'deb-mock_*.deb'

This fixes the core issue where only 1 package was being built instead of 6.
The Debian build system now correctly recognizes all 6 packages:
- mock (main package)
- mock-cache (cache utilities)
- mock-configs (configuration files)
- mock-dev (development tools)
- mock-filesystem (filesystem layout)
- mock-plugins (plugin system)

All 6 packages now build successfully locally and should work in CI.
2025-09-04 15:12:13 -07:00

32 lines
956 B
Bash
Executable file

#!/bin/bash
# Cache cleaning utility for mock
CACHE_DIR="/var/cache/mock"
ARTIFACT_CACHE="$CACHE_DIR/artifacts"
DEPENDENCY_CACHE="$CACHE_DIR/dependencies"
case "$1" in
"clean")
echo "Cleaning mock cache..."
rm -rf "$ARTIFACT_CACHE"/*
rm -rf "$DEPENDENCY_CACHE"/*
echo "Cache cleaned successfully"
;;
"status")
echo "Cache status:"
echo "Artifact cache: $(du -sh $ARTIFACT_CACHE 2>/dev/null || echo '0B')"
echo "Dependency cache: $(du -sh $DEPENDENCY_CACHE 2>/dev/null || echo '0B')"
;;
"purge")
echo "Purging all mock cache..."
rm -rf "$CACHE_DIR"/*
echo "Cache purged successfully"
;;
*)
echo "Usage: $0 {clean|status|purge}"
echo " clean - Clean build artifacts and dependencies"
echo " status - Show cache usage statistics"
echo " purge - Remove all cached data"
exit 1
;;
esac