The NetBSD Project

CVS log for pkgsrc/pkgtools/pkg_install/files/info/perform.c

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / info

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 1 10:03:20 2020 UTC (22 months, 2 weeks ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, HEAD
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored)

pkg_install: Fix and speed up "pkg_admin rebuild-tree".

In the pkg_admin front end, instead of adding +REQUIRED_BY entries as they
are found, which previously led to duplicate entries, cache the results and
write out the files at the end.

Underneath, add a caching version of iterate_pkg_db() that avoids the same
pkgdb directory lookup for every installed package, but is only suitable for
reads.  Also add a cache for best_match lookups to avoid expensive matches
each time.

For all caches, use a simple hashing function to improve lookup performance.

In summary, as well as fixing +REQUIRED_BY files, these patches reduce the
wall/user/system time of "pkg_admin rebuild-tree" on a system with 12,762
packages installed down from 13m52s/11m20s/2m32s to just 1m4s/1m3s/0m1s.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Apr 19 21:42:50 2017 UTC (5 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.62: +13 -22 lines
Diff to previous 1.62 (colored)

pkg_install-20170419:
- Convert to libarchive 3.x interfaces, avoiding the legacy glue.
- Rename local copy of netpgpverify to match installed headers.
- Shuffle bootstrap code to reduce special cases in pkg_add.
- Always read/write file names in tar archives as binary. While they are
  supposed to be UTF-8, locale conversion creates more problems than it
  solves here.
- Fix const correctness in gpg_verify.
- Add format string annotation for xasprintf for GCC-like compilers.
- Restrict supported archive formats for binary packages to ar (signed
  packages) and tar (actual content) with uncompressed/gzip/bzip2/xz as
  compression choices. This reduces the exposed libarchive surface.
- The pkg-vulnerability file correspondingly supports only the same
  compression choices.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Dec 30 15:13:20 2014 UTC (7 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1
Changes since 1.61: +4 -7 lines
Diff to previous 1.61 (colored)

Remove pkg_views support, second part: infrastructure.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Feb 20 04:40:03 2010 UTC (12 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)

pkg_install-20100220:
Try harder to give the user an idea which file failed.
Addresses PR 42223.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jan 22 13:30:42 2010 UTC (12 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored)

pkg_install-20100122:
- Refactor man pages:
  - Move description of environmental variables into pkg_install.conf(5)
  - Remove a bunch of dead references
  - Avoid using hard-coded path names that can easily be overridden by
    the user.
- Refactor pkgdb related logic, so that -K behaves consistently.
- Add some helper functions to isolate more places from the pkgdb
  layout.
- Sync license list.
- Handle PKG_REFCOUNT_DBDIR consistently as option too.
- Utilize connection cache from libfetch.
- Add helper target for cat pages updates.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Aug 2 17:56:45 2009 UTC (12 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3
Changes since 1.58: +4 -13 lines
Diff to previous 1.58 (colored)

pkg_install-20090727:
Make pkg_install WARNS=4 clean and fix a number of lint warnings.
Based on reports from veego about warnings with older GCC releases in
pkg_delete, where a variable is potentially used uninitialized.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Sat Jul 25 19:20:05 2009 UTC (12 years, 9 months ago) by tron
Branch: pkgsrc-2009Q2
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored) next main 1.58 (colored)

Pullup ticket #2836 - requested by joerg
pkg_install: bug fix

Revisions pulled up:
- pkgtools/pkg_install/files/info/perform.c			1.58
- pkgtools/pkg_install/files/lib/license.c			1.7
- pkgtools/pkg_install/files/lib/pkg_install.conf.5.in		1.7
- pkgtools/pkg_install/files/lib/pkg_install.conf.cat5.in	1.7
- pkgtools/pkg_install/files/lib/version.h			1.132
---
Module Name:	pkgsrc
Committed By:	joerg
Date:		Fri Jul 24 19:06:45 UTC 2009

Modified Files:
	pkgsrc/pkgtools/pkg_install/files/info: perform.c
	pkgsrc/pkgtools/pkg_install/files/lib: license.c pkg_install.conf.5.in
	    pkg_install.conf.cat5.in version.h

Log Message:
pkg_install-20070724:
- license handling: accept upper case letters. Keep license checks
  case-sensitive as done in the older pkgsrc logic. Document this.
  OK dillo@, schmonz@, wiz@
- pkg_info:
  - fix handling of non-packages, that are valid archives
  - invert order of pkg_info -r to better match the expectations of
    make update.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Jul 24 19:06:45 2009 UTC (12 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored)

pkg_install-20070724:
- license handling: accept upper case letters. Keep license checks
  case-sensitive as done in the older pkgsrc logic. Document this.
  OK dillo@, schmonz@, wiz@
- pkg_info:
  - fix handling of non-packages, that are valid archives
  - invert order of pkg_info -r to better match the expectations of
    make update.

Revision 1.57 / (download) - annotate - [select for diffs], Wed May 27 20:26:03 2009 UTC (12 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q2-base
Branch point for: pkgsrc-2009Q2
Changes since 1.56: +11 -6 lines
Diff to previous 1.56 (colored)

pkg_install-20090527:
Try harder to mimic the old pkg_delete behavior and provide a
topologically sorted output for pkg_info -r. Bail out on dependency
cycles based on recursion depth, currently 64K.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Apr 22 19:18:06 2009 UTC (13 years ago) by joerg
Branch: MAIN
Changes since 1.55: +8 -6 lines
Diff to previous 1.55 (colored)

pkg_install-20090422:
Consider EOF during signature scan a fatal error. At the very least, the
package is missing the +CONTENTS file at that point. Correctly reset the
entry pointer in that case and make the meta data extraction stricter,
avoiding NULL dereferences for invalid archives.
Fixes pkg_info -X crash on empty files as reported by Daniel Horecki.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Mar 9 19:58:45 2009 UTC (13 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q1-base, pkgsrc-2009Q1
Changes since 1.54: +2 -3 lines
Diff to previous 1.54 (colored)

pkg_install-20090309:
Fix a double free. Reported by seb.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Mar 8 14:50:36 2009 UTC (13 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.53: +5 -9 lines
Diff to previous 1.53 (colored)

pkg_install-20090307:
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.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Mar 2 17:13:49 2009 UTC (13 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.52: +51 -3 lines
Diff to previous 1.52 (colored)

pkg_install-20090302:
Add new option -r to pkg_info, which works like -R, but expands it
recursively.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Feb 25 20:52:10 2009 UTC (13 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.51: +2 -4 lines
Diff to previous 1.51 (colored)

Be silent if querying a variable and no installed information exists.
"pkg_info -Q automatic foo" should not bitch.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 13 11:21:07 2009 UTC (13 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.50: +4 -8 lines
Diff to previous 1.50 (colored)

Close the archive on fatal errors during signature validation. This can
happen e.g. if pkg_add finds a directory with that name.
Remove a bunch of HAVE_SSL conditionals that no longer apply as GPG
support is back in.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Feb 11 23:51:30 2009 UTC (13 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.49: +13 -6 lines
Diff to previous 1.49 (colored)

Don't segfault if running pkg_info on a binary package without
+BUILD_INFO (or installed without +INSTALLED_INFO). Second half of
PR 30276.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 2 12:35:01 2009 UTC (13 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.48: +44 -50 lines
Diff to previous 1.48 (colored)

Merge pkg_install-20090201 from pkg_install-renovation branch.

- DB support is always included from libnbcompat if needed
- pkg_view and linkfarm are not installed any more; they are not moved
into the attic yet, so they can easily be installed as separte package
- common configuration file to customise the behavior of various
components; this supersedes the old audit-packages.conf
- support for PKSC7 signatures (using X509 certs) and GPG signatures for
packages in a secure way. See pkg_admin(8) for how to create them and
pkg_install.conf(5) for the options to use them
- audit-packages and download-vulnerability-list are wrapper scripts
  around pkg_admin. They try to mimic the classic options if used sanely.
  "pkg_admin audit" is now an order of magnitude faster than before
- pkg_add uses libarchive and libfetch instead of external ftp and tar:
  - progress bar is currently missing for downloads
  - "pkg_add -" is no longer supported
  - no adhoc check for conficts between dependencies and already
    installed packages
  - "pkg_add -s" has been replaced with an option in pkg_install.conf,
    verification of plain detached GPG signatures is no longer supported
  - optional check for vulnerabilities before adding a package
  - if /var and /usr/pkg are on different fileystems it is twice as fast
    now
  - conflicts due to overlapping plists are checked before installation
  - pkg_add no longer plays with the process limits
- pkg_add and pkg_delete have a new destdir option; scripts have to
  either be modified to use PKG_DESTDIR or should be disabled
- pkg_add -u for now can't be used to update to the exact same version
- internal "rm -rf" and "mkdir_p" code
- all memory allocation failures are not explicitly fatal
- if a file is not removed due to a failed checksum, still remove the
  entry from pkgdb

Revision 1.46.2.6 / (download) - annotate - [select for diffs], Mon Feb 2 11:55:16 2009 UTC (13 years, 3 months ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46.2.5: +2 -8 lines
Diff to previous 1.46.2.5 (colored) next main 1.47 (colored)

pkg_install-20090201:
- sync DESCR and MESSAGE with HEAD and the branch state
- sync Makefile
- regen configure
- cleanup __RCSID
- merge audit logic in pkg_add and pkg_admin into new audit_packages
function. As side effect, pkg_add will list all vulnerabilities before
asking the user whether it should continue
- sort config_variable array

Revision 1.46.2.5 / (download) - annotate - [select for diffs], Sun Aug 10 22:09:38 2008 UTC (13 years, 9 months ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46.2.4: +2 -3 lines
Diff to previous 1.46.2.4 (colored)

Explicitly initialise plist in parse_plist.

Revision 1.46.2.4 / (download) - annotate - [select for diffs], Sat Aug 2 20:33:50 2008 UTC (13 years, 9 months ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46.2.3: +8 -19 lines
Diff to previous 1.46.2.3 (colored)

Most memory allocation failures were fatal already and the majority of
the rest lacked an explicit check. Add the usual x* wrappers around
malloc and friends that explicitly terminate on error and use them in
all but Dewey.

Revision 1.46.2.3 / (download) - annotate - [select for diffs], Fri Jul 18 19:10:55 2008 UTC (13 years, 10 months ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46.2.2: +28 -5 lines
Diff to previous 1.46.2.2 (colored)

Make pkg_verify_signature return with modified arguments if it can find
a signed package, but couldn't validate the signature.
Make pkg_info try to validate the signature. It will print an error to
stderr if it can't validate the signature, but otherwise continue.

Revision 1.46.2.2 / (download) - annotate - [select for diffs], Fri May 23 15:36:48 2008 UTC (13 years, 11 months ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46.2.1: +3 -3 lines
Diff to previous 1.46.2.1 (colored)

Make sure to close the archive when not all required files where found.

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Sat Apr 26 17:44:23 2008 UTC (14 years ago) by joerg
Branch: pkg_install-renovation
Changes since 1.46: +9 -20 lines
Diff to previous 1.46 (colored)

Add a clean pkg_add implementation on top of libarchive and libfetch.
Known regressions:
- "pkg_add -" (aka reading from stdin) is currently not supported
- "pkg_add -s" is not supported either
- no progress reports for the downloads
- binary packages with hardlinks created by pkg_create before
  pkg_install-20080422 will not extract correctly (libarchive issue)
- no adhoc check for potential conflicts between dependencies and
  already installed packages

Features:
- Twice as fast for the typical case of /var/tmp and /usr/pkg on
  different filesystems
- Standalone
- implicit conflict detection before actual installation.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Apr 26 17:40:01 2008 UTC (14 years ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkg_install-renovation-base, cwrapper-base, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.47: +18 -7 lines
Diff to previous 1.47 (colored)

Revert last change, it was not intended to go into HEAD.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Apr 26 14:56:34 2008 UTC (14 years ago) by joerg
Branch: MAIN
Changes since 1.46: +9 -20 lines
Diff to previous 1.46 (colored)

Add a clean pkg_add implementation on top of libarchive and libfetch.
Known regressions:
- "pkg_add -" (aka reading from stdin) is currently not supported
- "pkg_add -s" is not supported either
- no progress reports for the downloads
- binary packages with hardlinks created by pkg_create before
  pkg_install-20080422 will not extract correctly (libarchive issue)
- no adhoc check for potential conflicts between dependencies and
  already installed packages

Features:
- Twice as fast for the typical case of /var/tmp and /usr/pkg on
  different filesystems
- Standalone
- implicit conflict detection before actual installation.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 4 15:21:32 2008 UTC (14 years, 1 month ago) by joerg
Branch: MAIN
Branch point for: pkg_install-renovation
Changes since 1.45: +25 -53 lines
Diff to previous 1.45 (colored)

pkg_install-20080404:
Switch pkg_info to use libfetch for remote access.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Mar 9 18:03:46 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2008Q1-base, pkgsrc-2008Q1
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

pkg_install-20080309:
- When loading meta data for a package and a file is needed for the
  current operation and is a required file, complain.
- Include the name of the package the meta data could not be loaded
  from.

This addresses PR 38166.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Feb 22 21:58:16 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.43: +35 -23 lines
Diff to previous 1.43 (colored)

pkg_install-20080223:
Redo the check for incomplete packages by annotating which meta data
field are required and count which were found during reading the binary
package. The original approach didn't work as loads from pkgdb are
reduced to the minimal set.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Feb 22 15:53:52 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.42: +12 -2 lines
Diff to previous 1.42 (colored)

pkg_install-20080222:
Free libarchive's side of the package before closing the file descriptor.
This stops leaking up to 1MB / package when using bzip2 and addresses
PR 38082. Check that at least +COMMENTS, +CONTENTS and +DESC can be
extracted, otherwise skip the entry. This stops pkg_info -X from dumping
core on non-package files.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Feb 5 18:57:09 2008 UTC (14 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.41: +5 -2 lines
Diff to previous 1.41 (colored)

Include fcntl.h for Solaris. From Andri Piik in private mail.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Feb 2 16:21:45 2008 UTC (14 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.40: +334 -161 lines
Diff to previous 1.40 (colored)

pkg_install-20080202:
Convert pkg_info to use libarchive instead of tar for binary package
handling. As a side effect pkg_info on remote packages will use
one FTP instance per argument, but will try to fetch only the meta data.
This reduces time for pkg_info -X on a full binary repository from 36.9s
to 18.1s for the cache hot case (PKG_TMPDIR on tmpfs for the old
pkg_info). Thanks to tnn@ for testing.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Aug 12 22:09:02 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3
Changes since 1.39: +35 -7 lines
Diff to previous 1.39 (colored)

pkg_admin: when retrying with a wildcard pattern, use the computed
pattern and not the base name.
pkg_info: add -E option to return the best matching installed package.

Bump to 20070813.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Aug 10 21:43:58 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

Not my day. If I write "return 0 when at least one match was found",
actually return 0...

Revision 1.38 / (download) - annotate - [select for diffs], Fri Aug 10 15:37:51 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.37: +44 -14 lines
Diff to previous 1.37 (colored)

Contrary to its comments, CheckForPkg is meant to print all matching
packages (see pkg_info -e). Restore this behaviour. Still print a
warning when the pkgdb can't be processed.

Reported by Daniel Horecki and pointed to the option by tnn@.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 9 23:54:17 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Make var_set and var_get arguments always use full path names.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Aug 9 23:18:30 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.35: +17 -31 lines
Diff to previous 1.35 (colored)

Change interface of is_automatic_installed and
mark_as_automatic_installed to take a package name and not a full path.
Add assertions to test for this.

Drop a few islinktodir checks.

Change pkg_info to use iterate_pkg_db instead of scanning the directory
by hand. As a side effect don't try to check for the pkgdb dir first,
let pkgdb_dump and iterate_pkg_db handle that.

Make pkgdb_dump return failure if it can't open the package db.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Aug 9 23:06:42 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

Pass a number of strings around as const char *.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 9 12:53:35 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

When matching a non-pattern (aka a base name), assign the correct
variable. This fixes pkg_info -e and in turn pkg_tarup.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Aug 8 22:33:39 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.32: +31 -65 lines
Diff to previous 1.32 (colored)

Replace note_whats_installed, add_to_list_fn and generally most
users of findbestmatchingname and findmatching name with more
descriptive and easier to use iterator functions. This functions
are a first step to abstract away pkgdb layout from most parts of
the code. It also helps to reduce side effects and point out potential
bugs in this code.

Fix a potential, but practically irrelevant buffer overflow.

No longer allow symbolic links directly in pkgdb to store the meta
data of individual packages outside. E.g. /var/db/pkg/atk-1.18.0
must be a directory and not point to it. This is not yet enforced in
all parts of the code, more changes will follow.

Bump version to 20070808.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jul 26 11:30:56 2007 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.31: +2 -11 lines
Diff to previous 1.31 (colored)

After the obsoletion on March, remove the support for require scripts.
Also remove the documentation of the mtree parts as it is not supported.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 20 22:22:52 2007 UTC (14 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Split pattern related functions from lib/str.c off into lib/opattern.c.
Rename pmatch to pkg_match and add new function pkg_order that
implements the order logic used by pkg_add internally.

Change the interface of findmatchingname's callback to take the pattern
used for the matching as first argument. The new pkg_order function
takes it and it doesn't hurt in other cases. Adjust callers and
corresponding callbacks accordingly.

Remove an unused matchfn typedef in dewey.c.

Bump to 20070720. OK jlam@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Mar 11 22:05:03 2007 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1
Changes since 1.29: +8 -5 lines
Diff to previous 1.29 (colored)

Sync with NetBSD base version:
- obsolete support for require scripts
- nuke support for the following options of pkg_create:
  -X (excludefile)
  -r (require script)
  -h (Force follow symlink)
- add option for pkg_create to specify additional @blddep packages.

This brings us to version 20070308.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jul 1 19:37:25 2006 UTC (15 years, 10 months ago) by dillo
Branch: MAIN
CVS Tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, pkgsrc-2006Q2-base, pkgsrc-2006Q2
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Pull across from source:
Fix pkg_info -Q on binary packages; noted by rillig.
Bump version to 20060701.

Okayed during freeze by wiz.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 24 13:52:05 2006 UTC (16 years ago) by dillo
Branch: MAIN
Changes since 1.27: +13 -6 lines
Diff to previous 1.27 (colored)

Sync with src, version 20060424:
	Add support for creating summary file containing all information
	about a package repository needed by package managing software.
	This allows better use of remote binary package repositories.

	Discussed on tech-pkg.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 4 06:28:22 2006 UTC (16 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

Pull over v1.68 from src/usr.sbin:
revision 1.68
date: 2006/03/17 02:31:44;  author: hubertf;  state: Exp;  lines: +4 -3
pkg_do(): only use cp2 if it's really set to something useful

Coverity CID 1176

Revision 1.26 / (download) - annotate - [select for diffs], Tue Nov 22 15:44:59 2005 UTC (16 years, 5 months ago) by ben
Branch: MAIN
CVS Tags: pkgsrc-2006Q1-base, pkgsrc-2006Q1, pkgsrc-2005Q4-base, pkgsrc-2005Q4
Changes since 1.25: +40 -20 lines
Diff to previous 1.25 (colored)

Reduce the use of the system() function in pkg_install to avoid quoting
problems.  Instead, use exec*() functions.

Replace PUSHOUT() macro and string buffers with a function that
operates on data structures.

If it is necessary to copy files into place from staging area, then use
pax to copy them.

Add functions in pexec.c to create a pipe for sending data to a child
process.  Replace pipe code in create/perform.c with these functions.
Use these functions instead of command-line arguments when copying files
into place from staging area.

Three system() references remain: @exec, @unexec, and vsystem().

Revision 1.25 / (download) - annotate - [select for diffs], Mon Nov 14 09:42:38 2005 UTC (16 years, 6 months ago) by dillo
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Sync with src/usr.sbin/pkg_install:

Fix first part of PR 32068: pkg_info -Q broken for local binary packages
        Add BUILD_INFO_FNAME to the files to extract for SHOW_BI_VAR.
Bump version.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Nov 7 23:51:14 2005 UTC (16 years, 6 months ago) by dillo
Branch: MAIN
Changes since 1.23: +2 -4 lines
Diff to previous 1.23 (colored)

Update to 20051107: Fix pkg_info -B against binary packages.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 5 13:20:09 2005 UTC (16 years, 6 months ago) by wiz
Branch: MAIN
Changes since 1.22: +47 -22 lines
Diff to previous 1.22 (colored)

Sync with base system as of Sat Nov  5 13:19:32 UTC 2005.
Welcome to 20051103!
Now with "automatic" support.

Revision 1.22 / (download) - annotate - [select for diffs], Mon May 30 13:23:32 2005 UTC (16 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2005Q3-base, pkgsrc-2005Q3, pkgsrc-2005Q2-base, pkgsrc-2005Q2
Changes since 1.21: +15 -15 lines
Diff to previous 1.21 (colored)

Update to 20050530:
Sync with base system: Ranges support and some other stuff that wasn't
pulled over.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Feb 21 01:21:39 2005 UTC (17 years, 3 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2005Q1-base, pkgsrc-2005Q1
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

sync with src:

initialise a variable before using it. pkg_info binpkg.tgz would pass
garbage on the command line to tar(1).

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 10 23:51:18 2005 UTC (17 years, 3 months ago) by grant
Branch: MAIN
Changes since 1.19: +4 -16 lines
Diff to previous 1.19 (colored)

pull in binary pkg handling changes from src:

rework pkg_info(8) operating on binary packages, deprecating the `-.'
argument as it is no longer required (but is retained as a no-op for
backward compatibility).

the behaviour is now what is expected and intended:

        - when the pkg argument is path (absolute or relative) to a
          binary pkg, pkg_info operates on it.
        - when no pkg argument is given, or the argument is not a
          binary pkg path, pkg_info operates on the installed packages.

`pkg_info foo-1.0.tgz', `pkg_info /path/to/foo-1.0.tgz', etc. now work
correctly when foo-1.0.tgz is in the cwd.

bump PKGTOOLS_VERSION to 20050210.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Feb 4 01:19:04 2005 UTC (17 years, 3 months ago) by jlam
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

Pull in documentation/whitespace fixes and improvements from the HEAD
revision of src/usr.sbin/pkg_install as of 20050204.  I ran:

	cd pkgsrc/pkg_install/files
	./pkg_install2nbcompat .

Then I ran "cvs diff" and looked for portability-related changes that
were removed as a result of the import and resurrected them from the
repository.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Dec 29 12:16:56 2004 UTC (17 years, 4 months ago) by agc
Branch: MAIN
Changes since 1.17: +14 -14 lines
Diff to previous 1.17 (colored)

Pull in portability changes from src, and bump version to 20041226:

	Introduce a new abstraction in the C code, called MaxPathSize.  All
	previous occurrences of MAXPATHLEN and FILENAME_MAX have been changed
	to use MaxPathSize instead.

	If MAXPATHLEN is not defined, then assume a default value of 1024
	(this is primarily for use on the Hurd).

	The reason for this is that some older platforms define FILENAME_MAX
	to be 14, although MAXPATHLEN is 1024. On BSD-derived systems,
	FILENAME_MAX And MAXPATHLEN are both 1024.

	Bump pkg_install version to 20041226.

	These modifications have been tested so far on a NetBSD-current bulk
	build.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Nov 2 00:44:00 2004 UTC (17 years, 6 months ago) by erh
Branch: MAIN
CVS Tags: pkgsrc-2004Q4-base, pkgsrc-2004Q4
Changes since 1.16: +6 -5 lines
Diff to previous 1.16 (colored)

Merge the usedot and ctype-function changes from src.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Aug 20 20:09:53 2004 UTC (17 years, 9 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2004Q3-base, pkgsrc-2004Q3
Changes since 1.15: +32 -5 lines
Diff to previous 1.15 (colored)

Update pkgtools/pkg_install to 20040813 (latest release from the HEAD
branch of src).  Changes from version 20040730 include:

Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on
the command line. If no -. is given, pkg_info will look for its
information in the ${PKG_DBDIR}.  This addresses a long-held gripe on
the part of a number of people, including myself (agc), which completely
violated the POLS.

Add a -q switch to pkg_admin, which allows it to work in a quiet
manner.  Fixes the change request in PR 26583, but in a different
manner, preserving existing behaviour and making the new behaviour
dependent upon a command line option.

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 7 16:40:41 2004 UTC (18 years ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2004Q2-base, pkgsrc-2004Q2
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored)

Import pkg_install-20040507 from src/usr.sbin/pkg_install:

Add a new flag -Q (for "query") to pkg_info(1) to query the build
information for the definitions of specific variables that were saved
from build time, e.g.

	$ pkg_info -Q PKGPATH glib
	devel/glib
	$ pkg_info -Q PROVIDES glib
	/usr/pkg/lib/libglib.so.13
	/usr/pkg/lib/libgmodule.so.13
	/usr/pkg/lib/libgthread.so.13

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 20 04:23:05 2003 UTC (18 years, 5 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2004Q1-base, pkgsrc-2004Q1
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Sync pkgtools/pkg_install with src/usr.sbin/pkg_install from 20031220.
New features include OS/arch/version checking and a large speed
improvement to pkg_info.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Sep 23 13:22:40 2003 UTC (18 years, 7 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2003Q4-base, pkgsrc-2003Q4
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

sync with NetBSD-current after updates from wiz.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 23 07:13:51 2003 UTC (18 years, 8 months ago) by grant
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

sync with NetBSD-current's pkg_install-20030923.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Sep 10 17:31:49 2003 UTC (18 years, 8 months ago) by jlam
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Pull in rev 1.49 of perform.c from src/usr.sbin/pkg_install/info.  This
fixes a bug where the pkg_dbdir could no longer be a symlink to a
directory.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 9 13:34:21 2003 UTC (18 years, 8 months ago) by jlam
Branch: MAIN
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored)

Bump version to 20030907.  Changes from previous version include:

    * Teaching pkg_add(1) to be smarter about how to add a depoted packge.

    * "pkg_delete foo" only deletes foo if it's a unique package.

    * Make "pkg_delete -O foo" for delete file entries for foo from
      pkgdb.byfile.db actually work.

    * Teach pkg_admin(1) two new commands "add" and "delete" for working
      with pkgdb.byfile.db.

    * pkg_view(1) uses the new pkg_admin(1) commands to keep the
      pkgdb.byfile.db files consistent in each view.

    * Man page fixes.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Sep 2 08:28:28 2003 UTC (18 years, 8 months ago) by jlam
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Sync to latest pkg_install sources from the HEAD for pkg_delete
optimizations and man page fixes.  Also use recent src2nbcompat to reverse
the order that "config.h" and <nbcompat.h> are included in *.[ch] files.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 1 16:27:13 2003 UTC (18 years, 8 months ago) by jlam
Branch: MAIN
Changes since 1.7: +31 -28 lines
Diff to previous 1.7 (colored)

Update pkg_install to 20030823, which has the changes to support
package views.  Pkgsrc changes include:

* Convert to use pkgtools/libnbcompat so that it's easier to keep
  this in sync with src/usr.sbin/pkg_install.

* Add a src2nbcompat script that converts src/usr.sbin/pkg_install
  into an appropriate start for pkgtools/pkg_install.  The script
  removes the Makefiles, adds CPP inclusion guards around each
  #include <...> line, and includes <nbcompat.h> at the top of each
  *.c file.  This should make it even easier to keep sources in
  sync with the HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Mar 29 18:41:56 2003 UTC (19 years, 1 month ago) by jschauma
Branch: MAIN
Changes since 1.6: +9 -5 lines
Diff to previous 1.6 (colored)

Synch with main sources:

Changes by hubertf and seb; these changes tested on NetBSD, Linux and Irix.

Modified Files:
	src/usr.sbin/pkg_install/add: perform.c pkg_add.1

Log Message:
Implement remaining TODO item in pkg upgrade (pkg_add -u):
* Upgrade step 1/4: Check if the new version is ok with all pkgs
* (from +REQUIRED_BY) that require this pkg

Inspired by bsd.pkg.mk's upgrade(?) target.

Modified Files:
	src/usr.sbin/pkg_install/admin: main.c
	src/usr.sbin/pkg_install/info: main.c perform.c

Log Message:
Consistently check findmatchingname() return value for error condition.
Among other this fixes 'pkg_info -e whateverpkg' exit status when
/var/db/pkg is missing: it is now 1 and not 0.

Modified Files:
	src/usr.sbin/pkg_install/lib: version.h

Log Message:
Bump to "20030325" after today's changes from seb and me

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 16 19:44:09 2003 UTC (19 years, 2 months ago) by jschauma
Branch: MAIN
Changes since 1.5: +4 -12 lines
Diff to previous 1.5 (colored)

Sync with main sources:

Date:           Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
	pkgdb_open
	{ pkgdb_iter, pkgdb_retrieve }
	pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.

Date:           Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.

Date:           Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 14 15:18:34 2003 UTC (19 years, 4 months ago) by jschauma
Branch: MAIN
CVS Tags: netbsd-1-6-1-base, netbsd-1-6-1
Changes since 1.4: +8 -2 lines
Diff to previous 1.4 (colored)

Synch with latest changes from src (changes by agc, synch ok'd by agc)
----------------------------------------------------------------------

Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).

Bump lib/version.h due to added functionality.


Order the getopt(3) options alphabetically.


Introduce the notion of "preserving" an installed package.

A preserved package may not be deleted by pkg_delete(1) (unless the -f
option is given), and the preserved capability will be carried into
any binary package. pkg_add(1) will also keep the preserved capability
if it was present in the binary package.

The "preserve" capability can be given to a package by using the
PKG_PRESERVE definition in a package Makefile in pkgsrc.

Ride on the recently-bumped lib/version.h for new functionality.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 7 16:43:57 2003 UTC (19 years, 4 months ago) by jschauma
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

``On second thought, let's not go to Camelot.  It is a silly place.''

(Make pkdb_open return pkgdbp!=NULL as src's does, and revert previous
patch.  As discussed with agc.)

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 7 16:10:03 2003 UTC (19 years, 4 months ago) by jschauma
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Unlike pkg_install in src, this version of pkg_install contains
a pkgdb_open that may return one of _three_ values (0,1,-1), so that
we can not simply use
if (!pkgdb_open(ReadOnly))
but need to use
if (pkgdb_open(ReadOnly) == -1)

Mea culpa.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 6 04:34:16 2003 UTC (19 years, 4 months ago) by jschauma
Branch: MAIN
Changes since 1.1: +5 -5 lines
Diff to previous 1.1 (colored)

Synch with basesrc:
Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and
errx(3).

Plug a memory leak by modifying the signature of
_pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that
buffer and return it.

Add an enumerated type which is used in pkgdb_open() to specify
read-only or read-write mode.

Modify the return value of pkgdb_open() to have a more logical boolean
value.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Fri Dec 20 18:14:13 2002 UTC (19 years, 5 months ago) by schmonz
Branch: TNF
CVS Tags: pkgsrc-base
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import autoconf'd pkg_install source from
othersrc/bootstrap-pkgsrc/pkg_install into ${FILESDIR}.

Using autoconf greatly simplifies maintenance of this package across
multiple platforms. Placing the extracted source under ${FILESDIR}
will eventually let us use the same source for bootstrapping as
well, though we're not ready for this yet.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Dec 20 18:14:13 2002 UTC (19 years, 5 months ago) by schmonz
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>