head 1.12; access; symbols pkgsrc-2023Q4:1.12.0.62 pkgsrc-2023Q4-base:1.12 pkgsrc-2023Q3:1.12.0.60 pkgsrc-2023Q3-base:1.12 pkgsrc-2023Q2:1.12.0.58 pkgsrc-2023Q2-base:1.12 pkgsrc-2023Q1:1.12.0.56 pkgsrc-2023Q1-base:1.12 pkgsrc-2022Q4:1.12.0.54 pkgsrc-2022Q4-base:1.12 pkgsrc-2022Q3:1.12.0.52 pkgsrc-2022Q3-base:1.12 pkgsrc-2022Q2:1.12.0.50 pkgsrc-2022Q2-base:1.12 pkgsrc-2022Q1:1.12.0.48 pkgsrc-2022Q1-base:1.12 pkgsrc-2021Q4:1.12.0.46 pkgsrc-2021Q4-base:1.12 pkgsrc-2021Q3:1.12.0.44 pkgsrc-2021Q3-base:1.12 pkgsrc-2021Q2:1.12.0.42 pkgsrc-2021Q2-base:1.12 pkgsrc-2021Q1:1.12.0.40 pkgsrc-2021Q1-base:1.12 pkgsrc-2020Q4:1.12.0.38 pkgsrc-2020Q4-base:1.12 pkgsrc-2020Q3:1.12.0.36 pkgsrc-2020Q3-base:1.12 pkgsrc-2020Q2:1.12.0.32 pkgsrc-2020Q2-base:1.12 pkgsrc-2020Q1:1.12.0.12 pkgsrc-2020Q1-base:1.12 pkgsrc-2019Q4:1.12.0.34 pkgsrc-2019Q4-base:1.12 pkgsrc-2019Q3:1.12.0.30 pkgsrc-2019Q3-base:1.12 pkgsrc-2019Q2:1.12.0.28 pkgsrc-2019Q2-base:1.12 pkgsrc-2019Q1:1.12.0.26 pkgsrc-2019Q1-base:1.12 pkgsrc-2018Q4:1.12.0.24 pkgsrc-2018Q4-base:1.12 pkgsrc-2018Q3:1.12.0.22 pkgsrc-2018Q3-base:1.12 pkgsrc-2018Q2:1.12.0.20 pkgsrc-2018Q2-base:1.12 pkgsrc-2018Q1:1.12.0.18 pkgsrc-2018Q1-base:1.12 pkgsrc-2017Q4:1.12.0.16 pkgsrc-2017Q4-base:1.12 pkgsrc-2017Q3:1.12.0.14 pkgsrc-2017Q3-base:1.12 pkgsrc-2017Q2:1.12.0.10 pkgsrc-2017Q2-base:1.12 pkgsrc-2017Q1:1.12.0.8 pkgsrc-2017Q1-base:1.12 pkgsrc-2016Q4:1.12.0.6 pkgsrc-2016Q4-base:1.12 pkgsrc-2016Q3:1.12.0.4 pkgsrc-2016Q3-base:1.12 pkgsrc-2016Q2:1.12.0.2 pkgsrc-2016Q2-base:1.12 pkgsrc-2016Q1:1.11.0.36 pkgsrc-2016Q1-base:1.11 pkgsrc-2015Q4:1.11.0.34 pkgsrc-2015Q4-base:1.11 pkgsrc-2015Q3:1.11.0.32 pkgsrc-2015Q3-base:1.11 pkgsrc-2015Q2:1.11.0.30 pkgsrc-2015Q2-base:1.11 pkgsrc-2015Q1:1.11.0.28 pkgsrc-2015Q1-base:1.11 pkgsrc-2014Q4:1.11.0.26 pkgsrc-2014Q4-base:1.11 pkgsrc-2014Q3:1.11.0.24 pkgsrc-2014Q3-base:1.11 pkgsrc-2014Q2:1.11.0.22 pkgsrc-2014Q2-base:1.11 pkgsrc-2014Q1:1.11.0.20 pkgsrc-2014Q1-base:1.11 pkgsrc-2013Q4:1.11.0.18 pkgsrc-2013Q4-base:1.11 pkgsrc-2013Q3:1.11.0.16 pkgsrc-2013Q3-base:1.11 pkgsrc-2013Q2:1.11.0.14 pkgsrc-2013Q2-base:1.11 pkgsrc-2013Q1:1.11.0.12 pkgsrc-2013Q1-base:1.11 pkgsrc-2012Q4:1.11.0.10 pkgsrc-2012Q4-base:1.11 pkgsrc-2012Q3:1.11.0.8 pkgsrc-2012Q3-base:1.11 pkgsrc-2012Q2:1.11.0.6 pkgsrc-2012Q2-base:1.11 pkgsrc-2012Q1:1.11.0.4 pkgsrc-2012Q1-base:1.11 pkgsrc-2011Q4:1.11.0.2 pkgsrc-2011Q4-base:1.11 pkgsrc-2011Q3:1.10.0.20 pkgsrc-2011Q3-base:1.10 pkgsrc-2011Q2:1.10.0.18 pkgsrc-2011Q2-base:1.10 pkgsrc-2011Q1:1.10.0.16 pkgsrc-2011Q1-base:1.10 pkgsrc-2010Q4:1.10.0.14 pkgsrc-2010Q4-base:1.10 pkgsrc-2010Q3:1.10.0.12 pkgsrc-2010Q3-base:1.10 pkgsrc-2010Q2:1.10.0.10 pkgsrc-2010Q2-base:1.10 pkgsrc-2010Q1:1.10.0.8 pkgsrc-2010Q1-base:1.10 pkgsrc-2009Q4:1.10.0.6 pkgsrc-2009Q4-base:1.10 pkgsrc-2009Q3:1.10.0.4 pkgsrc-2009Q3-base:1.10 pkgsrc-2009Q2:1.10.0.2 pkgsrc-2009Q2-base:1.10 pkgsrc-2009Q1:1.9.0.18 pkgsrc-2009Q1-base:1.9 pkgsrc-2008Q4:1.9.0.16 pkgsrc-2008Q4-base:1.9 pkgsrc-2008Q3:1.9.0.14 pkgsrc-2008Q3-base:1.9 cube-native-xorg:1.9.0.12 cube-native-xorg-base:1.9 pkgsrc-2008Q2:1.9.0.10 pkgsrc-2008Q2-base:1.9 cwrapper:1.9.0.8 pkgsrc-2008Q1:1.9.0.6 pkgsrc-2008Q1-base:1.9 pkgsrc-2007Q4:1.9.0.4 pkgsrc-2007Q4-base:1.9 pkgsrc-2007Q3:1.9.0.2 pkgsrc-2007Q3-base:1.9 pkgsrc-2007Q2:1.8.0.6 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.8.0.4 pkgsrc-2007Q1-base:1.8 jlam-pkgviews:1.8.0.2 jlam-pkgviews-base:1.8 pkgsrc-2006Q4:1.7.0.2 pkgsrc-2006Q4-base:1.7 pkgsrc-2006Q3:1.6.0.2 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.3.0.2 pkgsrc-2006Q2-base:1.3; locks; strict; comment @# @; 1.12 date 2016.04.10.15.58.02; author joerg; state Exp; branches; next 1.11; commitid 4OPBSqBKVmSA262z; 1.11 date 2011.10.15.00.23.09; author reed; state Exp; branches; next 1.10; 1.10 date 2009.06.17.12.54.57; author joerg; state Exp; branches; next 1.9; 1.9 date 2007.08.20.10.59.05; author joerg; state Exp; branches; next 1.8; 1.8 date 2007.03.09.00.39.55; author rillig; state Exp; branches; next 1.7; 1.7 date 2006.11.03.08.04.06; author joerg; state Exp; branches; next 1.6; 1.6 date 2006.08.09.15.31.01; author jlam; state Exp; branches; next 1.5; 1.5 date 2006.08.04.20.52.27; author rillig; state Exp; branches; next 1.4; 1.4 date 2006.08.03.19.12.43; author rillig; state Exp; branches; next 1.3; 1.3 date 2006.06.05.22.49.44; author jlam; state Exp; branches; next 1.2; 1.2 date 2006.06.05.17.41.11; author jlam; state Exp; branches; next 1.1; 1.1 date 2006.06.03.23.11.42; author jlam; state Exp; branches; next ; desc @@ 1.12 log @Remove support for USE_DESTDIR=no. @ text @# $NetBSD: deinstall.mk,v 1.11 2011/10/15 00:23:09 reed Exp $ # DEINSTALLDEPENDS controls whether dependencies and dependents are also # removed when a package is de-installed. The valid values are: # # no only the package is removed (if dependencies allow it) # yes dependent packages are also removed # all dependent packages and unused dependencies are also removed # DEINSTALLDEPENDS?= no ###################################################################### ### deinstall, su-deinstall (PUBLIC) ###################################################################### ### deinstall is a public target to remove an installed package. ### It will acquire elevated privileges just-in-time. ### .PHONY: deinstall su-deinstall .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) . if !target(deinstall) deinstall: su-deinstall @@${PHASE_MSG} "Deinstalling for ${PKGNAME}" . endif .else . if !target(deinstall) deinstall: su-target @@${PHASE_MSG} "Deinstalling for ${PKGNAME}" . endif .endif _SU_DEINSTALL_TARGETS= acquire-deinstall-lock _SU_DEINSTALL_TARGETS+= _pkgformat-deinstall _SU_DEINSTALL_TARGETS+= release-deinstall-lock su-deinstall: ${_SU_DEINSTALL_TARGETS} .PHONY: acquire-deinstall-lock release-deinstall-lock acquire-deinstall-lock: acquire-localbase-lock release-deinstall-lock: release-localbase-lock MAKEFLAGS.su-deinstall+= DEINSTALLDEPENDS=${DEINSTALLDEPENDS} ###################################################################### ### reinstall (PUBLIC) ###################################################################### ### reinstall is a special target to re-run the install target. ### It will acquire elevated privileges just-in-time. ### .PHONY: reinstall .if !target(reinstall) reinstall: install-clean install .endif @ 1.11 log @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. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.10 2009/06/17 12:54:57 joerg Exp $ a33 3 .if ${_USE_DESTDIR} == "no" _SU_DEINSTALL_TARGETS+= install-clean .endif @ 1.10 log @Make sure that _UPDATE_RUNNING=YES is passed down to su-deinstall for PKG_PRESERVE packages (e.g. pkg_install). Otherwise an old version of pkg_install is not removed from pkgdb. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.9 2007/08/20 10:59:05 joerg Exp $ d32 1 a32 1 _SU_DEINSTALL_TARGETS+= _flavor-deinstall @ 1.9 log @Add cross-compiling support for bin-install and deinstall targets. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.8 2007/03/09 00:39:55 rillig Exp $ d43 1 a43 1 MAKEFLAGS.su-deinstall= DEINSTALLDEPENDS=${DEINSTALLDEPENDS} @ 1.8 log @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. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.7 2006/11/03 08:04:06 joerg Exp $ d19 7 a25 1 .if !target(deinstall) d28 1 @ 1.7 log @Don't reset the "installed" state when using DESTDIR operations on deinstall. The semantic of deinstall should stay as "remove the installed version" and the old behaviour force a repackaging. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.6 2006/08/09 15:31:01 jlam Exp $ d25 1 a25 1 _SU_DEINSTALL_TARGETS+= deinstall-pkg a47 11 ###################################################################### ### deinstall-pkg (PRIVATE, override) ###################################################################### ### deinstall-pkg removes the package from the system. This should ### be overridden per package system flavor. ### .if !target(deinstall-pkg) deinstall-pkg: @@${DO_NADA} .endif @ 1.6 log @Drop .ORDER declarations since pkgsrc doesn't support "make -j ...". @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.5 2006/08/04 20:52:27 rillig Exp $ d27 1 d29 1 @ 1.5 log @Fixed the locking, as suggested by Johnny on the tech-pkg mailing list. Added two targets acquire-localbase-lock and release-localbase-lock, which mark the complete LOCALBASE directory as locked, so that multiple packages cannot run the install, deinstall or bin-install targets at the same time. The install target aquires locks in both WRKSRC and LOCALBASE, the other two targets only need the LOCALBASE lock, since they may be run without WRKSRC being present on the system. locking.mk must be included before tools.mk and the PKG_FAIL_REASON check. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.4 2006/08/03 19:12:43 rillig Exp $ a28 1 .ORDER: ${_SU_DEINSTALL_TARGETS} @ 1.4 log @When installing or deinstalling a package, it is not enough to lock the WRKDIR against foreign processes. Instead, the PKG_DBDIR is locked, preventing other (pkgsrc) processes from modifying the set of installed packages while another one is doing that. This allows to use "bmake update" efficiently on multi-processor machines by just running it in four different package directories. Note that the pkg_add and pkg_delete tools may still interfere with this locking when they are directly run. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.3 2006/06/05 22:49:44 jlam Exp $ d24 10 a33 1 su-deinstall: acquire-install-lock deinstall-pkg release-install-lock install-clean @ 1.3 log @Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG in various places. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.2 2006/06/05 17:41:11 jlam Exp $ d24 1 a24 1 su-deinstall: deinstall-pkg install-clean @ 1.2 log @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. @ text @d1 1 a1 1 # $NetBSD: deinstall.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $ d21 1 a21 1 @@${ECHO_MSG} "${_PKGSRC_IN}> Deinstalling for ${PKGNAME}" @ 1.1 log @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. @ text @d1 1 a1 1 # $NetBSD$ d19 1 d22 1 d35 1 d37 1 @