1 |
commit: 230c312676ea79c7fa4c9fa983c80d2443455dd4 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 3 12:09:42 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 10 07:16:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=230c3126 |
7 |
|
8 |
Remove deprecated dbkey support from doebuild/ebuild.sh |
9 |
|
10 |
Remove the support for the dbkey logic that used to write metadata into |
11 |
a file. This logic has stopped being used and became deprecated |
12 |
in 2013. If any external tool is still using it, it's probably been |
13 |
broken by changes in metadata itself since, and would definitely |
14 |
be broken by the incoming change in metadata format. |
15 |
|
16 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
17 |
|
18 |
bin/ebuild.sh | 23 ++++------------------- |
19 |
lib/portage/package/ebuild/doebuild.py | 22 +++------------------- |
20 |
2 files changed, 7 insertions(+), 38 deletions(-) |
21 |
|
22 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
23 |
index 3042e6c8c..32995d95b 100755 |
24 |
--- a/bin/ebuild.sh |
25 |
+++ b/bin/ebuild.sh |
26 |
@@ -754,14 +754,6 @@ if [[ $EBUILD_PHASE = depend ]] ; then |
27 |
export SANDBOX_ON="0" |
28 |
set -f |
29 |
|
30 |
- if [ -n "${dbkey}" ] ; then |
31 |
- if [ ! -d "${dbkey%/*}" ]; then |
32 |
- install -d -g ${PORTAGE_GID} -m2775 "${dbkey%/*}" |
33 |
- fi |
34 |
- # Make it group writable. 666&~002==664 |
35 |
- umask 002 |
36 |
- fi |
37 |
- |
38 |
auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE |
39 |
DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND BDEPEND |
40 |
EAPI PROPERTIES DEFINED_PHASES IDEPEND UNUSED_04 |
41 |
@@ -775,17 +767,10 @@ if [[ $EBUILD_PHASE = depend ]] ; then |
42 |
fi |
43 |
|
44 |
# The extra $(echo) commands remove newlines. |
45 |
- if [ -n "${dbkey}" ] ; then |
46 |
- > "${dbkey}" |
47 |
- for f in ${auxdbkeys} ; do |
48 |
- echo $(echo ${!f}) >> "${dbkey}" || exit $? |
49 |
- done |
50 |
- else |
51 |
- for f in ${auxdbkeys} ; do |
52 |
- eval "echo \$(echo \${!f}) 1>&${PORTAGE_PIPE_FD}" || exit $? |
53 |
- done |
54 |
- eval "exec ${PORTAGE_PIPE_FD}>&-" |
55 |
- fi |
56 |
+ for f in ${auxdbkeys} ; do |
57 |
+ eval "echo \$(echo \${!f}) 1>&${PORTAGE_PIPE_FD}" || exit $? |
58 |
+ done |
59 |
+ eval "exec ${PORTAGE_PIPE_FD}>&-" |
60 |
set +f |
61 |
else |
62 |
# Note: readonly variables interfere with __preprocess_ebuild_env(), so |
63 |
|
64 |
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py |
65 |
index 3da239be2..3bcfd3a5d 100644 |
66 |
--- a/lib/portage/package/ebuild/doebuild.py |
67 |
+++ b/lib/portage/package/ebuild/doebuild.py |
68 |
@@ -568,7 +568,7 @@ _doebuild_commands_without_builddir = ( |
69 |
) |
70 |
|
71 |
def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, listonly=0, |
72 |
- fetchonly=0, cleanup=0, dbkey=DeprecationWarning, use_cache=1, fetchall=0, tree=None, |
73 |
+ fetchonly=0, cleanup=0, use_cache=1, fetchall=0, tree=None, |
74 |
mydbapi=None, vartree=None, prev_mtimes=None, |
75 |
fd_pipes=None, returnpid=False): |
76 |
""" |
77 |
@@ -591,9 +591,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, |
78 |
@type fetchonly: Boolean |
79 |
@param cleanup: Passed to prepare_build_dirs (TODO: what does it do?) |
80 |
@type cleanup: Boolean |
81 |
- @param dbkey: A file path where metadata generated by the 'depend' phase |
82 |
- will be written. |
83 |
- @type dbkey: String |
84 |
@param use_cache: Enables the cache |
85 |
@type use_cache: Boolean |
86 |
@param fetchall: Used to wrap fetch(), fetches all URIs (even ones invalid due to USE conditionals) |
87 |
@@ -637,11 +634,6 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, |
88 |
"settings['EROOT'] is used.", |
89 |
DeprecationWarning, stacklevel=2) |
90 |
|
91 |
- if dbkey is not DeprecationWarning: |
92 |
- warnings.warn("portage.doebuild() called " |
93 |
- "with deprecated dbkey argument.", |
94 |
- DeprecationWarning, stacklevel=2) |
95 |
- |
96 |
if not tree: |
97 |
writemsg("Warning: tree not specified to doebuild\n") |
98 |
tree = "porttree" |
99 |
@@ -836,16 +828,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, |
100 |
|
101 |
# get possible slot information from the deps file |
102 |
if mydo == "depend": |
103 |
- writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2) |
104 |
- if returnpid: |
105 |
- return _spawn_phase(mydo, mysettings, |
106 |
- fd_pipes=fd_pipes, returnpid=returnpid) |
107 |
- if dbkey and dbkey is not DeprecationWarning: |
108 |
- mysettings["dbkey"] = dbkey |
109 |
- else: |
110 |
- mysettings["dbkey"] = \ |
111 |
- os.path.join(mysettings.depcachedir, "aux_db_key_temp") |
112 |
- |
113 |
+ if not returnpid: |
114 |
+ raise TypeError("returnpid must be True for depend phase") |
115 |
return _spawn_phase(mydo, mysettings, |
116 |
fd_pipes=fd_pipes, returnpid=returnpid) |