The NetBSD Project

CVS log for pkgsrc/pkgtools/pkg_install/files/lib/pkgdb.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Dec 18 17:10:54 2020 UTC (5 years, 10 months ago) by maya
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3, pkgsrc-2026Q2-base, pkgsrc-2026Q2, pkgsrc-2026Q1-base, pkgsrc-2026Q1, pkgsrc-2025Q4-base, pkgsrc-2025Q4, pkgsrc-2025Q3-base, pkgsrc-2025Q3, pkgsrc-2025Q2-base, pkgsrc-2025Q2, pkgsrc-2025Q1-base, pkgsrc-2025Q1, pkgsrc-2024Q4-base, pkgsrc-2024Q4, pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, 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, HEAD
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +23 -11 lines
pkg_install-20201218

- Support continuing to install to /var/db/pkg if it exists and the
new pkgdb doesn't.
In the future, we can warn about this once we have tested advice that
we can give to users who want to move the location of pkgdb.

- Don't do anything about /var/db/pkg on non-NetBSD-base.
This creates conflicts with other package managers that also install to
/var/db/pkg.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Dec 5 16:17:41 2020 UTC (5 years, 11 months ago) by wiz
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +5 -4 lines
pkg_install: update to 20201205

Improve warning about old database to mention moving the refcount db too.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Dec 2 10:22:39 2020 UTC (5 years, 11 months ago) by wiz
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +17 -7 lines
*: move default database directory from /var/db/pkg to ${PREFIX}/pkgdb

As discussed in August 2020 and previously on pkgsrcCon 2019.

Ok pkgsrc-pmc@

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Apr 20 21:22:38 2010 UTC (16 years, 7 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, 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, 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, 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
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
pkg_install-20100421:
Fix an off-by-one in the check for properly sized pkgdb entries.
It rejected perfectly valid entries.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Apr 14 18:24:58 2010 UTC (16 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +14 -6 lines
pkg_install-20100405:
- Try to detect common forms of pkgdb corruption and issue a warning in
  that case.
- Refactor the pkg_vulnerabilities logic to use the compression support
  from libarchive. This reduces the amount zlib/bzip2 interaction to the
  linkage.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Jan 22 13:30:42 2010 UTC (16 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2010Q1-base, pkgsrc-2010Q1
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +39 -33 lines
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.35.2.1: download - view: text, markup, annotated - select for diffs
Fri Oct 23 10:28:23 2009 UTC (17 years ago) by tron
Branches: pkgsrc-2009Q3
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +9 -5 lines
Pullup ticket #2921 - requested by joerg
pkg_install: bug fix

Revisions pulled up:
- pkgtools/pkg_install/files/lib/pkgdb.c	1.36
- pkgtools/pkg_install/files/lib/version.h	1.142
---
Module Name:	pkgsrc
Committed By:	joerg
Date:		Thu Oct 22 22:51:29 UTC 2009

Modified Files:
	pkgsrc/pkgtools/pkg_install/files/lib: pkgdb.c version.h

Log Message:
pkg_install-20091009:
Do not overwrite a string with itself using snprintf. This breaks
setting the pkgdb directory internally on Linux. Explicitly check
if the string is the same and otherwise just use xstrdup.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Oct 22 22:51:29 2009 UTC (17 years ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2009Q4-base, pkgsrc-2009Q4
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +9 -5 lines
pkg_install-20091022:
Do not overwrite a string with itself using snprintf. This breaks
setting the pkgdb directory internally on Linux. Explicitly check
if the string is the same and otherwise just use xstrdup.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Sep 11 18:00:13 2009 UTC (17 years, 2 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2009Q3-base
Branch point for: pkgsrc-2009Q3
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -7 lines
pkg_install-20090911:
- Cleanup configure.ac to not check for headers and functions not used
- Always use nbcompat/db.h on !NetBSD (PR 41865)
- Don't bother setting termwidth in pkg_info, it is never used.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Aug 2 17:56:45 2009 UTC (17 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +9 -9 lines
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.33: download - view: text, markup, annotated - select for diffs
Tue Feb 3 13:49:56 2009 UTC (17 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -22 lines
Remove the remaining trails of HAVE_DBLIB.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Feb 3 13:18:03 2009 UTC (17 years, 9 months ago) by joerg
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -2 lines
If no db.h or variant exists, use the one from nbcompat.
For PR 40544.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Feb 2 12:35:01 2009 UTC (17 years, 9 months ago) by joerg
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -10 lines
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.29.4.3: download - view: text, markup, annotated - select for diffs
Mon Feb 2 11:55:16 2009 UTC (17 years, 9 months ago) by joerg
Branches: pkg_install-renovation
Diff to: previous 1.29.4.2: preferred, colored; branchpoint 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29.4.2: +2 -4 lines
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.29.4.2: download - view: text, markup, annotated - select for diffs
Sat Aug 2 20:33:50 2008 UTC (18 years, 3 months ago) by joerg
Branches: pkg_install-renovation
Diff to: previous 1.29.4.1: preferred, colored; branchpoint 1.29: preferred, colored
Changes since revision 1.29.4.1: +3 -8 lines
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.29.4.1: download - view: text, markup, annotated - select for diffs
Fri May 23 15:57:04 2008 UTC (18 years, 5 months ago) by joerg
Branches: pkg_install-renovation
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -9 lines
Merge license changes from the HEAD.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Apr 29 05:46:08 2008 UTC (18 years, 6 months ago) by martin
Branches: 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
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -9 lines
Drop clauses 3 and 4 from TNF licenses

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Jan 29 15:39:31 2008 UTC (18 years, 9 months ago) by hubertf
Branches: MAIN
CVS tags: pkgsrc-2008Q1-base, pkgsrc-2008Q1
Branch point for: pkg_install-renovation
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +24 -18 lines
Sign over my copyright to TNF.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Aug 15 02:08:41 2007 UTC (19 years, 3 months ago) by joerg
Branches: MAIN
CVS tags: pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +13 -2 lines
Start abstracting pkgdb access by introducing pkgdb_pkg_file.
The function returns the path name of the given file for the package.
The memory needs to be freed by the caller.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Aug 15 01:49:02 2007 UTC (19 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Make _pkgdb_getPKGDB_DIR return const char * and fix fallout.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Aug 9 23:18:31 2007 UTC (19 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +7 -6 lines
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.25: download - view: text, markup, annotated - select for diffs
Wed Jan 4 23:33:23 2006 UTC (20 years, 10 months ago) by christos
Branches: MAIN
CVS tags: pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1, pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3, pkgsrc-2006Q2-base, pkgsrc-2006Q2, pkgsrc-2006Q1-base, pkgsrc-2006Q1
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +14 -7 lines
Handle newer versions of Berkeley DB. Our algorithm is:

- if you have > db1 the probably you have db_185.h which means
  that dbopen is really __db185_open, and we'll prefer that.
- else if you have db1, then you have db1/db.h and dbopen
- else if you have db.h, then this is either the one from db1 and it will
  work with -ldb having dbopen, or it will not.

Note that the compatibility option on __db185_open() will actually not create
or update db1.85/1.86 files, but it will use the current format of the db
library. This compatibility layer is source code only.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Feb 5 00:28:58 2005 UTC (21 years, 9 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2005Q4-base, pkgsrc-2005Q4, pkgsrc-2005Q3-base, pkgsrc-2005Q3, pkgsrc-2005Q2-base, pkgsrc-2005Q2, pkgsrc-2005Q1-base, pkgsrc-2005Q1
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Pull in documentation improvements and a minor change to allow building
with WARNS=2 from src/usr.sbin/pkg_install.  No functional change and
no version bump.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Feb 4 09:10:13 2005 UTC (21 years, 9 months ago) by jlam
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +21 -2 lines
Update pkgtools/pkg_install to 20050204 (latest release from the HEAD
branch of src).  Changes from version 20050106:

  Teach pkg_add(1) and pkg_delete(1) to pass PKG_METADATA_DIR and
  PKG_REFCOUNT_DBDIR in the environment when running the +* scripts.
  PKG_METADATA_DIR is the location of the +* files after the package is
  registered.  PKG_REFCOUNT_DBDIR is the location of the reference counts
  database directory.  If PKG_REFCOUNT_DBDIR is left unset, then it
  defaults the the location of the package database directory with
  ".refcount" appended to the path, e.g. /var/db/pkg.refcount.

  pkgviews users should explicitly set PKG_REFCOUNT_DBDIR in the shell
  environment to ensure that all packages will use the same refcount
  database.

  These changes allow the +INSTALL and +DEINSTALL script to keep state
  in +* files within ${PKG_METADATA_DIR}, and to store reference counts
  in ${PKG_REFCOUNT_DBDIR} to handle usage of resources outside of
  ${LOCALBASE}.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Dec 29 12:16:56 2004 UTC (21 years, 10 months ago) by agc
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +7 -7 lines
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.21: download - view: text, markup, annotated - select for diffs
Fri Aug 20 20:09:53 2004 UTC (22 years, 3 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2004Q4-base, pkgsrc-2004Q4, pkgsrc-2004Q3-base, pkgsrc-2004Q3
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +0 -0 lines
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.20: download - view: text, markup, annotated - select for diffs
Fri Aug 6 16:57:03 2004 UTC (22 years, 3 months ago) by jlam
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +0 -0 lines
Sync with version 20040730 from src/usr.sbin/pkg_install on the HEAD:

> Re-work the code which checks the recorded build versions of a binary
> package to make pkg_add work properly when no +BUILD_INFO file exists.
>
> Modify the return value from read_buildinfo() to return 1 for success
> and 0 for failure.
>
> Use symbolic constants, rather than integers.
>
> If we can't read the build information, always tell of this fact.
>
> Bump version to 20040730
>
> Addresses PR 26429; a different version of these mods were verified to
> allow a +BUILD_INFO-less binary package to be added by Martin Husemann.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Sep 9 13:34:21 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
CVS tags: pkgsrc-2004Q2-base, pkgsrc-2004Q2, pkgsrc-2004Q1-base, pkgsrc-2004Q1, pkgsrc-2003Q4-base, pkgsrc-2003Q4
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +16 -9 lines
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.18: download - view: text, markup, annotated - select for diffs
Mon Sep 8 05:58:10 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
Whee... pkgdb_remove_pkg returns 1 on success, so make the dummy function
return this value.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Sep 8 05:32:56 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
It turns out the comment at the top of pkgdb_open is wrong.  It actually
returns 0 if there is an error, and 1 otherwise.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Sep 8 02:09:04 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -3 lines
The pkgdb_* functions should be no-ops on platforms that don't have the
db*() functions, so make the dummy pkgdb_open() always return 0 for a
successful open of the package dbfile.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Sep 8 02:07:42 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -5 lines
Return the documented value "0" instead of EXIT_SUCCESS, which while it may
happen to be "0", isn't what's being explicitly returned.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Sep 3 12:32:50 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -3 lines
Put back several includes lost in the update that should fix builds on
Solaris and Linux.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Sep 2 08:28:35 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
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.12: download - view: text, markup, annotated - select for diffs
Tue Sep 2 01:37:05 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +17 -2 lines
Re-add the checks for HAVE_CHFLAGS and HAVE_DBOPEN so that this can build
on systems that don't have either function.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Sep 1 16:27:15 2003 UTC (23 years, 2 months ago) by jlam
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +61 -64 lines
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.10: download - view: text, markup, annotated - select for diffs
Fri Apr 11 14:40:37 2003 UTC (23 years, 7 months ago) by grant
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
catch up to bootstrap.

bump PKGTOOLS_VERSION to 20030411.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Mar 29 18:41:57 2003 UTC (23 years, 7 months ago) by jschauma
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -2 lines
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.8: download - view: text, markup, annotated - select for diffs
Sun Mar 16 19:44:10 2003 UTC (23 years, 8 months ago) by jschauma
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +20 -30 lines
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.6.2.1: download - view: text, markup, annotated - select for diffs
Thu Feb 20 13:45:00 2003 UTC (23 years, 9 months ago) by agc
Branches: netbsd-1-6-1
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +3 -3 lines
Pull up version 1.7 to the netbsd-1-6 branch.

Requested by Grant Beattie.

> Module Name:    pkgsrc
> Committed By:   grant
> Date:           Tue Feb 18 15:45:51 UTC 2003
>
> Modified Files:
>         pkgsrc/pkgtools/pkg_install/files/lib: pkgdb.c
>
> Log Message:
> correct #ifdef misplacement.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Feb 18 15:45:50 2003 UTC (23 years, 9 months ago) by grant
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
correct #ifdef misplacement.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Feb 11 14:40:55 2003 UTC (23 years, 9 months ago) by grant
Branches: MAIN
CVS tags: netbsd-1-6-1-base
Branch point for: netbsd-1-6-1
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -2 lines
belatedly sync with src:
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined,
else return EXIT_SUCCESS unconditionally (as in other functions dealing with
db functionality).

fixes build problem on Solaris when no libdb is available.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jan 14 15:18:35 2003 UTC (23 years, 10 months ago) by jschauma
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +39 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Jan 7 16:43:57 2003 UTC (23 years, 10 months ago) by jschauma
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
``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 - view: text, markup, annotated - select for diffs
Tue Jan 7 06:42:28 2003 UTC (23 years, 10 months ago) by grant
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +13 -20 lines
sync with src:
In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.

Do some CSE in pkgdb_iter().

Use the db access functions in the proper manner.

Also fix some whitespace nits.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jan 6 04:34:17 2003 UTC (23 years, 10 months ago) by jschauma
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +12 -19 lines
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 (vendor branch): download - view: text, markup, annotated - select for diffs
Fri Dec 20 18:14:03 2002 UTC (23 years, 11 months ago) by schmonz
Branches: TNF
CVS tags: pkgsrc-base
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
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 - view: text, markup, annotated - select for diffs
Fri Dec 20 18:14:03 2002 UTC (23 years, 11 months ago) by schmonz
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>