fix bug in check_sisyphus_set_relations.sh
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
*.o
|
*.o
|
||||||
|
|
||||||
|
tt
|
||||||
|
|
||||||
# Generated benchmark results
|
# Generated benchmark results
|
||||||
/res/
|
/res/
|
||||||
/res_cmp/
|
/res_cmp/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ MIRROR=https://ftp.altlinux.org/pub/distributions/ALTLinux
|
|||||||
REQUIRE_LIMIT=100
|
REQUIRE_LIMIT=100
|
||||||
|
|
||||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||||
REPO_ROOT=$(cd -- "$SCRIPT_DIR/.." && pwd)
|
REPO_ROOT=$(cd -- "$SCRIPT_DIR/../.." && pwd)
|
||||||
WORK=$(mktemp -d "${TMPDIR:-/tmp}/arsv-set-check.XXXXXX")
|
WORK=$(mktemp -d "${TMPDIR:-/tmp}/arsv-set-check.XXXXXX")
|
||||||
trap 'rm -rf "$WORK"' EXIT
|
trap 'rm -rf "$WORK"' EXIT
|
||||||
|
|
||||||
@@ -64,7 +64,8 @@ EOF
|
|||||||
|
|
||||||
fetch_metadata()
|
fetch_metadata()
|
||||||
{
|
{
|
||||||
mkdir -p "$WORK/apt/lists/partial" "$WORK/apt/archives/partial"
|
mkdir -p "$WORK/apt/lists/partial" "$WORK/apt/archives/partial" \
|
||||||
|
"$WORK/root/var/lib/rpm"
|
||||||
: >"$WORK/apt/apt.conf"
|
: >"$WORK/apt/apt.conf"
|
||||||
: >"$WORK/apt/status"
|
: >"$WORK/apt/status"
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
@@ -82,6 +83,7 @@ fetch_metadata()
|
|||||||
-o "Dir::Cache::archives=$WORK/apt/archives"
|
-o "Dir::Cache::archives=$WORK/apt/archives"
|
||||||
-o "Dir::Cache::pkgcache=$WORK/apt/pkgcache.bin"
|
-o "Dir::Cache::pkgcache=$WORK/apt/pkgcache.bin"
|
||||||
-o "Dir::Cache::srcpkgcache=$WORK/apt/srcpkgcache.bin"
|
-o "Dir::Cache::srcpkgcache=$WORK/apt/srcpkgcache.bin"
|
||||||
|
-o "RPM::RootDir=$WORK/root"
|
||||||
)
|
)
|
||||||
|
|
||||||
APT_CONFIG="$WORK/apt/apt.conf" apt-get "${options[@]}" -qq update
|
APT_CONFIG="$WORK/apt/apt.conf" apt-get "${options[@]}" -qq update
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
|
|
||||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||||
SCRIPT = REPO_ROOT / "scripts" / "check_sisyphus_set_relations.sh"
|
SCRIPT = REPO_ROOT / "scripts" / "rpmsetcmp" / "check_sisyphus_set_relations.sh"
|
||||||
PROVIDER_SET = "set:jg2ZwFjdTD2B0"
|
PROVIDER_SET = "set:jg2ZwFjdTD2B0"
|
||||||
REQUIRED_SET = "set:jiXMb"
|
REQUIRED_SET = "set:jiXMb"
|
||||||
|
|
||||||
@@ -22,12 +22,15 @@ def run_with_metadata(
|
|||||||
(fake_bin / "apt-get").write_text(
|
(fake_bin / "apt-get").write_text(
|
||||||
"""#!/bin/sh
|
"""#!/bin/sh
|
||||||
archive=
|
archive=
|
||||||
|
rpm_root=
|
||||||
for argument in "$@"; do
|
for argument in "$@"; do
|
||||||
case $argument in
|
case $argument in
|
||||||
Dir::Cache::archives=*) archive=${argument#*=} ;;
|
Dir::Cache::archives=*) archive=${argument#*=} ;;
|
||||||
|
RPM::RootDir=*) rpm_root=${argument#*=} ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
[ -n "$archive" ] && [ -d "$archive/partial" ]
|
[ -n "$archive" ] && [ -d "$archive/partial" ]
|
||||||
|
[ -n "$rpm_root" ] && [ -d "$rpm_root/var/lib/rpm" ]
|
||||||
""",
|
""",
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user