add explanation of possible limitations of the script

This commit is contained in:
Fabio Valentini 2022-08-24 12:04:50 +02:00
commit 68fb0d1e1b
Signed by: decathorpe
GPG key ID: 5AC5F572E5D410AF

View file

@ -1,5 +1,26 @@
#!/usr/bin/python3
# leafdrop
# ========
#
# This script checks whether it is safe to stop building a given source package
# on i686.
#
# Be aware that this query does not take into account architecture-specific
# BuildRequires due to limitations in the RPM format (ExclusiveArch/ExcludeArch
# headers are not inherited by binary RPMs), pungi (no information about
# ExclusiveArch/ExcludeArch is available at compose time), and in Fedora
# infrastructure (one shared "-source" repository for all architectures, which
# contains SRPM files with randomized architecture-specific BuildRequires).
#
# However, this case mostly affects more "esoteric" architectures like ppc64le
# and s390x (for example, due to missing Qt5WebKit / Qt5WebEngine support), so
# this limitation should have little to no impact on the correctness of this
# script for i686.
#
# Author: Fabio Valentini <decathorpe@gmail.org>
# SPDX-License-Identifier: Unlicense
import argparse
import shutil
import subprocess
@ -115,8 +136,6 @@ def get_requires(package: str) -> Tuple[List[str], List[str]]:
else:
requires.append(n)
# TODO: filter out packages that already have ExcludeArch: i686
requires.sort()
build_requires.sort()
@ -181,12 +200,14 @@ def main() -> int:
all_internal = False
if requires:
print(f"{key} is Required by:")
for name in requires:
print(f"- {key} is Required by: {name}")
print(f"- {name}")
if build_requires:
print(f"{key} is BuildRequired by:")
for name in build_requires:
print(f"- {key} is BuildRequired by: {name}")
print(f"- {name}")
if requires or build_requires:
print()