Commit graph

161 commits

Author SHA1 Message Date
gdt
1ddd7f3cd0 Replace ${PKG_SILENT}${_PKG_DEBUG} with ${RUN}, per pkglint. 2007-11-07 16:50:00 +00:00
gdt
8b83dcbd56 use ${OLDNAME} instead of OLDNAME to make it clear that it's a
make variable.  Pointed out by rilling/pkglint.
2007-11-07 16:29:49 +00:00
gdt
61acf9d422 Allow make replace to replace a package with a name other than the new
one, via "make replace OLDNAME=oldpkgname".

Enhance replace-names to use OLDNAME if present.  Move replace-names
target before replace-tarup, and change replace-tarup to use the
computed oldname. Make deinstall respect OLDNAME.

Tested on netbsd-current with standard make replace and with OLDNAME.
2007-11-07 13:50:09 +00:00
rillig
8945fb054b Simpler .include lines. 2007-10-31 12:07:13 +00:00
rillig
a4361cd6f5 Switched two words, so that the version number of the package appears to
the right instead of the (strictly) redundant word "found".
2007-10-14 07:42:31 +00:00
rillig
e4e9db758a Added CVS Id. 2007-10-01 10:08:20 +00:00
rillig
192098606d Documented the used environment variables. 2007-09-27 11:11:32 +00:00
gdt
41baa6d8fa revert previous; it has trouble in two many places and 1) a fix isn't
obvious 2) we're in freeze, so restore to working as quickly as
possible.
2007-09-22 15:19:47 +00:00
gdt
398104408b When replacing, use the oldname as found in work/.replace_oldname to
tar up, instead of PKGBASE.

This enables modifying that file to have a package that isn't
automatically found be the replace target, e.g., "echo libglade2-2.6.2
> work/.replace_oldname" after make replace fails to find a package to
tar up when doing make replace in libglade.
2007-09-21 15:13:55 +00:00
rillig
c05db5893e Instead of the overly verbose "Required installed package", the type of
dependency (bootstrap, build, full) is printed.

When building a package that pulls in the basic tools as dependencies,
it is good to know whether these are build or full dependencies, so the
additional information is useful.
2007-09-21 07:27:41 +00:00
rillig
842f8b2745 Replaced _PKG_SILENT _PKG_DEBUG with the shorter RUN. 2007-09-20 18:30:34 +00:00
rillig
1316235db9 Replaced ${_PKG_SILENT}${_PKG_DEBUG} with ${RUN} and made the code simpler. 2007-09-07 17:01:10 +00:00
joerg
ae3dae849b Use the new pkg_add -m for cross-compiling instead of -f. 2007-08-15 13:20:57 +00:00
joerg
8eae292c51 Fix a number of bugs in the DESTDIR support:
- check-perms.mk was not DESTDIR aware, prefix files before passing it
  to the directory extraction
- PKG_FILELIST_CMD was calling pkg_info, which is fine for normal
  installation, but fails of course for DESTDIR. Just drop the @ lines
  from ${_DEPENDS_PLIST} and use that.
- To make he former work, ensure that _flavor-generate-metadata is part
  of _INSTALL_ALL_TARGETS. It was normally a dependency of
  _flavor-register, but that is skipped for DESTDIR.
- Remove ${_DEPENDS_PLIST} when running install-clean.
2007-08-14 23:58:24 +00:00
jlam
fe9b8d7edd Don't remove the whole metadata directory in _flavor-clean-metadata...
instead only remove the files generated by _flavor-generate-metadata.
This should preserve the +INSTALL and +DEINSTALL scripts (which are
created during the "build" phase") across a "make update" or a "make
deinstall".
2007-08-14 21:32:17 +00:00
gdt
28ac528511 Factor out _REPLACE_NEWNAME_CMD.
Use $$newname consistently rather than $PKGBASE and $PKGNAME.
Rationalize @ with STEP_MSG.
Ensure ${RUN} is used once, and all commands are included.
2007-08-13 14:18:23 +00:00
rillig
5002a8e475 Made the code simpler:
- Replaced ${_PKG_SILENT}${_PKG_DEBUG} with ${RUN},
- Moved the code to load oldname into a macro.
2007-08-13 08:33:45 +00:00
gdt
1d2084981e add missing \, reported my Mark Perkins 2007-08-11 14:18:05 +00:00
gdt
2a32611320 store +REQUIRED_BY and +INSTALLED_INFO in work/.replace-FOO rather
than in work/.pkgdb, so as not to lose them in install-clean.
Because of this, put them back explicitly.
(Fixes 'make replace loses +REQUIRED_BY', and also the unreported
'make replace loses +INSTALLED_INFO'.)
2007-08-10 17:57:28 +00:00
jlam
be040a55a4 Rename the generate-metadata and clean-metadata targets to _flavor- style
names to indicate that they are purely private to flavor/pkg.
2007-08-10 04:03:23 +00:00
jlam
6ea0c2868e Remove ${WRKDIR}/.pkgdb during "install-clean" as that directory
contains files that are generated during the "install" phase.  This
should fix the problem where PLIST modifications were ignored if the
PLIST was modified between a "make deinstall" and a "make reinstall".
2007-08-10 04:00:43 +00:00
jlam
7ea1d9339e Skip blank lines in +REQUIRED_BY files so that we don't error out trying
to locate the +CONTENTS file for a "blank" package.

Why are there blank lines at all in +REQUIRED_BY?
2007-08-08 16:39:05 +00:00
tnn
d5062d2372 Need to also unset unsafe_depends_strict along with unsafe_depends here. 2007-08-08 11:35:16 +00:00
gdt
873cb31073 Change the meaning of unsafe_depends to mean that a dependency has
been replaced which might have had an ABI change.  In practice, a
package is considered to maybe have had an ABI change if the version
changes.  Introduce a new tag unsafe_depends_strict, which is
unconditionally set on depending packages whenever make replace is
done.

This will cut down considerably on the amount of rebuilding required
with pkg_rolling-replace, while still guaranteing that packages are
rebuilt if there was an ABI change in a dependency.
2007-08-08 02:07:27 +00:00
gdt
f435245a77 Improve previous: Per tnn@ suggestion, don't do pkg_admin unset unless
+INSTALLED_INFO is present, to avoid complaint from pkg_admin (see
pkg/36741).  Separate tag removal into a separate target, and use
STEP_MSG and _PKG_DEBUG properly.
2007-08-08 01:44:24 +00:00
gdt
d5af98e19c Remove unsafe_depends and rebuild tags from a package just before
fixing up the required-by file.  The invariant on unsafe_depends (on
which pkg_rolling-replace depends) is once again maintained, but now
cleanly, rather than assuming that all tags are cleared.

(proposed on tech-pkg with no objections, and concurrence from tnn@)
2007-08-07 22:27:12 +00:00
adrianp
e67737df3a Use ${PKGTOOLS_VERSION} when detecting which version of pkg_install is
installed.  Idea from one of joerg@'s patches.
2007-08-04 11:21:08 +00:00
joerg
34c60ba2a2 Update _USE_DESTDIR=full handling to use the new -u/-g code and
require pkg_install-20070802 for using it. It is now considered
to work correctly and ready for general consumption.
2007-08-03 14:03:39 +00:00
jlam
e92540b3b8 Preserve any existing +INSTALLED_INFO file from an installed package
before replacing it, and restore it when the new package is installed.
This saves any state information that should be carried over to the
new package, e.g. automatic=yes.

XXX Still need to do the same when "un-replacing".
2007-08-02 23:00:18 +00:00
joerg
005620851f Add core of the infrastructure support for cross-compilation.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
  the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
  strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
  - modify include dirs to get the target /usr/include
  - modify linker dirs and runpath to use target /usr/lib at link time,
    but keep correct rpath entries

Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
2007-08-02 18:19:31 +00:00
adrianp
9b5c38d79d Add support for the upcoming pkg_install-20070714 which now includes
audit-packages.
2007-07-14 17:17:45 +00:00
joerg
34d85224d6 Don't cd to PREFIX, it might not exist yet. bin-install doesn't do
that either.
2007-07-13 14:42:53 +00:00
joerg
409b183fc0 Remove USE_MTREE support. Keep one copy (the NetBSD version) for
the purpose of print-PLIST in plist/common-dirs.mtree.

Discussed with wiz@, no objections on tech-pkg@.
2007-07-02 14:54:09 +00:00
rillig
0f21e6fc1c When a recursive make is run, stdin must be preserved. Otherwise su(1)
cannot ask for a password and fails. Patch provided by OBATA Akio in
http://mail-index.netbsd.org/pkgsrc-users/2007/04/23/0001.html
2007-06-15 10:39:08 +00:00
joerg
f3cceb12c3 Alter the pattern to detect upper limits to actually match some real
patterns. Otherwise the upper bound would silently get dropped.
2007-06-10 07:31:42 +00:00
jlam
bf1aa1dd87 Back out previous and always define the shell variable $silent
appropriately again based on the value of _BOOTSTRAP_VERBOSE.  This
code was lost in revision 1.27.

This should again suppress the output during "mirror-distfiles" in the
case where the bootstrap dependency is already installed.
2007-06-07 15:30:26 +00:00
rillig
fb21124de0 The variable $silent may be undefined, not only empty.
(This is needed for changing the "set -e" to "set -eu" in the ${RUN} macro.)
2007-06-05 13:19:10 +00:00
heinz
735d0a6656 Avoid usage of modern kinds of parameter expansion (##, #, %%, %)
because /bin/sh on Solaris doesn't understand this syntax and bmake
uses this ancient shell.
bmake should really be built with /bin/ksh or /usr/xpg4/bin/sh as the
default shell.
2007-06-04 00:07:48 +00:00
jlam
4f34ebeaf5 * Move the meat of the bootstrap-depends target entirely within the
lock, which I think is what was originally intended.

* Avoid creating ${WRKDIR}/.depends when running the bootstrap-depends
  target, which is run as part of running the fetch target.  We still
  create the .depends file later when we need it.

XXX Note that there are still problems when locking occurs because locks
XXX are created in ${WRKDIR}, so running "bootstrap-depends" as a source
XXX for "fetch" will still cause the work directory to be created and
XXX populated with files.  This probably needs to be solved by using a
XXX different location for the lockfile, e.g. ${TMPDIR}, for the
XXX bootstrap-depends step.
2007-05-29 15:26:25 +00:00
heinz
ada9d78f21 In order to avoid incorrect information about needed shared libraries in
+BUILD_INFO we must ensure that we only test valid lines from PLIST and
not lines like "@unexec /bin/rmdir..." where "/bin/rmdir" is not a part
of the resulting package.
To achieve this, a stripped version of PLIST, called _PLIST_NOKEYWORDS,
is introduced.
2007-05-28 13:54:25 +00:00
martti
5867247b54 Remove trailing spaces. 2007-05-28 11:07:00 +00:00
heinz
f7cc9bc252 Correct recording of provided shared libraries when using DESTDIR.
Raised on tech-pkg 2007-05-16, no objections.
2007-05-26 11:58:33 +00:00
joerg
a17c5dcdee Remove stray done. 2007-05-25 23:24:35 +00:00
joerg
f16755ea90 Partly backout the commit and move install-dependencies back into
depends.mk. The quoting of arrays passed down is almost impossible
to get right. For example, PKG_BUILD_OPTION.* variables can contain
multiple space separated entries but have to be quoted twice.

The original commit exposed two separate issues:
- too many variables are passed down via MAKEFLAGS, including the above
mentioned PKG_BUILD_OPTIONs.
- x11/gtk2 used an invalid variable name that can't be assigned
correctly via make command line.

This is supposed to fix PR 36387.
2007-05-25 19:07:23 +00:00
joerg
0a774d640d Restore _REDUCE_DEPENDS_CMD for now as it is still used by show-depends.
Noticed by rillig@
2007-05-23 00:23:24 +00:00
joerg
6333a48d03 GNU make strongly dislikes it when MAKE is already set to bmake.
So ensure that we don't pollute the environment at all and push down
the arguments for install-dependencies via the command line.
Thanks to seb@ for the problem report and test.
2007-05-22 21:27:59 +00:00
joerg
7f9ad57965 Remove an unused, just added internal target. 2007-05-22 18:08:33 +00:00
joerg
fcc23edafa Fix a small logic bug. When running install-dependencies for the first
time for bootstrap-dependencies, only really only look at the bootstrap
dependencies. Skip them in the second run.

Confusion reported by xtraeme@
2007-05-22 17:30:54 +00:00
joerg
c466f410c0 Make depends-cookie a flavor indendepent target. Before it was used to
trace the dependency information. This is computed and stored in
.depends directly now before anything else is done. The output is locked
and the locking is supposed to work before the bootstrap-depends are
installed.

Add a new hook for flavors after all dependencies are added and before
the depends-cookie is created. Use this to compute which package is used
to fulfill each dependency and store it in .rdepends. Adjust
register-dependencies and some other places to use this information
directly instead of recomputing it all the time.

The code to list all dependencies and to recursively install missing
ones is moved to a separate shell script. This makes it easier to
understand what is going on and extend them later.

Change the calling of pkg_create to prepend the dependencies directly to
the passed-in PLIST and not via -P and -T. This is in preperation of
changing the way they are stored in the packages.

Discussed with, recieved minor disagreement about install-dependencies,
but otherwise OKed by jlam.
2007-05-22 16:17:15 +00:00
rillig
c181356bf6 Converted a load-time .for loop into a run-time one. This brings back
the variables CONFIGURE_ARGS, _DISTFILES, _PATCHFILES and
_PLIST_IGNORE_FILES to the +BUILD_INFO file.

Fixes PR 36228.
2007-05-01 12:41:10 +00:00
joerg
5ca4038017 Drop NO_MTREE by making it the default. Introduce USE_MTREE to get the
old behaviour back. Discussed on tech-pkg@.
2007-04-19 16:52:03 +00:00
joerg
6912785d50 When building the dependency lists, handle bootstrap dependencies like
normal build dependencies. That way digest can be recorded correctly.
2007-03-19 16:43:59 +00:00
rillig
73455306d9 XXX: "make replace" should be one transaction. 2007-03-17 17:17:33 +00:00
rillig
b8b5d028d6 Made show-depends a flavor-specific target. 2007-03-15 22:14:30 +00:00
rillig
d3382dcdf9 If the "Internal error #1" happens again, it will at least provide a
hint where to look for the cause of the message. Without that, it is
next to useless.
2007-03-15 03:01:33 +00:00
joerg
83a29f686f Use the new -T option of pkg_crate, if pkg_install is new enough.
This means that all build dependencies are recorded in the package as
well, making it much easier to decide whether a dependency changed the
package should be rebuild in a bulk build.

This would have also been useful for users wanting to switch to modular
Xorg to decide what used x11-links.

OK agc@
2007-03-14 16:23:48 +00:00
rillig
2cca9b926f Fixed a quoting bug that occurred when PKG_DEVELOPER=#yes,
CHECK_SHLIBS=yes and some shared library doesn't have the execute bit
set.
2007-03-09 04:07:50 +00:00
rillig
2ccda09cd0 Added MAKEFLAGS to the call to RECURSIVE_MAKE. 2007-03-09 01:29:11 +00:00
rillig
8dd9cf3d41 Renamed some more flavor-specific targets to have the form _flavor-*.
Split check-vulnerable into a general an a flavor-specific part, for
consistence with all the other targets.
2007-03-09 00:39:54 +00:00
rillig
dc31efeb7a Renamed replace-pkg to _flavor-replace and undo-replace-pkg to
_flavor-undo-replace. The leading underscore makes it obvious that these
targets are private, which saves redundant comments.
2007-03-08 23:06:37 +00:00
rillig
07e433310c Added headings. 2007-03-08 22:57:00 +00:00
rillig
f701a00e46 Don't create ${.TARGET} unless no further error can occur. The make(1)
manual page says that ${.TARGET} is removed automatically if make is
interrupted, but it is _not_ removed if a command fails. This case may
happen after an incomplete CVS update (I forgot the -d option). When
running "make depends" for the first time, an error message is printed.
When running it for the second time, an empty .depends file existed, so
the build continued.
2007-03-08 15:38:47 +00:00
wiz
5dce6c7d9d Make MTREE_FILE and MTREE_ARGS internal by prefixing them with '_'.
They are not supposed to be set by the user.
2007-03-02 09:08:33 +00:00
rillig
114317f32c Added a README file with some basic introduction to encourage developers
to port pkgsrc to other packaging systems.
2007-02-20 13:08:32 +00:00
rillig
92248be659 Fixed more shell quoting issues, which showed up on IRIX. No wonder that
the package count on IRIX is so small.
2007-02-19 11:05:48 +00:00
rillig
acce7c2324 Oops: In the pre-previous commit, I forgot the $$2. 2007-02-19 10:51:58 +00:00
rillig
fad42cf10b When make(1)'s shell is a Korn shell, brace expansion may be performed.
This is especially critical for dependency patterns like
p5-perl-headers-6.5{,nb*}, which just occured on IRIX.

By the way, in "set -e" mode, assertions for non-empty variables can be
written much easier.
2007-02-19 10:33:46 +00:00
rillig
5a2b720572 Made _DEPENDS_PATTERNS_CMD a little simpler. 2007-02-19 10:18:33 +00:00
rillig
81818945f9 PKGVIEWS is never supposed to be empty, so it does not need the
empty-for-loop-protection. Furthermore, "" is used as a regular,
meaningful value.
2007-01-05 18:52:08 +00:00
rillig
23003ba1c6 Since 2003, the package tools don't need their own environment variable,
since there is the -K option.
2007-01-05 17:54:02 +00:00
ghen
3c9fce044e Add "sid" as an abbreviation for the "show-installed-depends" target. 2006-12-13 07:48:17 +00:00
rillig
378dc30b1d Oops, forgot to remove a line continuation. 2006-11-26 12:21:13 +00:00
rillig
eaead93f63 As the pkglint warning says, the pipe operator discards the exit status of
its left hand side. Fixed that by using temporary files.
2006-11-26 11:51:30 +00:00
rillig
ba470586c1 The undo-replace target had confused the "installed" and the "new" name.
Fixed this.
2006-11-16 22:06:18 +00:00
agc
2dda8adbb1 Record the build host (i.e. the machine a package was built on) in the
build information.

Useful for binary package manipulation.
2006-11-13 18:02:09 +00:00
joerg
62b03eb280 Add package-install. For non-DESTDIR builds, package and package-install
are identical. For DESTDIR builds, the package is not installed to
PREFIX as part of the build, so package-install does exactly that after
package is done. Change bin-install to call package-install.
2006-11-03 08:01:04 +00:00
joerg
5b374e445d Main infrastructure for DESTDIR support.
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or
"user-destdir" to flag support for this, following the same
rules as PKG_INSTALLATION_TYPES (e.g. define before first include
of bsd.prefs.mk).

The user activates it via USE_DESTDIR. When set to "yes",
packages with "user-destdir" are handled as "destdir".
The installation of the package will not go to ${LOCALBASE},
but a subdirectory of ${WRKDIR} instead. pre/post install scripts are
not run and the package is not registered either. A binary package
can be created instead to be installed normally with pkg_add.

For "user-destdir" packages, everything is run as normal user and
ownership is supposed to be correctled by pkg_create later. Since
the current pkg_install code uses pax and it doesn't allow overwriting
owners, this does not work yet.

For "destdir" packages, installation, packaging and cleaning is run as
root.

This commit does not change the handling of DEPENDS_TARGET or
bin-install to allow recursive usage.
2006-10-09 12:25:44 +00:00
joerg
bafcfef842 Backout rev 1.13 of rillig. Addresses PR 34764 and complains on
pkgsrc-users.
2006-10-09 08:57:39 +00:00
rillig
f8810ba028 Replaced the pipe operator with temporary files, since the former hides
errors. Now "make depends" stops on dependency directories that don't
exist.

The dependencies are first extracted into two temporary files and then
combined with cat(1) because otherwise "make depends" passes silently on
errors when it is called for the second time. Somehow ${.TARGET} didn't
get removed.
2006-10-09 01:40:49 +00:00
rillig
b52b81957a Remove the +BUILD_DEFS file before overwriting it. This is necessary to
allow most of the packages to be created as unprivileged user, since the
+BUILD_DEFS file is created by the privileged user in the "install"
phase.
2006-10-08 20:25:43 +00:00
rillig
28003a7775 Made the code simpler and added "set -e". 2006-10-08 20:24:03 +00:00
joerg
1a3ea34a13 Remove references to DESTDIR. LOCALBASE should not be altered that way,
since it is user settable and most of the time set by the user.
X11BASE follows the same reasons. For staged installations, we don't
want to register the package directly, so there's no need to prefix
PKG_DBDIR either.
2006-10-06 14:51:36 +00:00
reed
47ccc64eca Make sure requires and libs (PROVIDES) are set for
packages that use a sub-directory for prefix, like
/usr/pkg/qt3/.

(I have been using this for a couple years but recently
merged my patch over to new flavor mk file.)

Okayed by jlam on tech-pkg.
2006-08-04 14:11:29 +00:00
jlam
d5fdba9ab3 Add back CONFLICTS handling that was accidentally left out when revision
1.1 of this file was committed and the same code was removed from
bsd.pkg.mk.
2006-07-27 22:16:06 +00:00
jlam
b5e83f7d36 Remove all uses of the following targets from pkgsrc:
show-all-depends-dirs
	show-all-depends-dirs-excl

Replace them with calls to pkgsrc/mk/scripts/depends-depth-first.awk
which does the same thing but without the extra overhead of invoking
a recursive make.
2006-07-27 22:01:28 +00:00
jlam
c489860d62 Whenever we invoke a recursive make, we need to ensure that the proper
environment ${PKGSRC_MAKE_ENV} is also passed along.  Create a
convenience variable RECURSIVE_MAKE that does exactly this and that
can be used in place of MAKE when invoking make recursively.

Use RECURSIVE_MAKE everywhere in pkgsrc/mk that we invoke make
recursively.
2006-07-27 21:46:45 +00:00
jlam
c88a32be7d Make "mirror-distfiles" less verbose by not printing out anything if no
bootstrap dependencies need to be built and installed.
2006-07-19 16:01:40 +00:00
gdt
cd807f496b During 'make replace', use pkg_admin to set the unsafe_depends
variable to YES for each pacakge that depends on the replaced package.

Discussed on tech-pkg with generally positive comments.
2006-07-17 18:18:42 +00:00
rillig
2221827892 Split the variable BUILD_DEFS into those that are defined by packages
and those that are defined by the infrastructure (_BUILD_DEFS). This
allows the build-defs-message target to be moved to the end of
bsd.pkg.mk. Now it prints the correct result even in unprivileged
builds, which had been wrong due to the order in which the files have
been included. For example, ${UNPRIVILEGED_USER} was displayed as (not
defined) although its value was defined, which could be checked with
"bmake show-var".

Tested with one package that _does_ define BUILD_DEFS and with one that
doesn't. The behavior stays the same.
2006-07-15 23:58:52 +00:00
jlam
7a2c97d53f * Add a new stage "bootstrap-depends" that happens before all other
stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS.
  The bootstrap-depends step works just like the normal depends step
  and honors the value of DEPENDS_TARGET.  It's now possible to add
  dependencies solely to facilitate fetching the distfiles, e.g.

	BOOTSTRAP_DEPENDS+=	curl-[0-9]*:../../www/curl

* Teach the tools framework about ":bootstrap" as a tools modifier
  which indicates the tool should be added as a dependency via
  BOOTSTRAP_DEPENDS.

* Add "digest" to the tools framework.

* Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest
  before anything else.  Get rid of unused "uptodate-digest" target
  and related digest version-checking code.

* Finish the refactoring work: split checksum-related code out of
  bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum"
  target command list with a script that does all the real work.

* Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private
  variables by prepending them with an underscore.  Also, rename
  _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the
  makepatchsum target to allow that variable to contain a list of
  algorithms, all of which are used when creating the patch checksums
  for ${DISTINFO_FILE}.
2006-07-13 14:02:34 +00:00
jlam
356f5e8af5 Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are private
variables so there are no user-visible changes.  This change just makes
it a little easier to write for loops.
2006-07-07 21:24:27 +00:00
jlam
a8fcae3925 The cookie files are indirectly made using *-cookie targets, so verify
that they are never being created more than once by inserting a check
into the *-cookie targets.
2006-07-06 22:29:52 +00:00
jlam
b1e66899c1 Fix two bugs which prevent undo-replace from working. 2006-07-05 19:13:46 +00:00
jlam
990d0b5377 Make the check-vulnerable target more self-sufficient, by moving some
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that
check-vulnerable can be used as a source target.

Make check-vulnerable a source target for every phase of the build
workflow, which ensures that it is always run if the user starts a
new phase from the command line.

Fix the cookie-generation targets so that they don't append, only
overwrite to the cookie file.  This works around potential problems
due to recursive makes.

Move the cookie checks so that they surround the corresponding phase
target.  The presence of the cookie should now inform the make process
to avoid doing any processing of phases that occur before the phase
corresponding to the cookie.
2006-07-05 09:08:35 +00:00
jlam
ad827ed0e1 Fix error with just-in-time su when installing dependencies. The code
to install dependencies looked roughly like this:

        ${CAT} ${_DEPENDS_FILE} |
        while read type pattern dir; do
                cd $$dir && ${MAKE} install
        done

In the code above, tghe recursive make invoked to install each dependency
does a just-in-time su to acquire root privileges for the installation,
but the su tries to get terminal settings for standard input (from
the pipe) using tcgetattr(), which fails and subsequently causes su
to exit with a puzzling "conversation failure" error.  Rewrite the
loop to look (roughly) like this:

	set -- `${CAT} ${_DEPENDS_FILE}`
	while test $# -gt 0; do
		type=$1; pattern=$2; dir=$3; shift 3
                cd $$dir && ${MAKE} install
	done

Note that this is potentially bad for shells with very low limits on
the maximum command line length, but at least this preserves file
descriptor 1 to reference the controlling tty unless the user does
something weird with input redirection when invoking make.
2006-06-14 03:00:03 +00:00
jlam
fa494e1722 make(1) will automatically delete partially made targets if the target
creation fails, so remove instances where temporary files were created
then moved to the final target filename, and just directly create the
target.  This is just for brevity/clarity, and saves a few tool calls.
2006-06-09 16:41:09 +00:00
jlam
8c10d39139 Introduce the capability to gather all the warnings and errors that
are generated for a target and output them all at once at the conclusion
of the target's invocation.  The implementation is in bsd.pkg.error.mk,
which defines a macro target "error-check" that will print out any
non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR}
and exit appropriately if there were errors.

Convert some targets that were just long sequences of ${ERROR_MSG} or
${WARNING_MSG} within a single shell statement to use the new delayed
error output via error-check.

Modify the compiler "fail" wrappers for C++ and Fortran to be less
verbose during invocation.  Instead collect the warnings and only
print them at the end of the completed phase, e.g. after "configure"
and/or "build" completes.
2006-06-09 13:59:06 +00:00
rillig
cb4b57b6b0 Replaced PHASE_MSG with STEP_MSG in many (but not all) places where it
wasn't used to identify a ``phase'', as defined in the pkgsrc guide.
2006-06-08 08:01:53 +00:00
rillig
b2685966d1 Added a missing :Q operator for DEPENDS_TARGET, since like the other
*_TARGET variables, it is actually a _list_ of targets, not a single
target.
2006-06-08 07:04:49 +00:00
jlam
d54c1a001b Replace use of ${ECHO} with *_MSG to get more consistent-looking messages. 2006-06-07 17:28:33 +00:00