Commit Graph

632 Commits

Author SHA1 Message Date
simonb
9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +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
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
itojun
1e803d1e8b missing period at the end of sentence 2004-04-19 18:43:26 +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
84c1ac8b80 Datestamp as 20040409 to mark umask change. 2004-04-09 18:36:08 +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
reed
ef78b0e16e Some package names are extra long, like xscreensaver-gnome-4.13
and gdk-pixbuf-gnome-0.22.0nb1, so make sure that lines don't wrap.
Instead of having maxline based on MAXNAMESIZE, have it be based
on the length of the package name if longer than MAXNAMESIZE.
(This was discussed on tech-pkg list in November, 2003.)
2004-04-01 02:37:24 +00:00
tv
fd77b8c8a1 20040330: changes for Interix; in particular, pkg_add(8) no longer sets
umask explicitly.
2004-03-30 15:16:17 +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
wiz
eca6d46226 Check pkgdb_open for correct return value.
From Peter Postma in PR 24863.
2004-03-22 11:42:51 +00:00
keihan
21e07a3de8 s/netbsd.org/NetBSD.org/g 2004-03-16 14:31:15 +00:00
wiz
e3fc4b66c3 Spell the plural of suffix "suffixes", not "suffices".
Inspired by PR 24400 by Todd Vierling.
2004-02-13 17:56:17 +00:00
grant
47af3cdb37 no .Ek before .Bk. 2004-02-07 09:41:36 +00:00
reed
027c7dd739 Make sure that the Fake mode would give a Verbose message about
the package to be deleted.  (Previously, the Fake mode only mentioned
deinstalling other dependent packages but didn't say anything
Verbose about the package itself.)
2004-01-29 17:41:49 +00:00
reed
ab83e1a00d Improve explanations of the -R and -r options. This is partially
based on ideas from Greg A. Woods posted to netbsd-bugs list on
23/Jan/2004.
2004-01-29 01:56:17 +00:00
seb
fb913be01a Add missing flags from the synopsis.
Fix pasto in -S flag description.

Approved by wiz@.
2004-01-26 09:28:10 +00:00
agc
478a76b17a At package creation time, record the targets of symbolic links which
are installed as part of the package.

Enable the verification of the integrity of any symbolic links
in the package in "pkg_admin check".

Add a check to pkg_delete to verify the integrity of the symbolic link
before deletion, and to act in the same way as an MD5 failure if the
symbolic link has been modified since package creation time.

Bump version number.

Addresses PR 23048 from Klaus Klein.
2004-01-15 09:33:38 +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
83867bd596 no need to include errno.h. 2004-01-14 01:50:06 +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
wiz
b00ba831b1 Fix typo; new sentence, new line;
drop trailing spaces; add comma in enumeration.
2004-01-06 16:22:06 +00:00
hubertf
26d5e2165c Rework a bit to describe the pkg wildcards in their own
section, etc.
2004-01-06 16:15:06 +00:00
hubertf
81887c8837 update for -D being default now for pkg_info 2004-01-06 15:51:44 +00:00
hubertf
df32174c19 pkg_info(1) now also shows post-install message by default, if present 2004-01-06 15:48:47 +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
wiz
d707a66aa2 Sort options; drop trailing spaces; fix wording of
a sentence.
2003-12-21 11:39:17 +00:00
agc
2bd28cbd5e Add a simple text menu-based binary package manager, bpm(1).
bpm uses ftp(1) and pkg_add(1) to allow a menu-based addition of
binary packages from a URL.  It first displays a list of categories,
and, within categories, binary packages, which can be added to the
local system simply by choosing them from a menu.

If no valid categories are found, a warning message will be displayed
(it is usually caused by people running NetBSD-current, and there are
rarely binary packages provided for such a fast-moving target, and the
"-r release" command-line switch to bpm(1) should be used).

Bump the pkg_install version number for this.
2003-12-21 11:31:46 +00:00
grant
16fffca4df avoid uninitialized variable. noted by wiz. 2003-12-20 10:09:20 +00:00
grant
fc04f37975 crank version. 2003-12-20 03:41:31 +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
683625bd0a suppress a diagnostic message unless -v is used. 2003-12-20 02:37:49 +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
0b46b8198f Fix typo, reported by Soren Jacobsen in PR 23666. 2003-12-06 08:25:39 +00:00
wiz
e0cae3a80b Bump version for wait-for-child fix. 2003-11-21 22:05:06 +00:00
wiz
4e536677a2 Wait for decompress child before continuing.
Closes PR 23526 by Ron Roskens.
2003-11-21 22:04:32 +00:00
grant
cacf2d0f45 s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
fvdl
82ac6194ae Don't compare an int to NULL. 2003-10-21 02:48:07 +00:00
grant
d5f2632867 minor style nit 2003-10-06 00:44:15 +00:00
wiz
9445c4eef4 Sort names. 2003-10-04 00:53:12 +00:00
wiz
3683b30e87 Add me here, too. 2003-10-04 00:51:31 +00:00
wiz
c87a7072e8 Replace strnncpy calls with strlcpy calls. Remove strnncpy.
Ok'ed by agc and hubertf. Verified working with editors/mule package.
2003-10-04 00:50:34 +00:00
wiz
e2b595e0ce Indent, and remove some #if 0-ed code. 2003-10-03 19:55:34 +00:00
wiz
f13972188c Bump date for previous (oops :) ). 2003-10-03 15:42:22 +00:00
wiz
297eaf11ad Bump version to 20031003 for added HTTP support. 2003-10-03 15:41:03 +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
wiz
fb41fcc067 Make compile with STANDALONE defined. 2003-09-25 22:31:35 +00:00
wiz
c605c0c28e s/lukemftp/nbftp/, fix two typos. 2003-09-25 22:14:16 +00:00
agc
8dc14b2f96 Cast the type of argument printed, for sparc and arm platforms. 2003-09-24 06:18:16 +00:00
christos
b3601bdfc6 reset values when malloc fails. 2003-09-23 15:07:43 +00:00
wiz
2095b365b2 Avoid shadowing err. 2003-09-23 14:55:01 +00:00
wiz
f220a7df77 Add prototype for remove_files. 2003-09-23 14:54:53 +00:00
wiz
161f3f684b Remove last vsystem caller and vsystem() itself. 2003-09-23 14:23:53 +00:00
agc
342644fea5 Add <sys/wait.h> so that we have a prototype for waitpid(3). 2003-09-23 14:18:01 +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
889c15684e bump PKGTOOLS_VERSION for identification purposes (despite the lack of
any functional change).
2003-09-23 07:10:53 +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
grant
e37cded7b1 remove redundant comments about zoularis. 2003-09-23 05:39:41 +00:00
tron
01c3d246ff Add my name to the list of the culprits. 2003-09-20 17:17:40 +00:00
wiz
137c968ad5 Initialize cnt; from Greg A. Woods in PR 22862. 2003-09-19 17:44:53 +00:00
agc
4fe63c7eb9 Let pkg_admin(1) have a -S argument - some vendors' xargs(1) don't pass
a null ("") argument properly (hi, Sun), so make -S a synonym for -s "".

Don't dump core if no command is given to pkg_admin(1).

Print usage message to stderr, not stdout, and use the program name by
which it was invoked.

Bump pkg_install version to 20030918.
2003-09-18 09:56:20 +00:00
agc
54f9bdba40 Remove the names of arguments from function prototypes. 2003-09-17 13:27:42 +00:00
jlam
505c7e361d Update pkg_install to 20030914. Changes from version 20030913 are
ensuring that recursive pkg_delete'ing works by using the correct
pkg_dbdir to find packages.  This fixes recursive deleting if the
-K flag is passed to pkg_delete(1), and the named dbdir differs from
the default dbdir (/var/db/pkg).
2003-09-14 04:58:30 +00:00
jlam
2277c35f52 Update pkg_install to 20030913. Changes from version 20020912 are quieting
the file removal when deleting linkfarms if the expected file doesn't
exist.  Since the symlink isn't there, the mission is already accomplished,
so why bother with the warning?
2003-09-13 09:20:26 +00:00
jlam
1732738842 Update pkg_install to version 20030912. Changes from 200230907 are
adding two new options to pkg_admin(1) to simply using this utility to
list the bare package names that match patterns when looking in PKG_DBDIR:

      -b      Print only the basenames when matching package names for
              lsall and lsbest.

      -d lsdir
              Set lsdir as the path to the directory in which to find
              matching package names for lsall and lsbest.
2003-09-13 05:48:50 +00:00
jlam
f310627cee Fix a bug I accidentally introduced in rev. 1.48 where a pkg_dbdir could no
longer be a symlink to a directory.
2003-09-10 17:28:59 +00:00
jlam
7297f559c5 Inverted a test by mistake. 2003-09-09 08:22:39 +00:00
jlam
f5e8befe51 Replace call to vsystem() with call to fexec() for speed. 2003-09-09 06:43:10 +00:00
jlam
154a25e9c8 Output the name of the pkgdb file from which we are removing entries
instead of just "pkgdb".
2003-09-08 22:19:25 +00:00
jlam
bfb9e5680c Allow the package entries in the pkgdbdir to be either directories or
symlinks to directories.  This gives the user more rope, but lets those
who know what they're doing to do what they want.
2003-09-08 22:11:12 +00:00
jlam
37365fbf87 It's "-d stowdir" not "-D stowdir". 2003-09-08 10:21:25 +00:00
jlam
198410e826 Use the pkgviews terminology from pkgsrc/mk/buildlink3/README consistently
in this man page: depoted packages are kept in their depot directories, and
pkg_view(1) manages instances of those packages in views.  Also copy the
warning in the pkg_delete(1) man page instead of the one from the
pkg_add(1) man page since the former correctly refers to package control
files already installed on the system.
2003-09-08 10:17:16 +00:00
wiz
a3a659ef72 Add options to SYNOPSIS; remove some fluff from Nd. 2003-09-08 09:12:35 +00:00
wiz
b897232ac9 Sort options; use Fl x instead of Ar -x; use Pq/Sq. 2003-09-08 09:11:12 +00:00
wiz
255fb463e6 Bump date for previous. 2003-09-08 08:57:56 +00:00
wiz
1b83dbb69f Sort options. 2003-09-08 08:57:42 +00:00
wiz
491ae8b74a Bump date for previous. 2003-09-08 07:14:29 +00:00
jlam
0d7b7e0f8f 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.

    * 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.
2003-09-08 07:13:29 +00:00
wiz
376ac9e3f6 Bump date for previous. 2003-09-08 07:12:53 +00:00
jlam
453f4348b6 Use "pkg_admin add|delete" to manipulate the pkgdb.byfile.db files in each
view so that they contain the correct information for the files stored in
each view.
2003-09-08 07:09:33 +00:00
jlam
751f88a06a When executing "pkg_delete foo", only delete it if "foo" resolves to a
unique package.  This makes deleting packages less surprising in a pkgviews
world where you can have multiple versions of packages installed at the
same time in the package depot.

Also make "pkg_delete -f" work depoted packages if they have been added to
views by also running "pkg_delete -f" for the package instances in the
views.
2003-09-08 07:08:11 +00:00
jlam
1bbe06780b Add new commands "add" and "delete" to pkg_admin(1):
add pkg ...
             For each listed package, write the absolute pathnames of the
             files listed in its +CONTENTS file together with the package
             they belong to into the package database.  This should be used
             only by pkg_view(1).

     delete pkg ...
             For each listed package, remove all file entries in the
             package database that belong to the package.  This should be
             used only by pkg_view(1).

These commands will be used by pkg_view(1) to keep the pkgdb.byfile.db
files for each view consistent with what's stored in each view.

Since we stole these names from the debug code, change the names of the
debug commands to "addkey" and "delkey".
2003-09-08 07:04:40 +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
140fe23a05 strlen(pkgname) only returns the number of characters preceding the NUL,
but the size of the data field in the pkgdb.byfile.db file is the length of
the string plus 1 for the NUL.  Fix this check so that removing all of the
files belonging to pkgname from pkgdb.byfile.db works again.
2003-09-08 06:41:23 +00:00
jlam
5fc555d16b Correct the documentation of the return values for pkgdb_open() and
pkgdb_remove_pkg().
2003-09-08 05:34:35 +00:00
jlam
8b2d4b4f3c Bump version to 20020824 after allowing users to use more than the default
view.
2003-09-03 12:52:30 +00:00
jlam
f7ddad56af Don't prevent users from using more than just the default view. Let's let
them try to use one of the good points of pkgviews right away.
2003-09-03 12:45:25 +00:00
jlam
b3a911d206 Remove parts that were there just to allow this to compile on NetBSD ~1.3.
We have this in pkgsrc and bootstrap-pkgsrc for those systems.
2003-09-03 12:44:01 +00:00
jlam
0430171011 Check the return from read on the file descriptor for the ftp process: if
we don't get anything, then it's an error.  From cb@netbsd.org in private
email.
2003-09-03 07:33:37 +00:00
wiz
c9af3bba1c Drop trailing space. 2003-09-02 07:42:08 +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
ce691fb888 Replace calls to vsystem() by calls to fexec(). 2003-09-01 17:43:23 +00:00
tron
f48c4e3753 Fix error in memory handling. 2003-08-25 10:52:23 +00:00
tron
a58c832dd6 Replace calls to vsystem() by calls to fexec() or fcexec(). 2003-08-25 10:35:28 +00:00
tron
c28355d067 Add a new library function fcexec() which allows to run a command after
changing the current directory.
2003-08-25 10:23:41 +00:00
tron
43b89589d9 Use "rm -fr" consistently. 2003-08-25 10:23:06 +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
tron
777ed45553 Add a new utility function which use vfork(2) and exec(2) directly instead
of system(3) to run an external program.
2003-08-24 21:10:47 +00:00
grant
3319bc243a we already print "creating package ..." in pkg_perform(), no need to
say it twice :)
2003-08-10 12:27:08 +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
wiz
88c9d9d14b Fix typo. 2003-07-04 12:17:32 +00:00
wiz
16562717af Quote % characters in macro lines. 2003-06-26 10:09:05 +00:00
hubertf
33ec91dbc6 deleting as non-root works fine, so don't insist on running as root 2003-06-25 23:12:42 +00:00
tacha
7a3ec6c576 Call tgetent only when TERM environment is set. 2003-06-23 16:46:57 +00:00
agc
7b2c1a6c22 Firstly, let's give credit where credit is due - the idea came from uwe.
Add the ability to pkg_info(1) and pkg_delete(1) to take a directory
name for the name of the package, so that shell-completion can help
when finding out information or deleting packages.
2003-06-19 08:54:29 +00:00
agc
706a03ef9c Make the "-f" switch to pkg_delete(1) into a counter. Require two "-f"
switches to delete a package that has been preserved. Document this
change.
2003-06-12 13:50:38 +00:00
agc
bc4c2ec6be Avoid one more annoying duplicated slash when prefix is "/" in pkg_create(1),
and one in the db cache file, which was causing pkg_info -F to produce the
wrong results with a prefix of "/".
2003-06-12 13:29:32 +00:00
agc
2efa359891 When displaying full pathnames of the package contents (pkg_info -L pkg),
don't add a '/' between the prefix and the name if the prefix is "/".
This avoids annoying annoying double slash filenames when the prefix is "/".
2003-06-05 17:58:05 +00:00
agc
582cc64a31 Set the program name via setprogname(3). 2003-06-05 13:15:43 +00:00
wiz
d75f1336b3 Uppercase URL. 2003-05-14 14:30:59 +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
6bc4824cf3 crank PKGTOOLS_VERSION for pkg_admin getcwd() fix. 2003-04-17 13:38:02 +00:00
grant
5cea86225d don't pass NULL as the 2nd arg to getcwd(), ala lib/path.c.
fixes 'pkg_admin lsall' and 'pkg_admin lsbest' on Solaris and probably
other platforms where getcwd() doesn't allocate a buffer when the 2nd
arg is NULL.

ok'd by simonb@
2003-04-17 13:32:21 +00:00
grant
6dbbe09cdf in delete_package(), always warn if there is a checksum mismatch,
improve text.
2003-04-14 23:42:21 +00:00
grant
680230355c improve a message 2003-04-11 19:57:06 +00:00
grant
b862bb2e33 bump version for last. 2003-04-11 14:16:45 +00:00
grant
c839e381ae fix comment, thanks simon. 2003-04-10 23:38:16 +00:00
grant
a8bd964bf8 min_free: Return size in a uint64_t since off_t isn't 64 bits on
all operating systems.
2003-04-10 23:31:26 +00:00
grant
dc7d730383 allow bzip2 support to work on earlier systems where tar has no -j
option, including NetBSD 1.5 and 1.6. noted by wiz.

also handle tar.gz, tar.bz2 and .tar filenames, and bomb with a useful
error if we don't know to handle a file.
2003-04-10 16:25:25 +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
grant
4253e0d3e1 pass -j to tar to read bzip2 binary pkgs.
bump PKGTOOLS_VERSION to 20030410.
2003-04-10 05:08:55 +00:00
hubertf
25f2d6e581 Bump to "20030325" after today's changes from seb and me 2003-03-24 23:33:44 +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
seb
3273d1bc8b 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.
2003-03-24 21:44:45 +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
hubertf
89b4984304 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.
2003-03-15 20:54:25 +00:00
agc
9d52ce445c Bump version string for pkgdb_dump changes. 2003-03-15 20:50:13 +00:00
agc
2c442ad8d2 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.
2003-03-15 20:49:25 +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
e6dc31f0dc Crank PKGTOOLS_VERSION to 20030202 for last_file fix 2003-02-02 20:54:17 +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
295b90edfd order the getopt options alphabetically. 2003-01-10 10:43:50 +00:00
agc
82e88920e0 Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).
Bump lib/version.h due to added functionality.
2003-01-10 10:17:21 +00:00
agc
60c7c151cc 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.
2003-01-06 10:03:44 +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
thorpej
61456e3f52 Avoid conflict with reserved identifier "exp". 2002-12-06 15:15:29 +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