Commit graph

5531 commits

Author SHA1 Message Date
jlam
982acd0360 Output PKG_{FAIL,SKIP}_REASON messages to standard error instead of
standard output.  These are error or warning messages, so they shouldn't
be "seen" by anything expecting the output of a "make" command to make
sense.  This addresses PR pkg/32239 by following the suggestions by
Roland Illig.
2006-06-15 02:39:19 +00:00
jlam
d518b52c8e Allow the standard build target to be overridden by the one generated
if PKG_{FAIL,SKIP}_REASON is set.  This fixes the behavior when one
invokes "make build" in a package that sets a fail or skip reason to
stop as soon as the reason is printed.
2006-06-15 02:24:41 +00:00
jlam
29133ee234 Teach the tools framework about "openssl". 2006-06-14 16:57:07 +00:00
jlam
877745fd8f Create DELAYED_{ERROR,WARNING}_MSG macros that can be used to output
error and warning messages that are picked up by the error-check
target.  Use them instead of using a bare ${ECHO} for more code clarity.
Implemented as suggested by Roland Illig.
2006-06-14 15:09:34 +00:00
jlam
773389471a Insert cookie checks into the "real-install" and "real-package" targets,
which are invoked in recursive make calls for the "install" and
"package" targets respectvely.  These recursive make calls prevent
the top-level make from seeing all of the targets and computing a full
dependency graph, so it becomes possible for some targets to be invoked
more than once.  This change passes enough information along to the
recursive make calls and ensures that the source targets for the real-*
targets are only invoked once.
2006-06-14 07:51:47 +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
dsainty
45b91b84ac Document mitshm option. Used in emulators/xbeeb package, where enabling it disables conventional network X support (the code doesn't support both). 2006-06-13 13:53:21 +00:00
jlam
50131e16fc At the point where we invoke msgfmt during the build phase, the software
author has presumably given us valid *.po files, so skip performing
validity checks on the *.po file.  This fixes building software where
the author has actually *not* produced proper *.po files, e.g.
net/gtk-gnutella, where the de.po files have msgid/msgstr pairs that
do not have matching numbers of format specifiers (%[a-z]).
2006-06-13 13:30:40 +00:00
jlam
dab443fe1e Move the common make command executed in su-target into a separate make
variable to try to get rid of potential quoting problems.
2006-06-12 16:30:03 +00:00
jlam
6b4b7743d0 Be more consistent about how we're emitting errors and warnings. 2006-06-12 03:42:02 +00:00
jlam
aa3aec191d _DEPENDS_COOKIE is already defined in bsd.depends-vars.mk. 2006-06-12 01:20:37 +00:00
jlam
89a7595587 Split out the "work" symlink creation into a separate step and add it
as a source for the "makedirs" target.  This ensures the symlink is
created regardless of whether ${WRKDIR} already exists or not.
2006-06-11 02:14:45 +00:00
jlam
85c5451053 Restore missing ${SETENV} ${BUILD_ENV} that was dropped during the initial
package system flavors commit.
2006-06-10 03:23:46 +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
2cc3f64abb Add a new variable CHECK_FILES_SUPPORTED which is a package-settable
variable to show whether the package supports running the check-files
target.

Set CHECK_FILES_SUPPORTED to "no" in pkgtools/pkg_install in the case
where the PREFIX does not match ${LOCALBASE} it's likely the tools are
being installed in some place that's completely outside pkgsrc control,
and check-files fails horribly in that case.
2006-06-09 16:12:08 +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
jlam
2b9c2495b3 No need to synthesis the package directory from components when ${.CURDIR}
already has the right value.
2006-06-09 08:20:30 +00:00
rillig
98b01c2c50 pkglint says, the :Q operator should not be used in double quotes.
The code here only worked due to many conincidences: Let's assume a
variable has the value "a b" and is used with the :Q operator, which
results in "a\ b" (a, backslash, space, b). When used in double quotes,
the shell command looks like:

    echo "a\ b"

which, depending on the shell, may output the backslash literally or
not. In the case of this file, the ":Q" string was not passed to
echo(1), but to sed(1). sed(1) in turn interprets (backslash, space) in
the replacement text as equivalent to (space), and that's where the
backslash finally disappears. So it's only to this coincident that the
code worked although it was not correct.
2006-06-09 06:02:33 +00:00
jlam
b55dfcc740 Introduce "makedirs" as a helper target to create directories with
unprivileged ownership.
2006-06-08 16:21:51 +00:00
jlam
1b7fdcc434 If the package cookie file exists, then we don't need to do anything.
Also, make use of a _REAL_PACKAGE_TARGETS variable just to make all
of the code between the different stages more uniform.
2006-06-08 15:48:42 +00:00
jlam
e95152039c If the install cookie file exists, then we don't need to do anything.
Also, move the interactive check into a separate target as a prelude
to removing the recursive make for invoking "real-install".
2006-06-08 15:47:10 +00:00
jlam
63ceb4b6f6 Fix the comment. 2006-06-08 15:45:52 +00:00
jlam
6d0a3eea15 Make use of a "real-depends" helper target to hook all of the other
targets onto, and move the depends-message further down so that if
the depends cookie file already exists, then no message is outputted.
2006-06-08 15:45:06 +00:00
dmcmahill
a7548e9708 undo most of the last commit which was a mistake. 2006-06-08 11:18:04 +00:00
rillig
5fc064978a Since "depends" is a real pkgsrc phase now, it also needs its own
depends-message target.
2006-06-08 08:55:10 +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
80d94acdf9 Use STEP_MSG for pkgsrc-patch-message instead of PHASE_MSG. 2006-06-08 07:30:40 +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
rillig
87276c331b The gcc equivalent of SunPro's -mt option is -threads. 2006-06-08 06:29:44 +00:00
jlam
0c1e91164b Avoid using ::= construct which apparently is somewhat buggy in bmake.
This hopefully fixes user/group creation problems on platforms using
bootstrap bmake, e.g. Solaris.  Problem noted by adrianp in private
email.
2006-06-08 03:30:37 +00:00
jlam
92a54f35b8 Fix an inverted test that caused all catman pages to be stripped from
the PLIST on platforms where IMAKE_MANINSTALL != MANINSTALL, e.g.
Solaris.  Solution noted by adrianp in private email.  This should fix
the problem noted in PR pkg/33629.
2006-06-08 03:11:17 +00:00
minskim
cbf5ec4bec Create /var/spool/lock in the sandbox. The directory is needed to
build comm/minicom.
2006-06-08 01:11:43 +00:00
jlam
6a64f49846 Fix problems with check-files where it fails with a confusing message
that "the files are in the PLIST but not in ${PREFIX}" if the files
that are installed overwrite other files already on the disk.
Overwriting files can legitimately happen when, e.g. doing a "make
update" or "make replace" without removing the old files, or when
re-running "make install" after fixing a broken Makefile during
development.  While here, make the errors print to standard error
using ERROR_CAT.
2006-06-07 20:28:59 +00:00
jlam
68229b135c If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZE_P
to test for the opposite condition.
2006-06-07 18:37:06 +00:00
jlam
377d2c27f2 Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can more
clearly be used in other modules.
2006-06-07 17:44:29 +00:00
jlam
aa012e72aa Use WARNING_MSG and ERROR_MSG for consistency. 2006-06-07 17:41:14 +00:00
jlam
c82571cd2d Use ERROR_MSG for an error message. 2006-06-07 17:35: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
jlam
732bc3967d Make use of ERROR_CAT to print the list of conflicting packages. 2006-06-07 17:21:23 +00:00
ghen
8001e36796 Fix typo, reported by walt on users@crater.dragonflybsd.org. 2006-06-07 17:09:52 +00:00
jlam
0f5fc1ca58 Rewrite to avoid using "grep -H", which Solaris' grep does not support. 2006-06-07 17:05:25 +00:00
jlam
56b17a4580 Note the check-clean target, which removes files related to the check-*
targets.
2006-06-07 17:04:01 +00:00
jlam
44fed2736c Add WARNING_CAT and ERROR_CAT which are filters for outputting file
contents to standard error.  They prefix the output with "WARNING: "
and "ERROR: " respectively.
2006-06-07 17:00:03 +00:00
tron
6e1ed39e5d 1.) Remove all instances of '@${WARNING_MSG} "Warning: ...' which resulted
in error message like 'WARNING: Warning: ...'.
2.) Replace "WARN_MSG" with "WARNING_MSG" which makes the "make package"
    target work again for restricted packages like "acroread7".
2006-06-07 10:04:03 +00:00
rillig
58873dc4d8 Check for [[:space:]] instead of [ ]. This fixes a misbehavior when
script files contain CRLF line-ends.
2006-06-06 23:43:10 +00:00
jlam
c61ebf253e Add missing "break" that was causing reduce-depends.awk to not do any
reduction except by accident if the "winning" pattern is the last one.
2006-06-06 20:05:44 +00:00
jlam
8efe9d7045 Avoid using PKGNAME in target names since they are "immediately"
resolved in much the same manner as variables set using :=.  PKGNAME
could be set after including bsd.pkg.mk (which is poor form), and it's
too close to the pkgsrc-2006Q2 branch to fix that all over pkgsrc at
this time).  This fixes building shells/static-bash2.
2006-06-06 19:49:52 +00:00
joerg
ebe30855cf One more reminder of PostgreSQL 7.3 to remove... 2006-06-06 19:43:43 +00:00
jlam
1b717c210d Stop supporting user-specified definition for IMAKE in /etc/mk.conf --
it's now all handled exclusively by the tools framework.
2006-06-06 19:25:59 +00:00
jlam
dfed7426cb real-su-bin-install is no more... it's just su-bin-install. 2006-06-06 18:24:44 +00:00