Re: [gentoo-portage-dev] [PATCH 0/2] emerge: Add short -l option for --load-average (bug 699256)
On Sat, Aug 15, 2020 at 12:27 PM Zac Medico wrote: > > Add a short -l option for --load-average just like make(1) has. That's awesome, thank you. That'll make some catalyst work easier for me.
Re: [gentoo-portage-dev] [PATCH 0/2] emerge: Add short -l option for --load-average (bug 699256)
On Sat, 15 Aug 2020 12:26:42 -0700 Zac Medico wrote: > Add a short -l option for --load-average just like make(1) has. > > Bug: https://bugs.gentoo.org/699256 > Signed-off-by: Zac Medico > > Zac Medico (2): > emerge: Remove deprecated --changelog option (bug 699256) > emerge: Add short -l option for --load-average (bug 699256) > > lib/_emerge/actions.py | 5 -- > lib/_emerge/main.py| 5 +- > lib/_emerge/resolver/output.py | 32 +--- > lib/_emerge/resolver/output_helpers.py | 106 > - man/emerge.1 | > 8 +- 5 files changed, 5 insertions(+), 151 deletions(-) > looks good :)
[gentoo-portage-dev] [PATCH 0/2] emerge: Add short -l option for --load-average (bug 699256)
Add a short -l option for --load-average just like make(1) has. Bug: https://bugs.gentoo.org/699256 Signed-off-by: Zac Medico Zac Medico (2): emerge: Remove deprecated --changelog option (bug 699256) emerge: Add short -l option for --load-average (bug 699256) lib/_emerge/actions.py | 5 -- lib/_emerge/main.py| 5 +- lib/_emerge/resolver/output.py | 32 +--- lib/_emerge/resolver/output_helpers.py | 106 - man/emerge.1 | 8 +- 5 files changed, 5 insertions(+), 151 deletions(-) -- 2.25.3
[gentoo-portage-dev] [PATCH 2/2] emerge: Add short -l option for --load-average (bug 699256)
Add a short -l option for --load-average just like make(1) has. Bug: https://bugs.gentoo.org/699256 Signed-off-by: Zac Medico --- lib/_emerge/main.py | 2 ++ man/emerge.1| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py index 5aac451fe..975738762 100644 --- a/lib/_emerge/main.py +++ b/lib/_emerge/main.py @@ -171,6 +171,7 @@ def insert_optional_args(args): short_arg_opts = { 'D' : valid_integers, 'j' : valid_integers, + 'l' : valid_floats, } # Don't make things like "-kn" expand to "-k n" @@ -542,6 +543,7 @@ def parse_opts(tmpcmdline, silent=False): }, "--load-average": { + "shortopt" : "-l", "help" :"Specifies that no new builds should be started " + \ "if there are other builds running and the load average " + \ diff --git a/man/emerge.1 b/man/emerge.1 index 9f77d1fa2..fe7d05a21 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -688,7 +688,7 @@ dependencies are recalculated for remaining packages and any with unsatisfied dependencies are automatically dropped. Also see the related \fB\-\-skipfirst\fR option. .TP -.BR "\-\-load\-average [LOAD]" +.BR \-l\ [LOAD] ", " \-\-load\-average[=LOAD] Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number). With no argument, removes a previous load limit. -- 2.25.3
[gentoo-portage-dev] [PATCH 1/2] emerge: Remove deprecated --changelog option (bug 699256)
Bug: https://bugs.gentoo.org/699256 Signed-off-by: Zac Medico --- lib/_emerge/actions.py | 5 -- lib/_emerge/main.py| 3 +- lib/_emerge/resolver/output.py | 32 +--- lib/_emerge/resolver/output_helpers.py | 106 - man/emerge.1 | 6 -- 5 files changed, 2 insertions(+), 150 deletions(-) diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py index d259206ad..063f5d4a0 100644 --- a/lib/_emerge/actions.py +++ b/lib/_emerge/actions.py @@ -2936,11 +2936,6 @@ def run_action(emerge_config): adjust_configs(emerge_config.opts, emerge_config.trees) - if "--changelog" in emerge_config.opts: - writemsg_level( - " %s The emerge --changelog (or -l) option is deprecated\n" % - warn("*"), level=logging.WARNING, noiselevel=-1) - if profile_check(emerge_config.trees, emerge_config.action) != os.EX_OK: return 1 diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py index f4c7e2715..5aac451fe 100644 --- a/lib/_emerge/main.py +++ b/lib/_emerge/main.py @@ -26,7 +26,7 @@ options=[ "--ask-enter-invalid", "--buildpkgonly", "--changed-use", -"--changelog","--columns", +"--columns", "--debug", "--digest", "--emptytree", @@ -58,7 +58,6 @@ shortmapping={ "e":"--emptytree", "f":"--fetchonly", "F":"--fetch-all-uri", "h":"--help", -"l":"--changelog", "n":"--noreplace", "N":"--newuse", "o":"--onlydeps", "O":"--nodeps", "p":"--pretend", "P":"--prune", diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index b6c77ecad..0c90abefb 100644 --- a/lib/_emerge/resolver/output.py +++ b/lib/_emerge/resolver/output.py @@ -26,7 +26,7 @@ from portage.versions import best, cpv_getversion from _emerge.Blocker import Blocker from _emerge.create_world_atom import create_world_atom from _emerge.resolver.output_helpers import ( _DisplayConfig, _tree_display, - _PackageCounters, _create_use_string, _calc_changelog, PkgInfo) + _PackageCounters, _create_use_string, PkgInfo) from _emerge.show_invalid_depstring_notice import show_invalid_depstring_notice class Display: @@ -39,7 +39,6 @@ class Display: """ def __init__(self): - self.changelogs = [] self.print_msg = [] self.blockers = [] self.counters = _PackageCounters() @@ -561,14 +560,6 @@ class Display: noiselevel=-1) - def print_changelog(self): - """Prints the changelog text to std_out - """ - for chunk in self.changelogs: - writemsg_stdout(chunk, - noiselevel=-1) - - def get_display_list(self, mylist): """Determines the display list to process @@ -668,23 +659,6 @@ class Display: return pkg_info - def do_changelog(self, pkg, pkg_info): - """Processes and adds the changelog text to the master text for output - - @param pkg: _emerge.Package.Package instance - @param pkg_info: dictionay - Modifies self.changelogs - """ - if pkg_info.previous_pkg is not None: - ebuild_path_cl = pkg_info.ebuild_path - if ebuild_path_cl is None: - # binary package - ebuild_path_cl = self.portdb.findname(pkg.cpv, myrepo=pkg.repo) - if ebuild_path_cl is not None: - self.changelogs.extend(_calc_changelog( - ebuild_path_cl, pkg_info.previous_pkg, pkg.cpv)) - - def check_system_world(self, pkg): """Checks for any occurances of the package in the system or world sets @@ -780,8 +754,6 @@ class Display: pkg_info.attr_display.new_slot = True if pkg_info.ordered: self.counters.newslot += 1 - if self.conf.changelog: - self.do_changelog(pkg, pkg_info) else: pkg_info.attr_display.new = True if pkg_info.ordered: @@ -909,8 +881,6 @@ class Display: noiselevel=-1) spawn_nofetch(self.conf.trees[pkg.root]["porttree"].dbapi, pkg_info.ebuild_path) - if self.conf.changelog: - self.print_changelog() return os.EX_OK diff --git a/lib/_emerge/resolver/output_helpers.py b/lib/_emerge/resolver/output_helpers.py index 932e66e1b..c9faac688 100644 --- a/lib/_emerge/resolver/output_helpers.py +++ b/lib/_emerge/resolver/output_helpers.py @@ -1
Re: [gentoo-portage-dev] profile masking
On Fri, 2020-08-14 at 23:12 +0200, Michał Górny wrote: > On Fri, 2020-08-14 at 15:42 +, Joakim Tjernlund wrote: > > On Fri, 2020-08-14 at 17:31 +0200, Ulrich Mueller wrote: > > > > > > > > On Fri, 14 Aug 2020, Joakim Tjernlund wrote: > > > > When pkgs are masked in the profile, it affects all variants of that > > > > pkgs, even the ones that are in other overlays. > > > > Example: > > > > !!! The following installed packages are masked: > > > > - sys-auth/sssd-::transmode (masked by: package.mask) > > > > /usr/portage/profiles/package.mask: > > > > # Matt Turner (2020-08-13) > > > > # Masked for testing > > > > My sssd- is now masked. > > > > Could the profile syntax be extended to include syntax allowed in > > > > /etc/portage ? Then one could use the ::gentoo syntax (or so I hope) > > > > > > The :: syntax is Portage specific and doesn't exist in EAPI 7. > > > So there's no chance to get it into the profile dir anytime soon > > > (because that would imply :: to be added to a future EAPI and the > > > top-level profile dir to be bumped to that EAPI). > > > > Is profile part of EAPI? masks are not defined/used in ebuilds directly. > > > > > You could override the mask in your overlay's profile/package.mask > > > instead, using an entry with the "-" operator. > > > > Yes, I know I can add that in profile/package.mask but I am looking for the > > bigger > > picture here. This has to stop somehow, there need to be something that > > limits > > the mask scope to the repo/overlay it is defined. > > > > Why is that? I dare say the bigger picture needs to include different > mask reasons. Sure, 'masked for testing' may or may not make little > sense for live ebuilds. However, 'masked for security issues' may > pretty apply to custom repo ebuilds as well. > Possibly, but the way you mask Test/Security should then be referring to specific versions, not all possible versions in the universe. Jocke