[PATCH 1/3] reports.mk: factor out reports/packages
Michael Shigorin
mike at altlinux.org
Wed Apr 28 14:48:59 MSK 2021
...making it fit 80 columns while at that
to avoid horizontal spaghetti code.
---
reports.mk | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/reports.mk b/reports.mk
index 9efa4f885..0e44c4471 100644
--- a/reports.mk
+++ b/reports.mk
@@ -26,7 +26,8 @@ define report_body
fi; }
endef
-all: reports/targets reports/scripts reports/cleanlog reports/contents
+all: reports/targets reports/scripts reports/cleanlog \
+ reports/contents reports/packages
@if [ -n "$(IMAGE_OUTPATH)" ]; then \
rm -fr "$(LOGDIR)/$(IMAGE_OUTFILE).reports"; \
cp -a "$(REPORTDIR)" "$(LOGDIR)/$(IMAGE_OUTFILE).reports"; \
@@ -75,10 +76,16 @@ reports/contents: reports/prep
echo "reports.mk: missing isoinfo" >&2; \
fi; \
esac
- @cat $(BUILDLOG) | grep -E 'chroot/.in/[^/]*.rpm' | cut -d' ' -f 1 | tr -d "'"'`' | \
- rev | cut -d'/' -f 1 | rev | sort -u > "$(REPORTDIR)/list-rpms.txt"
- @cat $(BUILDLOG) | grep -E 'chroot/.in/[^/]*.rpm' | cut -d' ' -f 1 | tr -d "'"'`' | \
- xargs rpm -qp --queryformat '%{sourcerpm}\n' | sort -u > "$(REPORTDIR)/list-srpms.txt"
+
+reports/packages: reports/prep
+ @grep -E 'chroot/.in/[^/]*.rpm' < $(BUILDLOG) | \
+ cut -d' ' -f 1 | tr -d "'"'`' | \
+ rev | cut -d'/' -f 1 | rev | \
+ sort -u > "$(REPORTDIR)/list-rpms.txt"
+ @grep -E 'chroot/.in/[^/]*.rpm' < $(BUILDLOG) | \
+ cut -d' ' -f 1 | tr -d "'"'`' | \
+ xargs rpm -qp --queryformat '%{sourcerpm}\n' | \
+ sort -u > "$(REPORTDIR)/list-srpms.txt"
else
all:; @:
--
2.25.4
--vtzGhvizbBRQ85DL
Content-Type: text/x-patch; charset=us-ascii
Content-Disposition: attachment; filename="0002-reports.mk-streamline-basedir-1-equivalent.patch"
More information about the devel-distro
mailing list