Page MenuHomeFreeBSD

nanobsd: Update fill_pkg.sh
ClosedPublic

Authored by jlduran on Tue, Nov 12, 8:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 8:27 AM
Unknown Object (File)
Sat, Nov 16, 8:26 AM
Unknown Object (File)
Fri, Nov 15, 5:43 AM
Unknown Object (File)
Thu, Nov 14, 9:54 AM
Unknown Object (File)
Wed, Nov 13, 3:40 AM
Unknown Object (File)
Wed, Nov 13, 3:12 AM
Unknown Object (File)
Wed, Nov 13, 2:42 AM
Subscribers
None

Details

Summary

fill_pkg.sh is a script that links a package and its dependencies from a
"package dump" directory (like /usr/ports/packages/All) to a specified
directory (NANO_PACKAGE_DIR), for cust_pkgng()[*].

Update the script by:

  • Using make package-name instead of make -V pkgname
  • Looking for package files with *.pkg instead of *.txz
  • Adding a -c option that copy the files instead of linking them[*]
  • After 9af130ae8c03 cust_pkgng() cannot be used with a directory

populated by fill_pkg.sh, because it uses a nullfs mount, which don't
follow symlinks, therefore the links inside NANO_PACKAGE_DIR will not
work. I would prefer to just copy, and never symlink, but I leave this
decision to the reviewers.

PR: 269884

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jlduran created this revision.

These changes look good. thanks!

tools/tools/nanobsd/fill_pkg.sh
56

So I know this suggestion is a bigger change...

But we've started preferring $(foo) to foo where possible, and here it's completely possible.

The two should be nearly identical, and I think are for all the uses in this review.

So maybe as a separate commit later?

This revision is now accepted and ready to land.Tue, Nov 12, 9:59 PM
tools/tools/nanobsd/fill_pkg.sh
56

Yes, I'm planning to propose a "shellcheck" commit at the end that catches all these suggestions. Thank you!

This revision was automatically updated to reflect the committed changes.