Commit graph

751 commits

Author SHA1 Message Date
jschauma
43f0484488 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
2003-03-29 18:41:56 +00:00
jmmv
0916498c1b Place WRKSRC where it belongs, to make pkglint happy; ok'ed by wiz. 2003-03-29 12:40:00 +00:00
jmmv
17bba8aa70 Update to 3.49: make sure WRKSRC is properly placed in the second section,
the one starting by DISTNAME (if present). Ok'ed by wiz.
2003-03-29 12:34:10 +00:00
jschauma
ecf8957d51 Update to 1.3:
pkg_tarup now gives ${HEAD}
2003-03-29 04:25:10 +00:00
wiz
28a4483bc7 NO_PATCH is deprecated, says pkglint. Remove it. 2003-03-28 21:14:10 +00:00
wiz
477778d025 Update to 3.48: Avoid including the same buildlink2 files over
and over and over and over again. Among others, this makes pkglint work again
for x11/gnomepanel.
2003-03-28 20:22:22 +00:00
atatat
363c2198a2 Fill in default values for DESTDIR (empty), LOCALBASE ("/usr/pkg"),
and X11BASE ("/usr/X11R6"), which, while they might not be right for
*every* system, are certainly more right than UNDEFINED.

Give lang/python/pyversion.mk a little help by stuffing the material
from PYTHON_VERSIONS_ACCEPTED into the two places it expects it (since
lintpkgsrc doesn't do .for loops), add support for the ${FOO:S/foo/&/}
construction, and tweak the .if handling for && and || bits.

This has the following effect on the -g output (as a simple measure):

	% grep -c UNDEFINED before after
	before:58
	after:1

Jump to 3.47.
2003-03-27 05:16:11 +00:00
atatat
d708edcde7 Stuffing the value of MAKE into the environment seems to have
undesirable side-effects, so simply call $make directly.

Jump to 2.4.
2003-03-26 04:50:18 +00:00
atatat
67a94dc41f Add -F for "fetch" output, so that you can pre-fetch all the distfiles
you need and then build off-line (suggested by smb).

Add -M to set the name/location of the make program (for the -F and -R
output formats) to be used on systems where the make program is not
the one you want (suggested by seb).

Clean up a bug with subgraph assignment and counting.

Move to 2.3.
2003-03-25 18:21:20 +00:00
jschauma
ef6b1ec568 Sync with main sources:
Date:           Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
	pkgdb_open
	{ pkgdb_iter, pkgdb_retrieve }
	pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.

Date:           Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.

Date:           Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
2003-03-16 19:44:09 +00:00
atatat
7aa8b3fea0 Add -A, which causes -R to print a list of pkg_add commands (instead
of commands to rebuild directly from pkgsrc), -K (as with lintpkgsrc)
as a way of specifying the PKG_PATH (the environment is also checked),
and convert to using Getopt::Long, so that we can stuff multiple
values for "out of date" packages or packages to be "updated" into
arrays.  Now you can make more than one package be out of date, etc.
2003-03-14 23:39:54 +00:00
atatat
21ae0a0fcd Bump pkgdepgraph to 2.1. New stuff:
* label the graph and the subgraphs (feature)
* rework subgraph identification in the main loop (feature)
* better handling of recoloring graphs that contain subgraphs (bugfix)
* be a little more picky about what *might* be a pkg directory (bugfix
  via seb)
* fix a bug in error reporting in canonification routine (bugfix via
  seb)
* add comments (bugfix?  feature?)
2003-03-10 22:31:20 +00:00
atatat
af0c469421 Jump to pkgdepgraph v2.0.
New features (excerpts from the man page, not in proper order, so that
you can better see how it fits together):

     -L       Limit the graph to those packages that are out of date or ulti-
              mately depend on some package that is.

     -D       Instead of the standard graph output, pkgdepgraph lists the
              packages that need to be deleted, in ``least required first''
              order, so that they can be deleted without any dependency prob-
              lems.

     -R       Instead of the standard graph output, emits a series of sh(1)
              commands that will rebuild all the out of date packages by re-
              building all the deleted leaf packages.

     -U package
              Generates a graph with only the out of date dependencies of
              package marked in red (ie, packages that are out of date but not
              dependencies of package will not be considered out of date).

     -f       Force a rebuild of all dependent packages.  This option is for
              use in conjunction with the -U option to force a rebuild of all
              the dependencies of a package to be updated.

     -O package
              Marks package as out of date so that you can see the impact of
              deleting dependent packages and rebuilding everything.

     -t target
              Changes the target of the -R output from ``install'' to target
              in case you want to ``make package'' or some other target.

     -c       Inserts a ``make clean'' command in the set of instructions to
              rebuild packages (see the -R option) after they are installed.

     -C       Asserts -c and adds ``CLEANDEPENDS=YES'' so that all rebuilt de-
              pendencies are cleaned as well.

The code was also cleaned up a bit, some unused or otherwise useless
variables were culled, the "multiple box" phenomenon of subgroups is
fixed, and the examples were all cleaned up to take advantage of all
the new features.

	Hey ma!  Now I can update my pkgs in four easy steps!

           $ lintpkgsrc -i > pkgdepgraph.in
           $ pkgdepgraph -R pkgdepgraph.in > rebuild.sh
           $ pkg_delete `pkgdepgraph -D pkgdepgraph.in`
           $ sh rebuild.sh
2003-03-06 21:13:13 +00:00
grant
9e16a225ad correct #ifdef misplacement. 2003-02-18 15:45:50 +00:00
grant
1231d45b34 Fix some RCS ids. 2003-02-11 16:48:22 +00:00
grant
be9eb6014e belatedly sync with src:
Allow '%D' to be used when no last_file available. Fixes binary package
installation of gnome-dirs.

crank PKGTOOLS_VERSION to 20030202.
2003-02-11 16:42:06 +00:00
grant
3833154e3f belatedly sync with src:
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined,
else return EXIT_SUCCESS unconditionally (as in other functions dealing with
db functionality).

fixes build problem on Solaris when no libdb is available.
2003-02-11 14:40:55 +00:00
dmcmahill
4ffdc89ed9 update to cdpack-1.5. The primary change is the addition of a '-dvd' option
which creates DVD sized images instead of the default CD-ROM sized images.
Prompted by the current size of an i386 CD-ROM set (7) and the suggestion
by David Brownlee that we create DVD images.
2003-02-05 15:01:57 +00:00
wiz
f1a0c20c6b Remove old ftp site from comment (noted by Tilman Linneweh).
Correct itojun's name (s/Itoh/Hagino/).
2003-02-01 13:37:33 +00:00
abs
64e8e0c656 Make excessive use of :Q in MAKE_ENV to placate pkglint 2003-01-31 12:18:31 +00:00
abs
cf5f085aa2 Update pkglint to 3.46
Check MAKE_ENV and similar variables which contain ${ use :Q or are quoted
2003-01-28 22:44:00 +00:00
atatat
7fc6b6a0bb Add a simple "extract" step so that local patches can be maintained
easily.  This only affects the build process, so PKGREVISION is not
bumped.
2003-01-27 17:59:01 +00:00
wiz
e6eec147e8 Update to 3.45:
Accept commented out SUBDIRS in category Makefiles, if a comment
with a reason is given.
2003-01-24 15:16:31 +00:00
atatat
70dc0105da Add -E and -I to lintpkgsrc for the "exporting" and "importing" of a
"database" that lintpkgsrc can use in lieu of scanning all the pkgsrc
Makefiles.

This has several nice effects, chiefly:

(1) Using any of -B, -O, -R, -S, -V, -d, -g, -i, -p, or -u, are now
*much* faster since reading the "database" takes at most 3 seconds on
my laptop, whereas reading all the Makefiles takes at least 3 minutes.

(2) One can now check for out-of-date packages on machines which do
not have an expanded pkgsrc tree simply by copying the "database"
over.  Note that the database will inherently have some dependencies
on the environment of machine where it is generated (eg, mk.conf
settings, architecture type, etc).

Reviewed by the wiz.
2003-01-24 15:00:41 +00:00
jmmv
947d414a10 Update pkg_comp to 1.6:
- Allow the user to issue any command inside the chroot environment using the
  "chroot" target, instead of only running ROOTSHELL. Patch provided by seb.
2003-01-24 09:41:27 +00:00
agc
6971ca3b19 Make sure PKG_DBDIR exists before installation, "just in case". 2003-01-22 07:35:40 +00:00
heinz
fd27969399 Use PAX instead of CP (Solaris 'cp' cannot copy symlinks) 2003-01-16 21:37:58 +00:00
rh
0a4ba337b3 Update pkglint to 3.43. Check for hard coded share/locale and lib/locale
within PLIST.
2003-01-15 23:41:31 +00:00
jschauma
c6bead9a14 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.
2003-01-14 15:18:32 +00:00
jlam
3e7b1ad078 Update pkgtools/x11-links to 0.12. Changes from version 0.11 include
teaching x11-links about Xrender libraries and headers via Xrender's
buildlink2.mk.
2003-01-14 09:31:20 +00:00
grant
a15641f873 add .dylib files for Darwin.
This allows X packages to be built on Darwin.

bump pkg version to 0.11.
2003-01-13 09:47:47 +00:00
grant
e367b82852 fix typo: llibXcursor.a. 2003-01-13 09:34:36 +00:00
wiz
caf9bca16b Comment out (non-cat) man pages, currently not installed. 2003-01-12 02:33:02 +00:00
wiz
116e6e6311 Add } that got lost in last. 2003-01-11 11:59:35 +00:00
schmonz
78cacfcfc5 Fix cut-and-paste whitespace damage. 2003-01-11 07:54:28 +00:00
schmonz
dfae993934 On NetBSD, man pages were getting installed into /usr/man. That's,
like, so 80's! Pass a value more appropriate for the current decade
to --mandir via CONFIGURE_ARGS, and let ./configure set this in
the Makefiles.

Install catted man pages with the suffix ".0" rather than ".1".

Bump PKGTOOLS_VERSION.
2003-01-11 07:52:15 +00:00
rh
694780dbd9 Update pkglint to 3.42:
* Add a PKGLOCALEDIR check to pkglint: warn if PKGLOCALEDIR is in
	  PLIST, USE_BUILDLINK2 is set, and USE_PKGLOCALEDIR is not set.
2003-01-11 04:42:57 +00:00
agc
35552e5746 Add PKG_PRESERVE to the package Makefile.
Keep the old NO_PKG_REGISTER and NO_PACKAGE definitions for now,
rather than force everyone to upgrade their pkg_install sources to
today's version.

At the next bsd.pkg.mk bump of PKGTOOLS_REQD, this can be readdressed.
2003-01-10 12:01:43 +00:00
schmonz
e0b7a580e0 Define NO_PKGTOOLS_REQD_CHECK, which will mean something in a moment.
Rather than override LOCALBASE, set PREFIX (after including bsd.pkg.mk).

Bump PKGTOOLS_VERSION (many changes since 20021123).
2003-01-09 13:13:04 +00:00
schmonz
85caee66fe Define NO_PKGTOOLS_REQD_CHECK, which will mean something in a moment. 2003-01-09 13:11:10 +00:00
uebayasi
a37165e271 Update to 2.5.
* Be careful not to print duplicate blanks around buildlinked
	  dependencies.
2003-01-09 02:21:30 +00:00
uebayasi
0a2245e865 Update to 2.4.
* Be careful not to print duplicate blanks around buildlinked
	  dependencies.
2003-01-09 02:21:29 +00:00
jmmv
655c2c15d5 Update pkg_comp to 1.5. Fixes:
- Check if all sets exist before extracting any of them.
- Treat EXTRAMK properly: only process the variable if it is non-empty.
2003-01-08 17:57:42 +00:00
jschauma
4b2164510a ``On second thought, let's not go to Camelot. It is a silly place.''
(Make pkdb_open return pkgdbp!=NULL as src's does, and revert previous
patch.  As discussed with agc.)
2003-01-07 16:43:56 +00:00
jschauma
37f8100ca0 Unlike pkg_install in src, this version of pkg_install contains
a pkgdb_open that may return one of _three_ values (0,1,-1), so that
we can not simply use
if (!pkgdb_open(ReadOnly))
but need to use
if (pkgdb_open(ReadOnly) == -1)

Mea culpa.
2003-01-07 16:10:02 +00:00
grant
6917a552fa sync with src:
In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.

Do some CSE in pkgdb_iter().

Use the db access functions in the proper manner.

Also fix some whitespace nits.
2003-01-07 06:42:28 +00:00
jschauma
588eb561c1 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.
2003-01-06 04:34:15 +00:00
tron
9b88cf0cee Create a symlink for "lib/libXdpms.a" which is required to build e.g.
"xlockmore" on NetBSD-i386 with XFree86 3.3.6. This fixes PR pkg/19330
by Michael van Elst.
2003-01-03 10:34:39 +00:00
tron
db866bd3f8 Link bitmap files again because they are e.g. need to build the
"enlightenment" package. Bump version number to 0.10.
2003-01-03 10:22:04 +00:00
schmonz
a047ece31c Update to 3.41:
- replace occurrences of "make" with @MAKE@

- add @MAKE@ to the list of variables to get sod (I never learned
  properly how to conjugate "sed")

- warn about NO_PATCH, since it hinders more than it helps

- remove NO_PATCH from Makefile to quell new pkglint warning
2003-01-02 22:58:41 +00:00