Commit graph

23 commits

Author SHA1 Message Date
bad
781b56ced9 Apply patch from OBATA Akio to stop "make update" failing with "a different
version ... is already installed".
<http://mail-index.netbsd.org/pkgsrc-users/2011/08/02/msg014770.html>

This makes "make update" usable for me again.  Thanks Obata-san!
2012-10-01 09:54:18 +00:00
reed
88166ad6f5 Rename "flavor" to "pkgformat".
This is from Anton Panev's GSoC 2011 project to add RPM and DPKG
support to pkgsrc. (I am not adding that further support in this
commit.)

This is just a rename of the existing functionality. Now it will
be easy to test the GSoC work by simply putting in a single
directory (such as "rpm" or "deb"). See
http://addpackageforma.sourceforge.net/ for some details.

This is from Anton's CVS, but I made some minor changes:

- changed plural pkgformats to singular pkgformat (to be consistent)

- fixed a few places (in comments) that were missed

- catch up on some additions to flavor not in the pkgforma cvs:
PKGSRC_SETENV and _flavor-destdir-undo-replace and
undo-destdir-replace-install.
2011-10-15 00:23:07 +00:00
obache
5a04d87d23 Also set `package-install' to UPDATE_TARGET/DEPENDS_TARGET if current target is
`package-install', to indirect dependency also create binary package with
`make package' or `make package-install'.

should fix PR#44857.
2011-05-04 09:49:34 +00:00
joerg
16937e6f7c Simplify conditional as USE_DESTDIR is set by bsd.prefs.mk.
For "make package", always use package-install as dependency target by
default. This matters if USE_DESTDIR is set conditionally.
2010-02-25 02:06:34 +00:00
obache
ad39d0e8f2 Set default DEPENDS_TARGET based on USE_DESTDIR instead of _USE_DESTDIR,
or failed at the situation current package != destdir support and depends
package = destdir support with USE_DESTDIR=yes.
2010-02-20 12:49:48 +00:00
joerg
6c98d7f7d5 Change default DEPENDS_TARGET to package-install if USE_DESTDIR != no.
Discussed with jlam.
2008-04-04 21:28:51 +00:00
rillig
0f02165471 Removed colons from variable names so they are accessible to "bmake
help".
2008-02-20 10:43:55 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
rillig
d3624fdf10 Made the .include directives simpler, since the directory of the
including file is always the first in the search path.
2008-01-04 01:46:24 +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
jlam
4686b9dae9 Resurrect the ability to skip the depends phase that was removed in
revision 1.10.  Use a new name that is more aligned with current
variable-naming methodology: SKIP_DEPENDS.  It's a YesNo variable that
defaults to "no".

This functionality is just way too useful to pkgsrc developers to lose.
2007-03-23 21:21:33 +00:00
rillig
b8b5d028d6 Made show-depends a flavor-specific target. 2007-03-15 22:14:30 +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
wiz
e2718d1233 Remove support for obsolete and unused NO_DEPENDS. 2007-03-02 05:58:34 +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
b8d23232b8 Flatten out recursive makes into a single re-invocation of make by
introducing the concept of a "barrier".  We separate the user-invokable
targets into ones that must happen before the barrier, and ones that
must happen after the barrier.  The ones that happen after the barrier
are run in a sub-make process.  In this case, the targets that must
be run after the barrier are from the "wrapper" step and beyond.  We
rewrite the various "flow" targets, e.g. wrapper, configure, build,
etc., so that they of the right form to use the barrier target.

This now completely removes the concept of PKG_PHASE from pkgsrc.  It
is replaced with the concept of "before" and "after" the barrier, and
this state can be checked by testing for the existence of the barrier
cookie file.  Because we've removed most of the recursive makes, there
is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove
them for now.

As part of this commit, put back the logic that conditionalized the
sources for the various cookie files.  Because the sources are all
"phony" targets, they were always run, regardless of whether or not
the cookie file already existed.  Now, if a cookie file exists, then
that entire phase associated with that cookie file is skipped.

Lastly, fix a thinko in configure/bsd.configure.mk where setting
NO_CONFIGURE in a package Makefile would manage to skip the "wrapper"
step altogether.  Fix this by correctly noting "wrapper" and not
"patch" as the preceding step to "configure".
2006-07-05 22:21:02 +00:00
jlam
aa3aec191d _DEPENDS_COOKIE is already defined in bsd.depends-vars.mk. 2006-06-12 01:20:37 +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
jlam
e3f0f1869f Allow overrides of the public targets, e.g. "install", "package", etc.
if PKG_SKIP_REASON or PKG_FAIL_REASON is defined.  This commit adds
!target(...) guards around those target definitions to avoid "duplicate
target definition" warnings.
2006-06-05 17:41:11 +00:00
jlam
aa5856070f Move definitions for UPDATE_TARGET and DEPENDS_TARGET closer to where
they are used.  Also, move UPDATE_RUNNING into the install module where
it is used, and make it "private" by prepending with an underscore.
2006-06-05 17:21:54 +00:00
jlam
e5eb2c56af First pass at implementing support for package system flavors other
than pkgsrc's current one.  This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices.  This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.

The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc.  modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}.  The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work.  The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support.  Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor.  I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.

There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls.  I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.

The "depends" module is a complete overhaul of the way that we handle
dependencies.  There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed.  This
differs from the old way where dependencies were installed just before
extraction occurred.  The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies.  It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.

Future work on this project include:

    * Resolve the workflow design in anticipation of future work on
      staged installations where "package" conceptually happens before
      "install".

    * Rewrite the buildlink3 framework to not assume the use of the
      pkgsrc pkg_* tools.

    * Rewrite the pkginstall framework to provide a standard pkg_*
      tool to perform the actions, and allowing a purely declarative
      file per package to describe what actions need to be taken at
      install or deinstall time.

    * Implement support for the SVR4 package flavor.  This will be
      proof that the appropriate abstractions are in place to allow
      using a completely different set of package management tools.
2006-06-03 23:11:42 +00:00