The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.122 / (download) - annotate - [select for diffs], Fri Jan 26 03:24:49 2024 UTC (2 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1, HEAD
Changes since 1.121: +24 -15 lines
Diff to previous 1.121 (colored) to selected 1.88 (colored)

pkg_install-20240125: Extend `-m' syntax to allow OPSYS too.

- If there's no slash `/', take it all as ${MACHINE_ARCH}.

- If there is a slash, then split it by `/' and ` ' into:

        ${OPSYS}/${MACHINE_ARCH} ${OPSYS_VERSION}

  For example:

        NetBSD/aarch64 10.0

All the variables are restricted to lie in a safe set [a-zA-Z0-9._-],
so the notation can be extended later.

No change to existing syntax (no MACHINE_ARCH has `/' in it, or
anything outside the safe set), and `-m' is generally only used with
cross builds anyway, so this shouldn't break existing cross builds
and should have no impact on native builds.

Proposed on tech-pkg:
https://mail-index.netbsd.org/tech-pkg/2024/01/13/msg028825.html

Revision 1.121 / (download) - annotate - [select for diffs], Thu Oct 21 13:05:25 2021 UTC (2 years, 5 months ago) by jperkin
Branch: MAIN
CVS Tags: 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
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored) to selected 1.88 (colored)

pkg_install: Update to 20211021.

Apply patch from Michal Maruska in NetBSD/pkgsrc#95 to ensure package files
are correctly cleaned up should the POST-INSTALL script phase fail.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Apr 10 20:10:48 2021 UTC (3 years ago) by nia
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.88 (colored)

pkg_install: add a cast to satisfy GCC, NFCI

Revision 1.119 / (download) - annotate - [select for diffs], Sat Apr 10 11:36:56 2021 UTC (3 years ago) by nia
Branch: MAIN
Changes since 1.118: +37 -45 lines
Diff to previous 1.118 (colored) to selected 1.88 (colored)

pkg_install-20210410: simplify checking for netbsd versions

only care about the first number, unless it's -current

Revision 1.118 / (download) - annotate - [select for diffs], Sat Dec 12 04:12:47 2020 UTC (3 years, 4 months ago) by gutteridge
Branch: MAIN
CVS Tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored) to selected 1.88 (colored)

pkg_install: remove stray extra tab in perform.c

Revision 1.117 / (download) - annotate - [select for diffs], Sat Dec 12 01:44:17 2020 UTC (3 years, 4 months ago) by gutteridge
Branch: MAIN
Changes since 1.116: +6 -6 lines
Diff to previous 1.116 (colored) to selected 1.88 (colored)

pkg_install: spaces->tabs for consistency in perform.c

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 11 15:55:35 2020 UTC (3 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.115: +14 -7 lines
Diff to previous 1.115 (colored) to selected 1.88 (colored)

pkg_install-20201212: handle error case better

When pkg_delete fails, report it and error out.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Dec 11 10:06:53 2020 UTC (3 years, 4 months ago) by jperkin
Branch: MAIN
Changes since 1.114: +11 -2 lines
Diff to previous 1.114 (colored) to selected 1.88 (colored)

pkg_install: Introduce support for CHECK_OS_VERSION.

When set to "no", pkg_add will not issue a warning if the host OS version does
not exactly match the OS version the package was built on.  This can be useful
on many OS where the kernel release version has nothing to do with userland
compatibility, or where it may differ without being ABI incompatible.

Ultimately it would be ideal if the version checks were smart enough across all
our supported OS to not need this, but until then this is useful for users who
know what they're doing.

Bump version to 20201211.

Revision 1.114 / (download) - annotate - [select for diffs], Sun Dec 6 17:23:09 2020 UTC (3 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.113: +6 -2 lines
Diff to previous 1.113 (colored) to selected 1.88 (colored)

pkg_install: update to 20201206

Convert a core dump I've been seeing into an error abort.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Oct 9 07:37:20 2020 UTC (3 years, 6 months ago) by mcf
Branch: MAIN
Changes since 1.112: +4 -3 lines
Diff to previous 1.112 (colored) to selected 1.88 (colored)

pkg_install: fix stage in verbose log message

This function is also used to run with POST-INSTALL, so adjust the
log message to match the argument passed to the install script.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jul 1 10:03:19 2020 UTC (3 years, 9 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Changes since 1.111: +6 -6 lines
Diff to previous 1.111 (colored) to selected 1.88 (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.111 / (download) - annotate - [select for diffs], Wed Jul 1 09:46:04 2020 UTC (3 years, 9 months ago) by jperkin
Branch: MAIN
Changes since 1.110: +61 -38 lines
Diff to previous 1.110 (colored) to selected 1.88 (colored)

pkg_install: Handle recursive upgrades correctly.

The list of dependencies held by packages during recursive upgrades was not
refreshed after dependencies were themselves upgraded, leading to failures
attempting to read +REQUIRED_BY files in package directories that no longer
exist ("registration is incomplete!").  We now only perform the package
match after the upgrades have completed.

While here, hide the warning about dependencies not being fulfilled behind
ForceDepending, as the whole point of using that mode is to ignore such
issues with the assumption that the final state after updating will be
correct.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Feb 26 23:45:01 2018 UTC (6 years, 1 month ago) by ginsbach
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
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored) to selected 1.88 (colored)

pkg_install-20180226:
- add option to include IGNORE_URL pkg_install.conf entries in audit
  but flagged as "ignored".
- bump version to 20180226

Revision 1.109 / (download) - annotate - [select for diffs], Wed Apr 19 21:42:50 2017 UTC (6 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.108: +9 -18 lines
Diff to previous 1.108 (colored) to selected 1.88 (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.108 / (download) - annotate - [select for diffs], Sun Dec 27 12:36:42 2015 UTC (8 years, 3 months ago) by joerg
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
Changes since 1.107: +27 -2 lines
Diff to previous 1.107 (colored) to selected 1.88 (colored)

Include basic package creation logic in the bootstrap version of
pkg_install. Use this with PKG_COMPRESSION=none to convert all of the
bootstrap to USE_DESTDIR=yes.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Oct 20 08:18:12 2015 UTC (8 years, 5 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2015Q4-base, pkgsrc-2015Q4
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored) to selected 1.88 (colored)

OpenBSD and derivatives define MACHINE_ARCH in sys/param.h to "amd64" which
overrides our attempt to set it to "x86_64" and ensure consistency across
platforms.  Work around this by setting it using PKGSRC_MACHINE_ARCH.

Confirmed to fix the issue and not break a variety of other platforms by
Sevan, and approved under duress by Joerg.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Dec 30 15:13:20 2014 UTC (9 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1
Changes since 1.105: +3 -36 lines
Diff to previous 1.105 (colored) to selected 1.88 (colored)

Remove pkg_views support, second part: infrastructure.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Sep 2 10:28:44 2013 UTC (10 years, 7 months ago) by jperkin
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
Changes since 1.104: +2 -5 lines
Diff to previous 1.104 (colored) to selected 1.88 (colored)

pkg_install-20130902: Fix 'pkg_add -f'.

Remove incorrect return value when in force mode, which was causing pkg_add
to exit with failure even though the operation completed successfully.  This
also fixes the case where 'pkg_add -uf' would leave an update in an
inconsistent state.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Aug 21 11:46:02 2013 UTC (10 years, 7 months ago) by jperkin
Branch: MAIN
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored) to selected 1.88 (colored)

Remove files inside pkgdb directory before trying to remove the directory
itself.  Copied from similar code in pkg_delete.

This fixes the issue when an +INSTALL script fails but the pkgdb directory
couldn't be removed, leading to an inconsistent state.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Jan 31 10:25:30 2013 UTC (11 years, 2 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1
Changes since 1.102: +6 -2 lines
Diff to previous 1.102 (colored) to selected 1.88 (colored)

Shut up warnings about 6.0 packages on 6.0.1 (and similar).
Welcome to 20130131.

Revision 1.102 / (download) - annotate - [select for diffs], Tue Feb 21 13:32:24 2012 UTC (12 years, 1 month ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored) to selected 1.88 (colored)

Fix PR 46068 using the patch by Nicolas Thauvin:
pkg_add fails to install a package when subdiretories are missing
in the path to package directory in /var/db/pkg.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Jan 28 12:33:04 2012 UTC (12 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.100: +22 -11 lines
Diff to previous 1.100 (colored) to selected 1.88 (colored)

pkg_install-20120128:
- Explicitly stat(2) if mkdir failed. errno detection doesn't work e.g.
on Solaris (PR 45289)
- Provide a stable order for package names that only differe in the base
name, not the version number.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Aug 5 07:04:28 2011 UTC (12 years, 8 months ago) by agc
Branch: MAIN
CVS Tags: pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored) to selected 1.88 (colored)

Fix for pkg_delete on NFS from Anthony Mallet.

Problem analysis from Anthony:

	On Wednesday, at 23:52, Anthony Mallet wrote:
	> # rm -rf ~tmp && mkdir ~/tmp
	> # pkg_add -K ~/tmp/var/db/pkg -p ~/tmp /usr/pkgsrc/packages/All/digest-20080510.tgz
	> # pkg_add -U -K ~/tmp/var/db/pkg -p ~/tmp /usr/pkgsrc/packages/All/digest-20080510.tgz
	> pkg_delete: Couldn't remove package directory in `/home/tho/tmp/var/db/pkg/digest-20080510'
	> Also, the dir var/db/pkg/digest-20080510.xxxxxxx is never cleaned.
	>
	> The problem apparently is that pkg_delete finds some stalled NFS entries
	> (.nfs*) in the var/db/pkg/digest-20080510 dir, so it does not delete the
	> directory. Is this due to pkg_add not correctly closing file descriptors before
	> exec'ing pkg_delete? For instance, I really don't understand the logic in
	> check_already_installed() (add/perform.c:375) regarding the open() of +CONTENTS
	> which is almost never closed (and never used as well...). Shouldn't this be
	> closed before running pkg_delete?

	ktrace shows that the +CONTENTS file is open() by pkg_add, I believe this is in
	check_already_installed(), add/perform.c:381. Then pkg_delete is run and when
	it comes to deleting the pkgdir entry, it finds that .nfs file and aborts.

Bump version to 20110805

Revision 1.99 / (download) - annotate - [select for diffs], Sun Dec 12 13:18:38 2010 UTC (13 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4
Changes since 1.98: +42 -3 lines
Diff to previous 1.98 (colored) to selected 1.88 (colored)

Don't warn about _ALPHA, _BETA, _PATCH, _RC, _STABLE mismatches
when pkg_add'ing on NetBSD. Bump version to 20101212.

Ok jym, gdt

Revision 1.98 / (download) - annotate - [select for diffs], Tue Sep 14 22:26:18 2010 UTC (13 years, 7 months ago) by gdt
Branch: MAIN
CVS Tags: pkgsrc-2010Q3-base, pkgsrc-2010Q3
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored) to selected 1.88 (colored)

Add -D flag to pkg_install, to override the "pkg_add -U" check that
all depending packages have their dependencies satisfied by the new
package.  Essentially, split off this particular behavior as a special
case of -f, so that -f works as before, unforced works as before, and
one can give -D to override exactly this check, leaving all other
checks intact.

The -D flag is in support of make replace, as the workflow for make
replace is that inter-package dependencies are sometimes violated (but
then one must replace the depending packages, which is what
pkg_rolling-replace does via the unsafe_depends flags).

Bump PKGTOOLS_VERSION.

Add missing break statement in option parsing of "pkg_add -C", riding
the version bump.

Discussed extensively on tech-pkg@ over the summer.
OK pkgsrc-pmc@.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Jun 16 23:02:48 2010 UTC (13 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2010Q2-base, pkgsrc-2010Q2
Changes since 1.96: +8 -8 lines
Diff to previous 1.96 (colored) to selected 1.88 (colored)

pkg_install-20100616:
- Recognize -C for pkg_add like the rest of the tools do
- Do the existing check for pkg_add -f, it makes the combination of
  -f and -U a bit less surprising
- Fix option handling for CHECK_VULNERABILITIES (from spz@)
- Make end-of-life check the default. pkg_install.conf(5) can be used to
  override the default. The existing admin -e & co continue to work as
  before.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Apr 14 18:24:58 2010 UTC (14 years ago) by joerg
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.88 (colored)

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.95 / (download) - annotate - [select for diffs], Sat Feb 20 04:40:03 2010 UTC (14 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2010Q1-base, pkgsrc-2010Q1
Changes since 1.94: +10 -6 lines
Diff to previous 1.94 (colored) to selected 1.88 (colored)

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

Revision 1.94 / (download) - annotate - [select for diffs], Wed Feb 3 14:20:14 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.93: +35 -2 lines
Diff to previous 1.93 (colored) to selected 1.88 (colored)

pkg_install-20100203:
- Restore PKG_PREFIX in pkg_delete (PR 42731)
- Ensure that the current pkg_install version is at least as new as
  the version used to build the package

Revision 1.93 / (download) - annotate - [select for diffs], Sat Jan 30 20:09:34 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.92: +41 -6 lines
Diff to previous 1.92 (colored) to selected 1.88 (colored)

pkg_install-20100130:
Add -U for pkg_add.  It works similar to -u, but replaces an already
installed version.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jan 22 13:30:41 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.91: +9 -9 lines
Diff to previous 1.91 (colored) to selected 1.88 (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.91 / (download) - annotate - [select for diffs], Wed Oct 7 12:53:26 2009 UTC (14 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3
Changes since 1.90: +13 -6 lines
Diff to previous 1.90 (colored) to selected 1.88 (colored)

pkg_install-20091006:
- restore pkg_add -f functionality for missing dependencies (PR 42001)
- pkg_admin rebuild should count packages correctly (he@), also count @pkgdb
- fix gpg-sign-package syntax in pkg_admin(1)
- change default URL for pkg-vulnerabilities to use HTTP

Revision 1.90 / (download) - annotate - [select for diffs], Sun Aug 16 14:26:46 2009 UTC (14 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.89: +5 -7 lines
Diff to previous 1.89 (colored) to selected 1.88 (colored)

Fix a bug in pkg_add's -P handling. For dependencies the pkgdb path was
computed incorrectly and included destdir more than once.

Fix the ACTIVE_FTP option to actually set the "a" flag and not the old
"p" flag.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Aug 6 16:53:34 2009 UTC (14 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.88: +38 -5 lines
Diff to previous 1.88 (colored)

pkg_install-20090806:
- pkg_add: add support to check license conditions before installation
- pkg_delete: add -k option to skip over preserve packages.

Revision 1.88 / (download) - annotate - [selected], Sun Aug 2 17:56:44 2009 UTC (14 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.87: +4 -4 lines
Diff to previous 1.87 (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.87 / (download) - annotate - [select for diffs], Thu May 28 08:59:59 2009 UTC (14 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q2-base, pkgsrc-2009Q2
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored) to selected 1.88 (colored)

pkg_install-20090528:
I can't remember why the original pkg_install-renovation code disabled
extraction of ownership from packages, so reenable that.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Apr 24 14:00:25 2009 UTC (14 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.85: +10 -3 lines
Diff to previous 1.85 (colored) to selected 1.88 (colored)

pkg_install-20090424:
Make pkg_delete -d the default behavior, remove the option.
Remove pkg_create -R support (reorder @dirrm entries).
Introduce new plist command @pkgdir, which makes pkg_add add
this directory if it doesn't exist already and pkg_delete remove it
only if no other package has a @pkgdir entry for it. Otherwise
directories are pruned when the last file or directory in them is
removed. @dirrm is now a pure hint, if the directory doesn't exist, it
will be silently skipped.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Apr 6 14:34:15 2009 UTC (15 years ago) by joerg
Branch: MAIN
Changes since 1.84: +2 -5 lines
Diff to previous 1.84 (colored) to selected 1.88 (colored)

pkg_install-20090406:
Remove premature return that broke dependency tracking for pkg_add -u.
Fixes PR 41143.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Mar 8 14:50:36 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2009Q1-base
Branch point for: pkgsrc-2009Q1
Changes since 1.83: +8 -13 lines
Diff to previous 1.83 (colored) to selected 1.88 (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.83 / (download) - annotate - [select for diffs], Mon Mar 2 15:30:45 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.82: +2 -3 lines
Diff to previous 1.82 (colored) to selected 1.88 (colored)

Remove a close(-1) as hinted by wiz.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Mar 2 14:59:14 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.81: +9 -5 lines
Diff to previous 1.81 (colored) to selected 1.88 (colored)

pkg_install-20090301:
Plug a number of file descriptor leaks.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Feb 28 16:03:56 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.80: +9 -18 lines
Diff to previous 1.80 (colored) to selected 1.88 (colored)

pkg_install-20090228:
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

Revision 1.80 / (download) - annotate - [select for diffs], Fri Feb 27 19:34:12 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.88 (colored)

When checking for explicit conflicts, skip the old version checkif no
old version exists (e.g. because this is not an update).
Reported by Thomas Klausner.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Feb 26 12:52:43 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.78: +3 -4 lines
Diff to previous 1.78 (colored) to selected 1.88 (colored)

pkg_install-20090226:
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@.

Revision 1.78 / (download) - annotate - [select for diffs], Fri Feb 13 13:19:12 2009 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.77: +31 -11 lines
Diff to previous 1.77 (colored) to selected 1.88 (colored)

Explicitly check that the conflicting package is not the one we want to
remove for update; mysql-client has a pattern that matching itself.
Reported by Obata Akio.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Feb 13 11:21:07 2009 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.76: +5 -9 lines
Diff to previous 1.76 (colored) to selected 1.88 (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.76 / (download) - annotate - [select for diffs], Wed Feb 11 23:42:42 2009 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) to selected 1.88 (colored)

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

Revision 1.75 / (download) - annotate - [select for diffs], Tue Feb 3 19:47:37 2009 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.74: +5 -2 lines
Diff to previous 1.74 (colored) to selected 1.88 (colored)

Include fcntl.h.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Feb 2 12:35:00 2009 UTC (15 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.73: +1233 -852 lines
Diff to previous 1.73 (colored) to selected 1.88 (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.73 / (download) - annotate - [select for diffs], Wed Sep 17 15:21:30 2008 UTC (15 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3
Changes since 1.72: +2 -4 lines
Diff to previous 1.72 (colored) to selected 1.88 (colored)

pkg_install-20080916:
Merge from changes for read_plist from pkg_install-renovation to always
initialize the plist and add append_plist for the one case where this is
not desired. Fixes PR 39276.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Apr 26 17:40:01 2008 UTC (15 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkg_install-renovation-base, cwrapper-base, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.71: +863 -1038 lines
Diff to previous 1.71 (colored) to selected 1.88 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Sat Apr 26 14:56:34 2008 UTC (15 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.70: +1039 -864 lines
Diff to previous 1.70 (colored) to selected 1.88 (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.70 / (download) - annotate - [select for diffs], Fri Feb 8 00:58:17 2008 UTC (16 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2008Q1-base, pkgsrc-2008Q1
Branch point for: pkg_install-renovation
Changes since 1.69: +7 -3 lines
Diff to previous 1.69 (colored) to selected 1.88 (colored)

Having to wonder for 5min why pkg_add would fail just to discover that
it couldn't exec the shell scripts due to mount -o noexec, make the
error message a bit more verbose.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jan 26 23:30:24 2008 UTC (16 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.68: +5 -2 lines
Diff to previous 1.68 (colored) to selected 1.88 (colored)

pkg_install-20080126: Make pkg_add pass down -I and -m when recursively
adding packages.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Nov 30 00:30:39 2007 UTC (16 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2007Q4-base, pkgsrc-2007Q4
Changes since 1.67: +15 -2 lines
Diff to previous 1.67 (colored) to selected 1.88 (colored)

Do not install a package if some of the installed packages would
conflict with it. This fixes PR 37451.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Nov 13 19:53:11 2007 UTC (16 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.66: +4 -5 lines
Diff to previous 1.66 (colored) to selected 1.88 (colored)

Provide more useful details in the error message for conflicting packages:
- The package that cannot be installed
- The pattern of the conflict
- The name of the installed (conflicting) package.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Nov 8 23:24:56 2007 UTC (16 years, 5 months ago) by joerg
Branch: MAIN
Changes since 1.65: +5 -18 lines
Diff to previous 1.65 (colored) to selected 1.88 (colored)

Don't use the build time version to find packages, we want to pick up
the newest version. Bump version to 20071109.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Nov 1 23:08:29 2007 UTC (16 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.64: +5 -7 lines
Diff to previous 1.64 (colored) to selected 1.88 (colored)

Added quotes around the filenames, as suggested by joerg@.

While here, removed an unnecessary variable.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Nov 1 21:57:37 2007 UTC (16 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.63: +5 -4 lines
Diff to previous 1.63 (colored) to selected 1.88 (colored)

When rename(2) fails, it is useful to know some details about the
filenames that have been involved.

Do not use assert() for error checking.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Sep 11 13:39:05 2007 UTC (16 years, 7 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2007Q3-base, pkgsrc-2007Q3
Changes since 1.62: +2 -5 lines
Diff to previous 1.62 (colored) to selected 1.88 (colored)

Removed unused variable.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Sep 11 12:33:13 2007 UTC (16 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.61: +7 -4 lines
Diff to previous 1.61 (colored) to selected 1.88 (colored)

Applying sizeof() to a string parameter does not return the size of the
buffer, but the size of a pointer to a buffer. This makes pkg_add -u
work again. It failed before, trying to rename the +REQUIRED_BY file to
"/us" or "/va", depending on the value of PKGDBDIR.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 8 09:58:14 2007 UTC (16 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.60: +2 -6 lines
Diff to previous 1.60 (colored) to selected 1.88 (colored)

Removed the warning about pkg_add or pkg_delete "not running as root"
completely. It only made the code more bloated, and a user trying to add
or delete packages would get lots of "Permission denied" warnings
anyway.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 7 15:45:14 2007 UTC (16 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.88 (colored)

In unprivileged builds, the user running pkg_add and pkg_delete is
almost always an unprivileged user. So there's no point in printing a
warning in that case.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Aug 15 01:21:46 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.58: +8 -3 lines
Diff to previous 1.58 (colored) to selected 1.88 (colored)

Bail out if the PLIST contains no @name field. This check existed since
the initial revision in 2002, so assume it just works...

Revision 1.58 / (download) - annotate - [select for diffs], Wed Aug 15 01:16:27 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.57: +177 -155 lines
Diff to previous 1.57 (colored) to selected 1.88 (colored)

Split off the part dealing with already installed packages into
a subfunction.

Bail out if the package name doesn't have a version name.
Bail out if the internal rename failed (it was an assert before).
Invert some of the branches to cut off three levels of indirection.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Aug 14 22:47:52 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.56: +16 -14 lines
Diff to previous 1.56 (colored) to selected 1.88 (colored)

Add new option -m to pkg_add. This allows to override MACHINE_ARCH
for the purpose of installing a package and enables cross-compiled
pkgsrc to not use -f all the time.

Bump version to 20070815.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Aug 13 19:15:37 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.55: +79 -82 lines
Diff to previous 1.55 (colored) to selected 1.88 (colored)

Merge tmppkg into main variable block and remove indentation.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Aug 13 19:13:14 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.54: +3 -16 lines
Diff to previous 1.54 (colored) to selected 1.88 (colored)

Check explictly for argc == 0 to find out if options where specified.
Don't depend on NULL termination of argv, count instead.
Remove more traces of slave mode.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Aug 9 23:32:59 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.53: +4 -35 lines
Diff to previous 1.53 (colored) to selected 1.88 (colored)

Remove @option extract-in-place support for now (will be the default
later) and document @option preserve in pkg_add(1).

Revision 1.53 / (download) - annotate - [select for diffs], Thu Aug 9 23:18:30 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.52: +6 -6 lines
Diff to previous 1.52 (colored) to selected 1.88 (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.52 / (download) - annotate - [select for diffs], Wed Aug 8 22:33:38 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.51: +42 -32 lines
Diff to previous 1.51 (colored) to selected 1.88 (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.51 / (download) - annotate - [select for diffs], Mon Jul 30 08:09:14 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.50: +8 -19 lines
Diff to previous 1.50 (colored) to selected 1.88 (colored)

Remove first obstactle in pkg_add for switching to libarchive:
MASTER/SLAVE mode is gone now.

Bump version to 20070730.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Jul 26 11:30:55 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.49: +2 -18 lines
Diff to previous 1.49 (colored) to selected 1.88 (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.49 / (download) - annotate - [select for diffs], Wed Jul 25 15:01:46 2007 UTC (16 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.48: +3 -13 lines
Diff to previous 1.48 (colored) to selected 1.88 (colored)

Mostly deorbit mtree support:
- pkg_create bails out with -m
- pkg_add ignores mtree specs in packages and prints a warning.
  It does not remove the file like before.
- remove now obsolete documentation.

pkg_info still prints the information and pkg_admin ignores the files.
Make the dependency on the tools a runtime dependency.
Take maintainership of pkg_install and bump version to 20070725.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jul 20 22:22:52 2007 UTC (16 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.47: +4 -4 lines
Diff to previous 1.47 (colored) to selected 1.88 (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.47 / (download) - annotate - [select for diffs], Fri Apr 20 14:25:13 2007 UTC (17 years ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2007Q2-base, pkgsrc-2007Q2
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.88 (colored)

Sync with src: PRIu64 -> MY_PRIu64 + fallback value of PRIu64.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 20 13:36:25 2007 UTC (17 years ago) by tnn
Branch: MAIN
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored) to selected 1.88 (colored)

re-add fix from r1.42 after sync

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 16 12:55:35 2007 UTC (17 years ago) by joerg
Branch: MAIN
Changes since 1.44: +2 -3 lines
Diff to previous 1.44 (colored) to selected 1.88 (colored)

Sync with NetBSD base:
Some FTP server don't expand [] in NLIST, most noticable is vsftpd.
Avoid this by splitting the wildcard search pattern into two commands.
Sync some other minor changes.

Bump to 20070416.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Mar 11 22:05:03 2007 UTC (17 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2007Q1-base, pkgsrc-2007Q1
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored) to selected 1.88 (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.43 / (download) - annotate - [select for diffs], Thu Jul 20 11:29:48 2006 UTC (17 years, 9 months ago) by gson
Branch: MAIN
CVS Tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3
Changes since 1.42: +4 -2 lines
Diff to previous 1.42 (colored) to selected 1.88 (colored)

Import the following change to add/perform.c from src to pkgsrc:

 Fix uninitialized variable which was causing pkg_add -u to randomly
 dump core.  This may fix PR pkg/30292.

Also bump the pkgsrc PKGTOOLS_VERSION to 20060720.

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 10 04:25:30 2006 UTC (17 years, 11 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2006Q2-base, pkgsrc-2006Q2
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored) to selected 1.88 (colored)

Make pkg_install build on platforms that don't define the PRIu64 integer
format modifier.  We include "defs.h" in the files that use PRIu64 as
that is the header that contains stand-in definition.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Apr 24 13:52:04 2006 UTC (17 years, 11 months ago) by dillo
Branch: MAIN
Changes since 1.40: +2 -22 lines
Diff to previous 1.40 (colored) to selected 1.88 (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.40 / (download) - annotate - [select for diffs], Thu Apr 6 06:49:30 2006 UTC (18 years ago) by reed
Branch: MAIN
Changes since 1.39: +11 -6 lines
Diff to previous 1.39 (colored) to selected 1.88 (colored)

Welcome to version 20060405.

pkg_add also check for USE_ABI_DEPENDS.

Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
when this package was built. IGNORE_RECOMMENDED is now historical.

For the cat man page, I manually made it say "pkgsrc" instead of
"NetBSD".

I committed to NetBSD's src/usr.sbin/pkg_install/ first :)

Revision 1.39 / (download) - annotate - [select for diffs], Tue Apr 4 06:24:39 2006 UTC (18 years ago) by wiz
Branch: MAIN
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored) to selected 1.88 (colored)

Pull over 1.117 from src/usr.sbin:
revision 1.117
date: 2006/03/17 02:37:31;  author: hubertf;  state: Exp;  lines: +6 -2
Add sanity check if there's a @cwd in the +CONTENT file.
If not abort, because we wouldn't know where to put the files.

Coverity CID 1358

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 13 22:08:22 2006 UTC (18 years, 1 month ago) by erh
Branch: MAIN
CVS Tags: pkgsrc-2006Q1-base, pkgsrc-2006Q1
Changes since 1.37: +6 -6 lines
Diff to previous 1.37 (colored) to selected 1.88 (colored)

Fix -uu handling so recursive updates of already installed packages work,
even if the initial package to install isn't installed yet.
Bump the version to 20060313.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jan 25 00:20:09 2006 UTC (18 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.36: +15 -2 lines
Diff to previous 1.36 (colored) to selected 1.88 (colored)

Add conditional code to ignore the non-numeric part of an OS version
for the sake of compatibility tests in pkg_add.
E.g. DragonFly versions like
        1.4.0-RELEASE
are reduced to
        1.4.0

This code is currently enabled for DragonFly only.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Dec 8 19:41:04 2005 UTC (18 years, 4 months ago) by dillo
Branch: MAIN
CVS Tags: pkgsrc-2005Q4-base, pkgsrc-2005Q4
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored) to selected 1.88 (colored)

sync with src (revision 1.115):

(pkg_do) When marking already installed package as manually installed,
         only print message if we succeeded.

Noted by wiz.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Nov 22 15:44:59 2005 UTC (18 years, 4 months ago) by ben
Branch: MAIN
Changes since 1.34: +19 -6 lines
Diff to previous 1.34 (colored) to selected 1.88 (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.34 / (download) - annotate - [select for diffs], Sat Nov 5 13:20:09 2005 UTC (18 years, 5 months ago) by wiz
Branch: MAIN
Changes since 1.33: +16 -5 lines
Diff to previous 1.33 (colored) to selected 1.88 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 25 13:13:00 2005 UTC (18 years, 8 months ago) by hubertf
Branch: MAIN
CVS Tags: pkgsrc-2005Q3-base, pkgsrc-2005Q3
Changes since 1.32: +11 -4 lines
Diff to previous 1.32 (colored) to selected 1.88 (colored)

Pull over change from src/usr.sbin/pkg_install:

| Modified Files:
|         src/usr.sbin/pkg_install/add: perform.c
|
| Log Message:
| cleanup: preserve errno. Needed so err() functions ran after running
|          cleanup(0) print the correct error message.
|
|
| To generate a diff of this commit:
| cvs rdiff -r1.109 -r1.110 src/usr.sbin/pkg_install/add/perform.c

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jul 18 09:14:04 2005 UTC (18 years, 9 months ago) by hubertf
Branch: MAIN
Changes since 1.31: +4 -13 lines
Diff to previous 1.31 (colored) to selected 1.88 (colored)

Sync over files from src/usr.sbin/pkg_install to fix PR pkg/30658:
Warn, but don't error out on pkgs that were built with IGNORE_RECOMMENDED.

Bump version to 20050718.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 10 01:37:21 2005 UTC (18 years, 10 months ago) by dmcmahill
Branch: MAIN
CVS Tags: pkgsrc-2005Q2-base, pkgsrc-2005Q2
Changes since 1.30: +22 -3 lines
Diff to previous 1.30 (colored) to selected 1.88 (colored)

add autoconf test for missing (like in openbsd-3.6) or broken (like
in AIX-4.3.2) PRIu64.  If it is missing or broken, provide one.  Should
address PR30375.  Welcome to pkg_install-20050607

Revision 1.30 / (download) - annotate - [select for diffs], Sat May 28 02:50:46 2005 UTC (18 years, 10 months ago) by dmcmahill
Branch: MAIN
Changes since 1.29: +10 -5 lines
Diff to previous 1.29 (colored) to selected 1.88 (colored)

- pull in the changes from usr.sbin which prevent an over flow
  of a 32 bit signed number when pkg_add-ing a binary package
  file larger than 512 Mb.

- Bump PKGTOOLS_VERSION (NOT!!! PKGTOOLS_REQD) to 20050527

Revision 1.29 / (download) - annotate - [select for diffs], Mon Mar 7 08:41:58 2005 UTC (19 years, 1 month ago) by agc
Branch: MAIN
CVS Tags: pkgsrc-2005Q1-base, pkgsrc-2005Q1
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.88 (colored)

Bring over the clearer mismatch warning message from src.

+ state that the message is just a warning
+ make it clearer what an OS mismatch is

Revision 1.28 / (download) - annotate - [select for diffs], Fri Feb 4 09:10:13 2005 UTC (19 years, 2 months ago) by jlam
Branch: MAIN
Changes since 1.27: +12 -27 lines
Diff to previous 1.27 (colored) to selected 1.88 (colored)

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.27 / (download) - annotate - [select for diffs], Wed Dec 29 12:16:56 2004 UTC (19 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.26: +21 -21 lines
Diff to previous 1.26 (colored) to selected 1.88 (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.26 / (download) - annotate - [select for diffs], Thu Dec 9 20:10:34 2004 UTC (19 years, 4 months ago) by erh
Branch: MAIN
CVS Tags: pkgsrc-2004Q4-base, pkgsrc-2004Q4
Changes since 1.25: +41 -24 lines
Diff to previous 1.25 (colored) to selected 1.88 (colored)

Make binary updates work better when there are dependant packages to
update also.  Specifying -u twice will now update the named package
and its dependencies.
Also make sure Fake really means Fake, even if update is specified.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Nov 2 00:10:15 2004 UTC (19 years, 5 months ago) by erh
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored) to selected 1.88 (colored)

Add a -N option to pkg_delete to delete registration information for a package
but not its files.
Override PKG_DELETE when building this package so -N can be used to
upgrade an existing install.
Bump version to 20041101.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Aug 6 16:57:03 2004 UTC (19 years, 8 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2004Q3-base, pkgsrc-2004Q3
Changes since 1.23: +117 -87 lines
Diff to previous 1.23 (colored) to selected 1.88 (colored)

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.23 / (download) - annotate - [select for diffs], Sat May 8 16:54:28 2004 UTC (19 years, 11 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2004Q2-base, pkgsrc-2004Q2
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.88 (colored)

sync with src/ rev. 1.101:

fix typo.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Apr 28 15:38:17 2004 UTC (19 years, 11 months ago) by tv
Branch: MAIN
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored) to selected 1.88 (colored)

20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Apr 21 20:11:55 2004 UTC (19 years, 11 months ago) by tv
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored) to selected 1.88 (colored)

Sync to 20040421: fix an uninitialized array member access in pkg_add.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 11 06:56:11 2004 UTC (20 years ago) by rh
Branch: MAIN
Changes since 1.19: +28 -3 lines
Diff to previous 1.19 (colored) to selected 1.88 (colored)

Update pkg_install to 20040411, pulling up the changes in the NetBSD source
tree:

Make pkg_add recognise binary packages built with ignored recommendations
(IGNORE_RECOMMENDED set in the presence of RECOMMENDED pre-requisites).
This change is fully backward-compatible: binary packages have set the
corresponding BUILD_INFO since RECOMMENDED was implemented.  Packages
built before that time will install as before.
Bump PKGTOOLS_VERSION to 20040411.
This closes PR pkg/24712 by Thomas Klausner.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Apr 9 18:38:12 2004 UTC (20 years ago) by tv
Branch: MAIN
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored) to selected 1.88 (colored)

Merge 20040409: Parameterize the umask calls so that defs.*.mk can change
it on a per-opsys basis (and so that mk.conf can override it to match what
the pkgsrc builder is using).

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 29 20:27:46 2004 UTC (20 years ago) by tv
Branch: MAIN
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored) to selected 1.88 (colored)

Remove umask call and remove warning on Interix; OK'd by hubertf.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 29 02:25:06 2004 UTC (20 years ago) by tv
Branch: MAIN
Changes since 1.16: +0 -4 lines
Diff to previous 1.16 (colored) to selected 1.88 (colored)

Eek, revert previous; these weren't supposed to be committed.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 29 02:24:11 2004 UTC (20 years ago) by tv
Branch: MAIN
Changes since 1.15: +6 -2 lines
Diff to previous 1.15 (colored) to selected 1.88 (colored)

Obey CPPFLAGS.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 14 23:55:29 2004 UTC (20 years, 3 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2004Q1-base, pkgsrc-2004Q1
Changes since 1.14: +16 -22 lines
Diff to previous 1.14 (colored) to selected 1.88 (colored)

Update pkgtools/pkg_install to 20040114.  Changes from version 20040106
include:

* use ${MACHINE_ARCH} instead of what uname() puts into utsname.machine.
  the former represents the CPU architecture, which is what is recorded
  in binary packages; also allow the OS name to be overridden, as pkgsrc
  doesn't always use the value of utsname.sysname.

* allow adding depoted packages if another package with the same
  ${PKGBASE} is already installed as this is explicitly allowed for in
  pkgviews.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 4 01:49:38 2004 UTC (20 years, 3 months ago) by hubertf
Branch: MAIN
Changes since 1.13: +11 -7 lines
Diff to previous 1.13 (colored) to selected 1.88 (colored)

In the "quick depends pre-scan", first print all bad matching depends,
then exit (instead printing one conflicting pkg/version on each run).

Revision 1.13 / (download) - annotate - [select for diffs], Sat Dec 20 04:23:05 2003 UTC (20 years, 4 months ago) by grant
Branch: MAIN
Changes since 1.12: +114 -8 lines
Diff to previous 1.12 (colored) to selected 1.88 (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.12 / (download) - annotate - [select for diffs], Tue Sep 23 13:22:38 2003 UTC (20 years, 6 months ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2003Q4-base, pkgsrc-2003Q4
Changes since 1.11: +35 -52 lines
Diff to previous 1.11 (colored) to selected 1.88 (colored)

sync with NetBSD-current after updates from wiz.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Sep 23 07:13:46 2003 UTC (20 years, 6 months ago) by grant
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.88 (colored)

sync with NetBSD-current's pkg_install-20030923.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 9 13:34:17 2003 UTC (20 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.9: +31 -23 lines
Diff to previous 1.9 (colored) to selected 1.88 (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:23 2003 UTC (20 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.88 (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:11 2003 UTC (20 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.7: +130 -85 lines
Diff to previous 1.7 (colored) to selected 1.88 (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], Wed Apr 23 10:27:39 2003 UTC (20 years, 11 months ago) by seb
Branch: MAIN
Changes since 1.6: +7 -2 lines
Diff to previous 1.6 (colored) to selected 1.88 (colored)

Update to version 20030423 via patch from src/usr.sbin/pkg_install.

>Log Message:
>pkg_add fix:
>When doing quick pre-check if any conflicting dependencies are installed
>and a dependency is not found installed do not try to search for a wildcarded
>(-[0-9]* suffix) package if the dependency was already wildcarded.
>
>This prevent something like 'p5-Net-DNS-0.33' reported as an already
>installed version of 'p5-Net-[0-9]*' as a dependency.
>Before this fix 'p5-Net-[0-[0-9]*' would have been incorrectly searched for.
>
>Reviewed by hubertf@.
>
>Bump PKGTOOLS_VERSION to 20030423.
>
>
>To generate a diff of this commit:
>cvs rdiff -r1.81 -r1.82 src/usr.sbin/pkg_install/add/perform.c
>cvs rdiff -r1.26 -r1.27 src/usr.sbin/pkg_install/lib/version.h

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 17 13:50:54 2003 UTC (21 years ago) by grant
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) to selected 1.88 (colored)

sync with bootstrap, remove an unnecessary cast which found its way in
here.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Apr 11 14:40:36 2003 UTC (21 years ago) by grant
Branch: MAIN
Changes since 1.4: +7 -8 lines
Diff to previous 1.4 (colored) to selected 1.88 (colored)

catch up to bootstrap.

bump PKGTOOLS_VERSION to 20030411.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 29 18:41:56 2003 UTC (21 years ago) by jschauma
Branch: MAIN
Changes since 1.3: +100 -14 lines
Diff to previous 1.3 (colored) to selected 1.88 (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.3 / (download) - annotate - [select for diffs], Tue Jan 14 15:18:32 2003 UTC (21 years, 3 months ago) by jschauma
Branch: MAIN
CVS Tags: netbsd-1-6-1-base, netbsd-1-6-1
Changes since 1.2: +4 -2 lines
Diff to previous 1.2 (colored) to selected 1.88 (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.2 / (download) - annotate - [select for diffs], Mon Jan 6 04:34:15 2003 UTC (21 years, 3 months ago) by jschauma
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored) to selected 1.88 (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 / (download) - annotate - [select for diffs], Fri Dec 20 18:13:56 2002 UTC (21 years, 4 months ago) by schmonz
Branch: MAIN
Diff to selected 1.88 (colored)

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>