Commit Graph

643 Commits

Author SHA1 Message Date
christos 3b6811d33b PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
    http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
2006-03-26 18:11:22 +00:00
hubertf dc01675c5a Put check if "best" is empty back into the right place, messed up
in previous commit.
Noted by yamt@
2006-03-17 17:46:44 +00:00
erh 840c5222df 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.
2006-03-17 05:32:11 +00:00
hubertf 986192d148 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
2006-03-17 02:37:31 +00:00
hubertf 3c5de91c39 pkg_do(): only use cp2 if it's really set to something useful
Coverity CID 1176
2006-03-17 02:31:44 +00:00
hubertf fc4fb72e38 findbestmatchingname_fn(): catch possible problems if best (vp)
contains some strange name (shouldn't happen, but ...)

Coverity CID 869
2006-03-17 02:20:46 +00:00
hubertf 92acb1f6e9 findbestmatchingname_fn(): only do something sensible if the pointer
handed in is actually usable (not NULL)

Fixes Coverity ID 870
2006-03-17 02:10:55 +00:00
hubertf baf66cc3f1 We can't sprintf() into a NULL pointer - catch that properly
for ALL cases.

Coverity CID 861
2006-03-17 01:58:25 +00:00
hubertf 19dcd9a850 Fix filedescriptor leak
Coverity CID 1625
2006-03-17 01:10:53 +00:00
reed 1b379e628e Fix the "Cannot chdir" error message to actually show the
problem directory name for lsbest and lsall.

For example:

# pkg_admin -d /usr/packages/DragonFly/1.4.0/i386/All lsbest 'gmake>0'
pkg_admin: Cannot chdir to /var/db/pkg: No such file or directory

Should show:
pkg_admin: Cannot chdir to /usr/packages/DragonFly/1.4.0/i386/All: No such file or directory
2006-03-06 20:00:10 +00:00
joerg 32ce5ba905 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 disabled by default on NetBSD.
2006-01-25 00:17:34 +00:00
wiz d0fb2fc679 Use MaxPathSize instead of PATH_MAX (like everywhere else here). 2006-01-08 12:20:54 +00:00
christos 5d62e1710e sync with pkgsrc version. 2006-01-04 23:36:14 +00:00
dillo 4793781929 (pkg_do) When marking already installed package as manually installed,
only print message if we succeeded.

Noted by wiz.
2005-12-08 19:26:28 +00:00
ben d221099506 Specify the full path to tar when unpacking a package.
Modify pfcexec so the new process file name can be different from argv[0].
This fix is from Peter Postma, and it addresses PR#32228
2005-12-06 01:07:30 +00:00
hubertf e968750664 Only warn about running as non-root when -v is given
(or when running in non-unprivilegedmode, but how to detect?)
2005-12-03 01:08:38 +00:00
ben ab821d396a Correct PAX_CMD to be pax. 2005-11-28 01:49:39 +00:00
ben 81789679db Conditionally include header files, and include nbcompat.h
Addresses PR#32149
2005-11-23 14:58:16 +00:00
tron 173505f438 Remove unused variable "argc" in function apply_perms(). 2005-11-23 12:01:30 +00:00
ben ed4b2f6172 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().
2005-11-23 04:59:14 +00:00
dillo f05d706e05 Bump version for ``pkg_info -Q against local binary packages'' fix. 2005-11-14 09:41:43 +00:00
dillo b6b652227e Fix first part of PR 32068: pkg_info -Q broken for local binary packages
Add BUILD_INFO_FNAME to the files to extract for SHOW_BI_VAR.
2005-11-14 09:39:44 +00:00
agc 2ca444e0bd Get rid of cvs merge botch in previous. 2005-11-13 20:37:23 +00:00
agc d6e9c48326 The Dewey number comparison routines were added by myself in 2002 in
revision 1.32 of pkg_install/lib/str.c, and have absolutely nothing to
do with the original FreeBSD utilities.

Place the appropriate (3 clause) copyright on this file.
2005-11-13 20:07:41 +00:00
wiz 41fb8f4fed Handle -1 return value from dewey_match. 2005-11-13 19:48:35 +00:00
wiz 45be6e647e Do not use errx in dewey_match, return -1 instead. 2005-11-13 19:48:19 +00:00
wiz 7ef0b27ab9 Remove some unnecessary header includes. 2005-11-08 20:16:53 +00:00
dillo e68029a308 Bump version for pkg_info -B fix. 2005-11-07 23:20:49 +00:00
dillo 831ae4eb35 Don't add INSTALLED_INFO to the list of files to extract from binary
packages, it will never be there.

Fixes pkg_info -B against binary packages broken when INSTALLED_INFO
support was added.
2005-11-07 23:19:55 +00:00
wiz 752535d165 Replace wait(2) with equivalent waitpid(2); for Linux, reported by wulf@
on tech-pkg.
2005-11-07 22:57:07 +00:00
wiz 2fa51c716a Sync with pkgsrc: wrap some headers in #ifs. 2005-11-07 22:53:41 +00:00
wiz a1e41eed09 Use config.h and add appropriate #if HAVE_FOO_H. 2005-11-06 12:40:02 +00:00
wiz f0f9d6a437 Add compat #ifdefs from pkgsrc, to make syncing easier between the
two versions.
2005-11-05 13:11:02 +00:00
hannken ba2ee12485 Make it compile on sparc/sparc64. Cast size_t to int for field precision. 2005-11-04 09:26:05 +00:00
dillo 8af62fd627 Split dewey compare functions into their own file dewey.c so they
can be used in a forthcoming Perl module.

Joint work with Thomas Klausner.
2005-11-03 21:59:55 +00:00
dillo 75b9797969 Implement framework to store variable=value pairs about an installed package.
Use this in pkg_add to mark installed dependencies as automatically installed.

pkg_add: new flag -A: marks package as automatically installed.
pkg_admin: new commands set and unset to modify variable pairs for
	   installed packages.
pkg_info: report these variable pairs with -Q/-B.
	  new flag -u: report only manually installed packages (not
	  installed with pkg_add -A).
	  Error out if -a/-u and a package name is specified.

Joint work with Thomas Klausner.

As discussed on tech-pkg.
2005-11-03 21:16:41 +00:00
joerg 82543d8598 Treat FTP error 450 like 550, otherwise pkg_add from a proftpd server
can hang.

Submitted-by: Eirik Nygaard
2005-10-30 21:52:02 +00:00
hubertf b7cc645889 Bump version to 20050718 for fixed IGNORE_RECOMMENDS handling. 2005-07-18 09:09:35 +00:00
hubertf aba8b403bc Fix PR pkg/30658: don't fail for pkgs that were built with IGNORE_RECOMMENDED,
just issue a warning.

Checked by wiz@, no reply from original author (rh@) after several weeks. :(
2005-07-18 09:06:48 +00:00
hubertf 390553bef2 cleanup: preserve errno. Needed so err() functions ran after running
cleanup(0) print the correct error message.
2005-06-29 01:40:42 +00:00
hubertf 9a9bdaa985 Fix 'pkg_add -R' handling - not registering really means not touching
the pkgdb too - useful for pkg_add as non-root!
2005-06-29 01:39:37 +00:00
wiz 7a9582b62a Spread some more unsigned for less casts. 2005-05-31 22:29:41 +00:00
wiz 0ba4110751 Move unsigned to where it belongs, to remove a cast. 2005-05-31 21:03:58 +00:00
wiz 8529448f16 Comment out too noisy warning. 2005-05-30 19:44:03 +00:00
wiz 1723911d3c Add ranges support to the pkg_* tools. See mail on tech-pkg or
pkg_info(1) for details.
Co-production with dillo@.
Bump PACKAGE_TOOLS_VERSION to 20050530.
2005-05-30 13:10:14 +00:00
minskim 773938ed0f If a pattern does not have any suffix, assume that it matches both
".tbz" and ".tgz".  This allows to install binary package dependencies
that are not exact matches, but satisfy requirements.

Bump version to 20050529.
2005-05-29 19:16:18 +00:00
rillig 360e66cfd6 Output the error string when renaming a dependency file fails. This has
happened to me when I had a misnamed directory in the pkgdb directory.
2005-05-10 00:06:57 +00:00
wiz 968dbe95c1 Instead of exec(2)ing rmdir(1), just use rmdir(2).
Reviewed by dillo.
2005-05-07 15:09:41 +00:00
wiz 0ae4504a04 Fix Dq argument, which somehow ended up on the next line. 2005-05-06 23:02:39 +00:00
wiz 756bc811ee Document the vulnerable subdir.
Reviewed by dillo and rillig.
Some minor fixes while I am here. Bump date.
2005-05-06 22:45:56 +00:00