Commit Graph

171 Commits

Author SHA1 Message Date
agc ef020cc402 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.
2004-07-30 11:35:46 +00:00
grant 0f204e9fc9 fix typo. 2004-05-08 16:50:37 +00:00
tv f3215814d5 20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.
2004-04-28 15:37:29 +00:00
tv 5b799f00cc Hi there. I'm a stack-allocated array. I'm filled with garbage until
someone puts something useful in me, like zero bytes.

(Read:  Fix uninitialized array member access in pkg_add.  Bump to 20040421.)
2004-04-21 20:10:10 +00:00
wiz 0f952b0c54 Bump date for previous. 2004-04-11 13:31:17 +00:00
rh 56d86cdd8c 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.
2004-04-11 06:13:46 +00:00
abs 0be46fce4e Fix file descriptor leak in read_buildinfo() which caused one leaked
descriptor per package inspected. 'pkg_add *' in a large directory now
works.  Update PKGTOOLS_VERSION to "20040410"
2004-04-10 09:10:17 +00:00
tv 94b8c2cf60 Re-add umask() setting, and parameterize it so that pkgsrc/bootstrap based
pkgsrc platforms can override the value.
2004-04-09 18:27:48 +00:00
agc 1915cbb83e Fix signature verification after pkg_add and friends were changed to use
fexec() - trying to exec "gpg --verify %s" won't work with fexec, so split
up the command into separate words.
2004-04-06 05:56:07 +00:00
tv 45669ab694 Changes to make these work on Interix: remove nonroot warnings if on
Interix, and remove absolute setting of umask in pkg_add.
2004-03-29 21:41:39 +00:00
jlam 0c45ef07f3 Don't warn and abort if a package with the same ${PKGBASE} already exists
if we're installed a depoted package.
2004-01-14 23:32:36 +00:00
grant 99871d087e 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.

bump version to 20030113.
2004-01-13 08:30:34 +00:00
hubertf d7b7063649 In the "quick depends pre-scan", first print all bad matching depends,
then exit (instead printing one conflicting pkg/version on each run).
2004-01-04 01:47:35 +00:00
grant dd46f97f58 use the --use-compress-program argument to tar and do away with
the file descriptor handling mess in lib/file.c.

also use --fast-read where applicable.

result of pkg_info -B on 1.5ghz pentium4, linux:

			before		after
mozilla-1.4nb1.tgz	1.96sec		0.04sec
mozilla-1.4nb1.tbz	18.66sec	0.21sec

866mhz pentium3, NetBSD:

			before		after
mozilla-1.4nb1.tgz	2.22sec		0.07sec
mozilla-1.4nb1.tbz	16.29sec	0.34sec

-rw-r--r--    1 grant    users    13816195 Dec 20 13:59 mozilla-1.4nb1.tbz
-rw-r--r--    1 grant    users    15814227 Dec 20 13:58 mozilla-1.4nb1.tgz

XXX fetches over ftp/http still read the whole file.
2003-12-20 03:31:56 +00:00
grant 15fff85a6b always print an error when package addition fails (rather than only
when -v is used), tweak error.
2003-12-20 02:19:21 +00:00
grant 70ba7aa408 check the OS, architecture and version of a package against the host
and spit out a warning if any of them differ. bail if the OS or arch
differ. installation can be forced with -f.

sanity checked by simonb. fixes PR pkg/18966 from mrg.
2003-12-20 00:47:18 +00:00
wiz f13972188c Bump date for previous (oops :) ). 2003-10-03 15:42:22 +00:00
wiz 38e730c27c Add HTTP support.
Thanks to dillo@ for extensive review and jmmv@ for testing.
Remaining bugs are, of course, mine.

Closes PR 10006.
2003-10-03 15:40:27 +00:00
agc 8dc14b2f96 Cast the type of argument printed, for sparc and arm platforms. 2003-09-24 06:18:16 +00:00
wiz acbbe02c81 Add some free()s in error cases. 2003-09-23 09:47:20 +00:00
wiz 7e60425a84 Get rid of lots of system(3) (partly via vsystem) calls.
Previous version reviewed by agc.
Closes PR 20518.
2003-09-23 09:36:04 +00:00
grant fd9dca3d28 don't assume mtree is in BINDIR, allow it to be overridden by
MTREE_CMD.
2003-09-23 06:19:45 +00:00
wiz 376ac9e3f6 Bump date for previous. 2003-09-08 07:12:53 +00:00
jlam 449bc6e566 Note that LOCALBASE and PKG_VIEW in the environment will affect the
behaviour of pkg_add(1) indirectly by affecting the behaviour of
pkg_view(1).
2003-09-08 07:01:30 +00:00
jlam 6a37e1039a When adding depoted packages into the depot, manipulate the correct
pkgdb.byfile.db by using the fact that depoted packages have their
dbdir == ${DEPOTBASE}.
2003-09-08 07:00:10 +00:00
jlam 1a174cde55 Merge src/usr.sbin/pkg_install on the pkgviews branch into the HEAD by
running:

        cd src/usr.sbin/pkg_install
        cvs update -Pd -A
        cvs update -Pd -j pkgviews-base -j pkgviews
2003-09-02 07:34:47 +00:00
tron a58c832dd6 Replace calls to vsystem() by calls to fexec() or fcexec(). 2003-08-25 10:35:28 +00:00
tron 2f1b656bac Replace a few calls to vsystem() with calls to fexec() to speed up
operations.
2003-08-24 21:11:37 +00:00
salo d6a8052848 netbsd.org->NetBSD.org 2003-07-25 12:14:10 +00:00
itojun 49a751869e use bounded string op as much as possible 2003-07-14 06:17:54 +00:00
itojun 041bd7648a use bounded string op as much as possible 2003-07-14 06:00:44 +00:00
agc 582cc64a31 Set the program name via setprogname(3). 2003-06-05 13:15:43 +00:00
seb 2eb61ac136 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.
2003-04-23 10:02:23 +00:00
hubertf 4af963d89d Rename "upgrade" variable to "Replace" (etc.) as that is what it's really
for. Assorted text updates.
2003-04-22 01:17:03 +00:00
grant ef79ced85d improve error when there's not enough space to unpack in PKG_TMPDIR. 2003-04-10 16:12:38 +00:00
seb f34edd6ece Pkg_add fix: if an install script is present move it into LogDir
(PKG_DBDIR/PKGNAME).  Address PR pkg/20856 and part of PRs pkg/20852,
pkg/20853 and pkg/20854 by FUKAUMI Naoki <naoki at fukaumi dot
org>.

Note: with this change pkg_tarup can now produce reusable binary
packages from installed packages when they depend on an install
script.
2003-03-24 22:13:54 +00:00
hubertf 6b5ef93cc3 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.
2003-03-24 13:47:13 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
abs fd83215c8b Allow '%D' to be used when no last_file available. Fixes binary package
installation of gnome-dirs.
2003-02-02 12:59:53 +00:00
agc 17a35e2e99 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.
2003-01-10 11:55:44 +00:00
agc 51ace543e3 Order the getopt(3) options alphabetically. 2003-01-10 10:55:25 +00:00
agc 9d61d2fff1 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.
2003-01-05 21:49:51 +00:00
agc 1b535c4ef0 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.
2003-01-05 21:27:20 +00:00
grant 0a51ab8aee replace use of alloca() with the more portable malloc()/free(). 2002-11-29 08:31:06 +00:00
taca 445a837973 Add 'p' option to TARX_CMD's argument for preserving file mode.
This fixes the problem that pkg_add(1) drops setuid/setgid bit.

This problem occurs on pax(1) based tar environment.
pkgtools/pkg_install should be fixed, too.
2002-11-28 23:52:31 +00:00
grant f437cb0639 s/anyways/anyway/ 2002-11-05 07:34:31 +00:00
christos 590fa669c8 - eliminate the hard-coding of pathnames in the default install.
- all command executions now use the path [execvp/execlp/system].
- normalize the macro names as <COMMAND>_CMD.
- in some OS's full pathnames for commands can still be provided, but this
  is not the default.

This was needed to fix -DTAR_FULLPATHNAME="/usr/bin/tar"
2002-10-17 03:31:33 +00:00
wiz 5e977f5ead Ispell. Begin new sentences on a new line. 2002-09-26 01:41:51 +00:00
uebayasi 6a49247a32 Sprinkle .Xrs to packages(7). 2002-09-24 03:18:00 +00:00
abs acfcf99e58 Do not prepend '.' to path when looking for dependencies for a package
specified without any path components. (Pointed out by Takashi Yamamoto)
Rename path_remove_first() to path_prepend_clear().
2002-08-29 21:46:33 +00:00