Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] Support FEATURES=qa-unresolved-soname-deps (bug 708448)
Date: Sat, 08 Feb 2020 23:43:07
Message-Id: 20200208234011.38269-1-zmedico@gentoo.org
1 Support FEATURES=qa-unresolved-soname-deps so that it's possible to
2 disable the QA warning that was introduced for bug 704320. This is
3 useful for systems that may have incomplete PROVIDES metadata due
4 to alternative package managers or experimentation with a new
5 architecture.
6
7 Bug: https://bugs.gentoo.org/708448
8 Bug: https://bugs.gentoo.org/704320
9 Signed-off-by: Zac Medico <zmedico@g.o>
10 ---
11 cnf/make.globals | 3 ++-
12 lib/_emerge/EbuildPhase.py | 13 ++++++++-----
13 lib/portage/const.py | 1 +
14 man/make.conf.5 | 4 ++++
15 4 files changed, 15 insertions(+), 6 deletions(-)
16
17 diff --git a/cnf/make.globals b/cnf/make.globals
18 index 50511e812..139e1ce97 100644
19 --- a/cnf/make.globals
20 +++ b/cnf/make.globals
21 @@ -53,7 +53,8 @@ FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
22 config-protect-if-modified distlocks ebuild-locks
23 fixlafiles ipc-sandbox merge-sync multilib-strict
24 network-sandbox news parallel-fetch pid-sandbox
25 - preserve-libs protect-owned sandbox sfperms strict
26 + preserve-libs protect-owned qa-unresolved-soname-deps
27 + sandbox sfperms strict
28 unknown-features-warn unmerge-logs unmerge-orphans userfetch
29 userpriv usersandbox usersync"
30
31 diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py
32 index 828e6e126..234a273a0 100644
33 --- a/lib/_emerge/EbuildPhase.py
34 +++ b/lib/_emerge/EbuildPhase.py
35 @@ -453,11 +453,14 @@ class _PostPhaseCommands(CompositeTask):
36 if msg:
37 self.scheduler.output(msg, log_path=self.settings.get("PORTAGE_LOG_FILE"))
38
39 - # This operates on REQUIRES metadata generated by the above function call.
40 - future = self._soname_deps_qa()
41 - # If an unexpected exception occurs, then this will raise it.
42 - future.add_done_callback(lambda future: future.result())
43 - self._start_task(AsyncTaskFuture(future=future), self._default_final_exit)
44 + if 'qa-unresolved-soname-deps' in self.settings.features:
45 + # This operates on REQUIRES metadata generated by the above function call.
46 + future = self._soname_deps_qa()
47 + # If an unexpected exception occurs, then this will raise it.
48 + future.add_done_callback(lambda future: future.result())
49 + self._start_task(AsyncTaskFuture(future=future), self._default_final_exit)
50 + else:
51 + self._default_final_exit(task)
52 else:
53 self._default_final_exit(task)
54
55 diff --git a/lib/portage/const.py b/lib/portage/const.py
56 index e95039fd5..f6be9258f 100644
57 --- a/lib/portage/const.py
58 +++ b/lib/portage/const.py
59 @@ -180,6 +180,7 @@ SUPPORTED_FEATURES = frozenset([
60 "preserve-libs",
61 "protect-owned",
62 "python-trace",
63 + "qa-unresolved-soname-deps",
64 "sandbox",
65 "selinux",
66 "sesandbox",
67 diff --git a/man/make.conf.5 b/man/make.conf.5
68 index 494d5f003..f82fed65a 100644
69 --- a/man/make.conf.5
70 +++ b/man/make.conf.5
71 @@ -607,6 +607,10 @@ If \fIcollision\-protect\fR is enabled then it takes precedence over
72 Output a verbose trace of python execution to stderr when a command's
73 \-\-debug option is enabled.
74 .TP
75 +.B qa\-unresolved\-soname\-deps
76 +Trigger a QA warning when a package installs files with unresolved soname
77 +dependencies.
78 +.TP
79 .B sandbox
80 Enable sandbox\-ing when running \fBemerge\fR(1) and \fBebuild\fR(1).
81 .TP
82 --
83 2.24.1