summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-09-03 14:09:42 +0200
committerMichał Górny <mgorny@gentoo.org>2021-09-10 09:16:38 +0200
commit230c312676ea79c7fa4c9fa983c80d2443455dd4 (patch)
tree117a58df6b02fd18b8c4e32b2a09fb30ff3875c2
parentsetup.py: Restore .tar.gz sdist default (diff)
downloadportage-230c312676ea79c7fa4c9fa983c80d2443455dd4.tar.gz
portage-230c312676ea79c7fa4c9fa983c80d2443455dd4.tar.bz2
portage-230c312676ea79c7fa4c9fa983c80d2443455dd4.zip
Remove deprecated dbkey support from doebuild/ebuild.sh
Remove the support for the dbkey logic that used to write metadata into a file. This logic has stopped being used and became deprecated in 2013. If any external tool is still using it, it's probably been broken by changes in metadata itself since, and would definitely be broken by the incoming change in metadata format. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rwxr-xr-xbin/ebuild.sh23
-rw-r--r--lib/portage/package/ebuild/doebuild.py22
2 files changed, 7 insertions, 38 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 3042e6c8c..32995d95b 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -754,14 +754,6 @@ if [[ $EBUILD_PHASE = depend ]] ; then
export SANDBOX_ON="0"
set -f
- if [ -n "${dbkey}" ] ; then
- if [ ! -d "${dbkey%/*}" ]; then
- install -d -g ${PORTAGE_GID} -m2775 "${dbkey%/*}"
- fi
- # Make it group writable. 666&~002==664
- umask 002
- fi
-
auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND BDEPEND
EAPI PROPERTIES DEFINED_PHASES IDEPEND UNUSED_04
@@ -775,17 +767,10 @@ if [[ $EBUILD_PHASE = depend ]] ; then
fi
# The extra $(echo) commands remove newlines.
- if [ -n "${dbkey}" ] ; then
- > "${dbkey}"
- for f in ${auxdbkeys} ; do
- echo $(echo ${!f}) >> "${dbkey}" || exit $?
- done
- else
- for f in ${auxdbkeys} ; do
- eval "echo \$(echo \${!f}) 1>&${PORTAGE_PIPE_FD}" || exit $?
- done
- eval "exec ${PORTAGE_PIPE_FD}>&-"
- fi
+ for f in ${auxdbkeys} ; do
+ eval "echo \$(echo \${!f}) 1>&${PORTAGE_PIPE_FD}" || exit $?
+ done
+ eval "exec ${PORTAGE_PIPE_FD}>&-"
set +f
else
# Note: readonly variables interfere with __preprocess_ebuild_env(), so
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
index 3da239be2..3bcfd3a5d 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -568,7 +568,7 @@ _doebuild_commands_without_builddir = (
)
def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, listonly=0,
- fetchonly=0, cleanup=0, dbkey=DeprecationWarning, use_cache=1, fetchall=0, tree=None,
+ fetchonly=0, cleanup=0, use_cache=1, fetchall=0, tree=None,
mydbapi=None, vartree=None, prev_mtimes=None,
fd_pipes=None, returnpid=False):
"""
@@ -591,9 +591,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
@type fetchonly: Boolean
@param cleanup: Passed to prepare_build_dirs (TODO: what does it do?)
@type cleanup: Boolean
- @param dbkey: A file path where metadata generated by the 'depend' phase
- will be written.
- @type dbkey: String
@param use_cache: Enables the cache
@type use_cache: Boolean
@param fetchall: Used to wrap fetch(), fetches all URIs (even ones invalid due to USE conditionals)
@@ -637,11 +634,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
"settings['EROOT'] is used.",
DeprecationWarning, stacklevel=2)
- if dbkey is not DeprecationWarning:
- warnings.warn("portage.doebuild() called "
- "with deprecated dbkey argument.",
- DeprecationWarning, stacklevel=2)
-
if not tree:
writemsg("Warning: tree not specified to doebuild\n")
tree = "porttree"
@@ -836,16 +828,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0,
# get possible slot information from the deps file
if mydo == "depend":
- writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2)
- if returnpid:
- return _spawn_phase(mydo, mysettings,
- fd_pipes=fd_pipes, returnpid=returnpid)
- if dbkey and dbkey is not DeprecationWarning:
- mysettings["dbkey"] = dbkey
- else:
- mysettings["dbkey"] = \
- os.path.join(mysettings.depcachedir, "aux_db_key_temp")
-
+ if not returnpid:
+ raise TypeError("returnpid must be True for depend phase")
return _spawn_phase(mydo, mysettings,
fd_pipes=fd_pipes, returnpid=returnpid)