Page MenuHomeFreeBSD

nanobsd: enhance fill_pkg.sh
ClosedPublic

Authored by imp on Jul 7 2021, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 5:34 PM
Unknown Object (File)
Mon, Apr 8, 6:19 PM
Unknown Object (File)
Mon, Apr 8, 1:21 PM
Unknown Object (File)
Feb 6 2024, 1:31 PM
Unknown Object (File)
Jan 26 2024, 5:22 PM
Unknown Object (File)
Dec 20 2023, 12:34 AM
Unknown Object (File)
Dec 16 2023, 9:59 AM
Unknown Object (File)
Dec 12 2023, 6:37 AM
Subscribers
None

Details

Summary

NanoBSD has helper script "fill_pkg.sh" which links all packages andther dependencies from "package dump" (like /usr/ports/packages/All) tospecified director. fill_pkg.sh has some limitations:

  1. It needs ports tree, which should have exactly same versions as "package dump".
  2. It requires full paths to needed ports, including "/usr/ports" part.
  3. It has assumptions about Nano Package Dir (it assumes, that it specified rtelative to current directory).
  4. It does not have any diagnostics (almost).

This PR enhances "fill_pkg.sh" script in several ways:

  1. Nano package dir could be absolute path.
  2. Script understands four ways to specify "root" ports/packages: (a) Absolute directory with port (old one) (b) Relative directory with port, relative to ${PORTSDIR} or /usr/ports (c) Absolute path to file with package (with .tbz suffix) (d) Name of package in dump dir, with or without .tbz suffix

    These ways can be mixed in one call. Dependencies for packages are obtained with 'pkg_info -r' call, and are searched for in same directory as "parent" package. Dependencies for ports are obtained in old way from port's Makefile.
  3. Three levels of diagnostic (and -v option, could be repeated) are added.
  4. All path variables are enclosed in quotes, to make script work with paths, containing spaces.

Note: imp merged in the changes to fill_pkg.sh since this has been a PR.

PR: 151695

Test Plan

lev: please let me know if you have a newer rev.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40380
Build 37269: arc lint + arc unit

Event Timeline

imp requested review of this revision.Jul 7 2021, 9:39 PM
imp created this revision.
imp retitled this revision from NanoBSD has helper script "fill_pkg.sh" which links all packages and ther dependencies from "package dump" (like /usr/ports/packages/All) to specified director. fill_pkg.sh has some limitations: to NanoBSD has helper script "fill_pkg.sh" which links all packages andther dependencies from "package dump" (like /usr/ports/packages/All) tospecified director. fill_pkg.sh has some limitations:.Jul 7 2021, 9:40 PM
imp edited the test plan for this revision. (Show Details)
imp added reviewers: phk, lev.
imp retitled this revision from NanoBSD has helper script "fill_pkg.sh" which links all packages andther dependencies from "package dump" (like /usr/ports/packages/All) tospecified director. fill_pkg.sh has some limitations: to nanobsd: enhance fill_pkg.sh.Jul 8 2021, 10:36 PM
imp edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Jul 11 2021, 3:07 PM
Closed by commit rG36cfb5d50f8e: nanobsd: enhance fill_pkg.sh (authored by lev, committed by imp). · Explain Why
This revision was automatically updated to reflect the committed changes.