Commit Graph

8 Commits

Author SHA1 Message Date
Ed Maste
0e04dd3b66 pkgbase: report error if files are installed multiple times
Files installed by `make installworld` should be installed only once.

PR:		244596
Sponsored by:	The FreeBSD Foundation
2023-05-09 21:10:03 -04:00
Ed Maste
2a3bd08708 pkgbase: hide duplicate METALOG directory warnings under verbose
Creating directories multiple times is an inherent side effect of the
way installation is done.  Hide warnings from duplicate directory
entries (with identical metadata) under metalog_reader's verbose mode.

Duplicate file entries are always reported.  They currently generate
warnings but will be switched to errors once the few instances currently
in the tree are fixed.

PR:		244596, 271178
Reviewed by:	kevans
Sponsored By:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39898
2023-05-01 15:22:36 -04:00
Ed Maste
f93d92f43d pkgbase: report errors via metalog reader exit status
Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37482
2022-11-25 09:13:31 -05:00
Ed Maste
1f3b4f38a6 Update pkgbase metalog tool README to match installed filename
The pkgbase metalog tool is named metalog_reader.lua.  (One may argue
that a better name could be chosen, but the README should match in any
case.)

Sponsored by:	The FreeBSD Foundation
2022-11-18 15:11:52 -05:00
Ed Maste
b751fc75bb pkgbase: report type for duplicated METALOG entries
Duplicate METALOG file entries are more of a concern than duplicate
directories.  The metalog check tool previously did not include the
entry type in the warnings, making it hard to find the ones of concern.

Sponsored by:	The FreeBSD Foundation
2022-11-17 10:28:06 -05:00
Ed Maste
bca4d27052 pkgbase: examine METALOG files relative to stage root directory
Previously we stripped the '.' from the beginning of each METALOG entry
to determine the path to stat.  This meant that we examined files on the
build host, not the staged files.

Instead, strip off the last part of the specified METALOG pathname to
find the stage root directory, and stat files relative to that.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37412
2022-11-17 08:52:12 -05:00
Gordon Bergling
eec4f5c034 pkgbase: Fix a typo in a source code comment
- s/begining/beginning/

MFC after:	3 days
2022-03-28 19:33:25 +02:00
Ed Maste
060a805b2f Add pkgbase METALOG parse/check tool
`metalog.lua` is a script that reads METALOG file created by pkgbase
(make packages) and generates reports about the installed system
and issues.

This was developed as part of Yang's W2020 University of Waterloo co-
operative education term with the FreeBSD Foundation.  kevans provided
some initial review; we will iterate on it in the tree.

Submitted by:	Yang Wang <2333@outlook.jp>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24563
2020-05-10 16:11:19 +00:00