diff --git a/tools/pinning/common/export-pinned-dependencies.sh b/tools/pinning/common/export-pinned-dependencies.sh index 06f1da8a1..a136472b8 100755 --- a/tools/pinning/common/export-pinned-dependencies.sh +++ b/tools/pinning/common/export-pinned-dependencies.sh @@ -37,15 +37,22 @@ if [ -f poetry.lock ]; then rm poetry.lock fi -echo "If this takes more than a few minutes, you can try running this script again" >&2 -echo "with arguments for poetry like -vvv on the command line to help see where" >&2 -echo "poetry is getting stuck." >&2 +echo "If this takes more than a few minutes, you may want to try clearing poetry's" >&2 +echo "caches with a command like the following and running this script again:" >&2 +echo >&2 +echo " poetry cache list | xargs -L1 poetry cache clear --all" >&2 +echo >&2 +echo "If that doesn't help, you can also try running this script with extra arguments" >&2 +echo 'for "poetry lock" on the command line such as -vvv to help see where poetry is' >&2 +echo "getting stuck." >&2 extra_args="${*:2}" -# If you're running this with different Python versions (say to update both our -# "current" and "oldest" pinnings), poetry's cache can become corrupted causing -# poetry to hang indefinitely. --no-cache avoids this. -poetry lock --no-cache ${extra_args:+"$extra_args"} >&2 +poetry lock ${extra_args:+"$extra_args"} >&2 trap 'rm poetry.lock' EXIT -# We need to remove local packages from the output. -poetry export --format constraints.txt --without-hashes | sed '/^acme @/d; /certbot/d;' +# POETRY_WARNINGS_EXPORT is set to remove warning output about +# poetry-plugin-export no longer being installed with poetry by default in the +# future which we can ignore because we explicitly depend on the plugin +# package. +# +# sed is then used to remove local packages from the output. +POETRY_WARNINGS_EXPORT=false poetry export --format constraints.txt --without-hashes | sed '/^acme @/d; /certbot/d;'