From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/, man/
Date: Fri, 19 Nov 2021 23:47:23 +0000 (UTC) [thread overview]
Message-ID: <1637364852.fadd8b8d89e2e65a97713ed4040d268e5a25a5ab.zmedico@gentoo> (raw)
commit: fadd8b8d89e2e65a97713ed4040d268e5a25a5ab
Author: Madhu Priya Murugan <madhu.murugan <AT> rohde-schwarz <DOT> com>
AuthorDate: Mon Nov 15 18:56:47 2021 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Nov 19 23:34:12 2021 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fadd8b8d
Exclude binary pkg installation for live ebuilds
This commit introduces a new option "--usepkg-exclude-live" for emerge.
Passing this option with the emerge call, will disable binary pkgs from
being installed for live ebuilds. So it is no longer necessary to pass
a list of live packages to --usepkg-exclude.
Before this commit, when an emerge is called with the option
'--usepkg', the corresponding package is installed from the binary cache
under /var/cache/binpkgs.
With this commit, even if we explicitly use the options, '--usepkg'
for the packages with live ebuilds, no binary package will not be
installed for live ebuilds (given we disable it calling emerge with
"--usepkg-exclude-live" in the emerge).
Motivation: We no longer need to maintain a separate list for VCS based
pkgs (eg., git pkgs), from being installed from the binary cache, and
then pass it to --usepkg-exclude. This reduces some redundancy.
Closes: https://github.com/gentoo/portage/pull/769
Signed-off-by: Madhu Priya Murugan <madhu.murugan <AT> rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/_emerge/depgraph.py | 12 ++++++++++++
lib/_emerge/main.py | 10 ++++++++++
man/emerge.1 | 5 ++++-
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 22d0be196..07431c8ee 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -7303,6 +7303,7 @@ class depgraph:
rebuilt_binaries = "rebuilt_binaries" in self._dynamic_config.myparams
usepkg = "--usepkg" in self._frozen_config.myopts
usepkgonly = "--usepkgonly" in self._frozen_config.myopts
+ usepkg_exclude_live = "--usepkg-exclude-live" in self._frozen_config.myopts
empty = "empty" in self._dynamic_config.myparams
selective = "selective" in self._dynamic_config.myparams
reinstall = False
@@ -7379,6 +7380,17 @@ class depgraph:
):
break
+ # We can choose not to install a live package from using binary
+ # cache by disabling it with option --usepkg-exclude-live in the
+ # emerge call.
+ if (
+ usepkg_exclude_live
+ and built
+ and not installed
+ and "live" in pkg._metadata.get("PROPERTIES", "").split()
+ ):
+ continue
+
useoldpkg = useoldpkg_atoms.findAtomForPackage(
pkg, modified_use=self._pkg_use_enabled(pkg)
)
diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index 34555b26c..592a74692 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -179,6 +179,7 @@ def insert_optional_args(args):
"--use-ebuild-visibility": y_or_n,
"--usepkg": y_or_n,
"--usepkgonly": y_or_n,
+ "--usepkg-exclude-live": y_or_n,
"--verbose": y_or_n,
"--verbose-slot-rebuilds": y_or_n,
"--with-test-deps": y_or_n,
@@ -720,6 +721,10 @@ def parse_opts(tmpcmdline, silent=False):
"help": "use only binary packages",
"choices": true_y_or_n,
},
+ "--usepkg-exclude-live": {
+ "help": "do not install from binary packages for live ebuilds",
+ "choices": true_y_or_n,
+ },
"--verbose": {
"shortopt": "-v",
"help": "verbose output",
@@ -1115,6 +1120,11 @@ def parse_opts(tmpcmdline, silent=False):
else:
myoptions.usepkgonly = None
+ if myoptions.usepkg_exclude_live in true_y:
+ myoptions.usepkg_exclude_live = True
+ else:
+ myoptions.usepkg_exclude_live = None
+
if myoptions.verbose in true_y:
myoptions.verbose = True
else:
diff --git a/man/emerge.1 b/man/emerge.1
index 8f8c2ebda..8f6d12925 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Mar 2021" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Nov 2021" "Portage VERSION" "Portage"
.SH "NAME"
emerge \- Command\-line interface to the Portage system
.SH "SYNOPSIS"
@@ -1064,6 +1064,9 @@ packages must be available at the time of dependency calculation or emerge
will simply abort. Portage does not use ebuild repositories when calculating
dependency information so all masking information is ignored.
.TP
+.BR "\-\-usepkg\-exclude\-live [ y | n ]"
+Tells emerge to not install from binary packages for live ebuilds.
+.TP
.BR "\-\-verbose [ y | n ]" ", " \-v
Tell emerge to run in verbose mode. Currently this flag causes emerge to print
out GNU info errors, if any, and to show the USE flags that will be used for
next reply other threads:[~2021-11-19 23:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 23:47 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-16 16:03 [gentoo-commits] proj/portage:master commit in: lib/_emerge/, man/ Zac Medico
2021-06-13 21:48 Zac Medico
2021-03-28 6:41 Zac Medico
2020-08-17 3:50 Zac Medico
2019-12-06 4:09 Zac Medico
2019-08-31 5:58 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1637364852.fadd8b8d89e2e65a97713ed4040d268e5a25a5ab.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox