autodist-inpsect: new tool added

This commit is contained in:
Silvan 2023-10-09 19:56:45 +02:00
parent 10e566b640
commit 0bc98d2bf8
2 changed files with 34 additions and 0 deletions

View File

@ -75,6 +75,7 @@ install-programs:
@$(INSTALL_SCRIPT) autoport-launcher $(DESTDIR)$(bindir)/autoport-launcher
@$(INSTALL_SCRIPT) autoport-chroot $(DESTDIR)$(sbindir)/autoport-chroot
@$(INSTALL_SCRIPT) automaint $(DESTDIR)$(sbindir)/automaint
@$(INSTALL_SCRIPT) autodist-inspect $(DESTDIR)$(bindir)/autodist-inspect
@$(INSTALL_SCRIPT) autodist-repository $(DESTDIR)$(sbindir)/autodist-repository
@$(INSTALL_SCRIPT) autodist-upstream-updates $(DESTDIR)$(sbindir)/autodist-upstream-updates
@$(INSTALL_SCRIPT) autoport-fix-environment $(DESTDIR)$(bindir)/autoport-fix-environment

33
autodist-inspect Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
[ -e /etc/autodist/config ] || {
echo "ERROR: missing configuration file /etc/autodist/config."
exit 1
}
. /etc/autodist/config
shopt -s nocaseglob
checkpkg=$1
if [ ! "$checkpkg" ]; then
echo "Usage:
$0 query"
exit 1
fi
[ "$LOCAL_REPS_BASE_DIR" -a -e "$LOCAL_REPS_BASE_DIR" ] || {
echo "ERROR: LOCAL_REPS_BASE_DIR needs to be defined and local repositories to exists."
exit 1
}
echo "=== distromatic sources: ==="
head -n2 ${LOCAL_REPS_BASE_DIR}/distromatic/base/sources
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/distromatic/base/sources
#tail -n+2 ${PREFIX}/distromatic/base/deps-* | grep -i $checkpkg
echo -e "\n=== distdb: ==="
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/distdb
for repo in base devel-makedist devel-autodist devel-misc; do
echo -e "\n=== ${repo}: ==="
ls ${LOCAL_REPS_BASE_DIR}/${repo}/SRPMS.base/*$checkpkg* 2>/dev/null
ls ${LOCAL_REPS_BASE_DIR}/${repo}/RPMS.*/*$checkpkg* 2>/dev/null
done