Don't use getopt_long as replacement for getopt. It behaves different
and doesn't work well in combination with optreset. Instead use
getopt(3) from NetBSD if requested. Sync getopt_long.c with NetBSD while
here. Addresses issues with pkg_admin on Solaris reported by Tim Zingelman.
Important changes since 4.90:
- Fixed some issues with "package has been downgraded" warnings.
- The doc/CHANGES-* files can be checked individually now.
- Emit a warning if a package does not define PKG_DESTDIR_SUPPORT.
- In patch files, warnings about absolute pathnames, CPP macros and the
like are only emitted if the line starts with a "+". If the -Wextra
option is given, the context lines (starting with a " ") are also
checked.
- Added support for the new buildlink3.mk format.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
patch files. Up to now, the lines that only provide the context for the
patches have been checked for absolute pathnames and the like. Now, only
those lines that really add something to the patched file are checked.
The context lines are checked when the -Wextra option is given.
While here, added some comments to help me understand the code that I
wrote years ago.
Simplify archive handling by depending on archive_read_finish and the
close callback where needed. Fixes a file descriptor leak as side
effect as reported by wiz.
terminate the shell due to "set -e" when the [ ... ] part is false.
This behaviour seems correct to me, but I can't explain why this code
doesn't fail with our /bin/sh.
Integrate the PKG_PATH logic for tightly with the find_archive logic:
- remember initial current working directory from the time PKG_PATH is
processed, it will be used as reference for all relative entries
- remove now redundant fchdir dance in pkg_add
- pass down to find_archive if this is a top-level package (e.g.
requested on the command line) or not; the location of top-level
packages is searched for packages first and for URLs or path names the
PKG_PATH itself is not processed (e.g. pkg_add foo/bar not look into
PKG_PATH for bar). This addresses PR 33884 in a different way.
- document the rules for finding packages more explicitly
- allow specifying PKG_PATH in pkg_install.conf as well; environment
takes precendence.
- remove PKG_PATH related logic in pkg_info(1), it doesn't deal with
PKG_PATH anyway
- remove PKG_PATH, PKG_TMPDIR and TMPDIR description in pkg_info(1),
they are no longer used
Always try to preserve the +PRESERVE file from the old package, even
when the new one has one as well. This fixes the update case for the
special case of pkg_install itself as reported by tron@.
Rewrite pkg_delete to expand the list of packages to delete first and
reorder it if necessary. It will bail out if it knows in advance that it
can't remove a package. It will also fail for errors while removing one
package, unless forced. Add an option to remove automatically installed
packages that are no longer used.
The pkgviews support is kept, but untested. The error handling for
pkgviews most of all is as weak as before.
Basic review from hubertf@, man page changes by bad@.
ending in .tbz as well as .tgz. Should address the problem reported
in PR pkg/40515. I am explicitly not using the mk.conf settings
for PKG_SUFX though because at run time we may or may not have a valid
mk.conf on hand that corresponds to how the packages were built.
- At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
which means (void)fwrite(...) will *always* generate a warning, so
set -Wno-error to bypass this in Linux.sys.mk
- Ubuntu 8.1 also jumps through hoops to ensure ARG_MAX is *undefined*, so
work around this in tnftp and libnbcompat
Changes since 0.4.2:
- added -c list-file (seb@)
- no more MASTER_SITES, using files/ instead
- removed README in favor of a man page
- corrected pkglint(1) warning about multi-line SUBST_SED
OK'd by cube@
Fix pkg_delete -d:
- ignore @dirrm commands, directories are removed already on demand
- use local copy of dir before changing it, the caller expects it
unmodified for the call to pkgdb_remove
Print the error about missing build information even when the
+BUILD_INFO file is missing instead of segfaulting. The problem is from
PR 30276, a solution in the form of just installing it will not be
implemented.