tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_info -X: Add FILE_CKSUM (sha256)



> Date: Thu, 15 Jan 2026 23:36:36 +0100
> From: Thomas Klausner <wiz%netbsd.org@localhost>
> 
> Are there any common tasks that call 'pkg_info -X' and will now be
> slowed down because every file listed in the summary file will now be
> read?

I searched pkgsrc for the case-insensitive pattern

pkg.info.*-[^[:space:]]*X

and turned up the following cases:

mk/scripts/binpkg-cache:				$if_debug echo "${PKG_INFO} -X ${f}"
mk/scripts/binpkg-cache:				${PKG_INFO} -X ${f} >> ${tmpd}/${summaryfile}
pkgtools/pbulk/files/pbulk/scripts/build:sed 's/$/.tgz/' < ${loc}/success | sort | xargs ${pkg_info} -X | ${gzip} -c > pkg_summary.gz
pkgtools/pkg_chk/files/pkg_chk.sh:    list_bin_pkgs | ${XARGS} ${PKG_INFO} -X
pkgtools/pkg_comp1/files/pkg_comp.sh:    for pkg in "${directory}"/*.tgz; do pkg_info -X "${pkg}"; done \
pkgtools/pkg_install/files/info/main.c:	    "usage: pkg_info [-BbcDdFfhIikLmNnpqRrSsVvX] [-E pkg-name] [-e pkg-name]",
pkgtools/pkg_install/files/lib/pkg_summary.5:.Dl "pkg_info -X -a"
pkgtools/pkg_install/files/lib/pkg_summary.cat:     The ppkkgg__ssuummmmaarryy file can be generated using the pkg_info(1) --XX option.
pkgtools/pkg_install/files/lib/pkg_summary.cat:           pkg_info -X -a

In brief:

- binpkg-cache
- pbulk build scrript
- pkg_chk
- pkg_comp
- pkg_install documentation

Of these cases, only pkg_chk will ignore the FILE_CKSUM line when it
immediately consumes the pkg_info -X output; the others produce a
whole pkg_summary file on output.

However, it looks like the only reason pkg_chk runs pkg_info -X at all
is to get a list of (pkgname, pkgpath) pairs, which it then maps into
a table of `pkgpath: pkgname1 pkgname2 ...' rows.  So perhaps we could
just do that another way.


Home | Main Index | Thread Index | Old Index