summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* multiprocessing.eclass: consider (GNU)MAKEFLAGS, add get_makeopts_{jobs,loadavg}Florian Schmaus2023-10-091-5/+33
| | | | | | | | | | | | | Since --load-average may not be found in other Make implementations besides GNU Make, it is potentially found in GNUMAKEFLAGS and not in MAKEOPTS. Also, Portage is probably soon setting --load-average in GNUMAKEFLAGS as default. Thanks to floppym and mgorny for feedback. Signed-off-by: Florian Schmaus <flow@gentoo.org>
* multiprocessing.eclass: Default makeopts_jobs to inf=nproc+1Michał Górny2022-05-011-6/+5
| | | | | | | | | | | | | | | | | | | | | | Change the default value for 'inf' argument to makeopts_jobs from 999 to $(get_nproc) + 1. This means that if MAKEOPTS specifies a `-j` argument without a specific value, nproc will be used rather than infinity-ish number of jobs. The old default made sense for ebuilds using both makeopts_jobs and makeopts_loadavg. However, these are very rare — only 4 packages and 3 eclass at this time. For the remaining ebuilds, they meant uncontrollably using up to 999 jobs. The new default is both safer and more correct for the vast majority of Gentoo packages, removing the necessity of repeating: $(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") The ebuilds and eclasses using makeopts_loadavg have been updated to pass the old default. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multiprocessing.eclass: fix @SUPPORTED_EAPIS eclassdocSam James2021-06-211-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* multiprocessing.eclass: [QA] add EAPI guardSam James2021-06-201-1/+7
| | | | | Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
* multiprocesing.eclass: Remove redirect_alloc_fdMichał Górny2018-01-041-35/+0
| | | | | | | | | Remove the redirect_alloc_fd function that is no longer used since the removal of multijob* functions. The function is complex, has little potential use and an equivalent functionality is built-in in newer bash versions, making it completely unnecessary for EAPI 6. Closes: https://github.com/gentoo/gentoo/pull/6696
* multiprocessing.eclass: Remove bashpid functionMichał Górny2018-01-041-17/+0
| | | | | | Remove the bashpid function that is not used anywhere after the removal of multijob* logic. The unprefixed name can be quite confusing, and the function itself is rather unlikely to be useful.
* multiprocessing.eclass: Remove multijob_* functionsMichał Górny2018-01-041-168/+10
| | | | | | | | | | Remove the multijob functions that were used to run bash code in parallel. The code was very complex, fragile and unmaintained. It has been used scarcely, and pretty much by a single developer. It gave very little gain, usually at the cost of losing readability and violating PMS. Closes: https://bugs.gentoo.org/613322
* multiprocessing.eclass: make loadavg regex work for float valuesMike Gilbert2017-09-141-1/+1
| | | | Bug: https://bugs.gentoo.org/630626
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* multiprocess.eclass: makeopts_{jobs,loadavg}: fix implicit handling of ↵Mike Frysinger2017-02-091-2/+2
| | | | | | | | $MAKEOPTS #608242 We missed quoting on ${MAKEOPTS} to set it as the first arg which meant we might load invalid values into the second arg which is the "infinite" scenario.
* multiprocessing.eclass: work around Cygwin FIFO shortcomingMichael Haubenwallner2017-01-161-2/+7
| | | | | | | | | Cygwin does not support multiple read-handles for one FIFO (yet). As we really need just one readonly- and one writeonly-handle, we can reorder to open one single readwrite- and one writeonly-handle. X-Gentoo-Bug: 583962 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=583962
* multiprocessing.eclass: Support passing custom inf values for gettersMichał Górny2016-12-181-7/+10
| | | | | | | | Support passing custom values for 'infinity' in makeopts_jobs() and makeopts_loadavg(). This can be used e.g. when a build system does not support --loadavg, and therefore '--jobs 999' would most likely be a really bad idea. Combined with get_nproc(), this can be used to provide a sane replacement instead.
* multiprocessing.eclass: Introduce get_nproc() to get no of CPUsMichał Górny2016-12-181-0/+32
| | | | | | | | | | Introduce get_nproc(), a portable 'nproc' wrapper. It uses either 'nproc' or a fallback Python multiprocessing module call to attempt to determine the number of available processing units. This can be used e.g. to determine a safe number of jobs to run when MAKEOPTS specifies unlimited --jobs and the build system in question does not support --load-average.
* multiprocessing.eclass: Fix handling multiple short options (e.g. -kj)Michał Górny2016-12-181-4/+4
| | | | | | | | Improve the regular expressions to handle parameters consisting of multiple short options (such as -kj). It should be noted that the code is not perfect but should handle all common (valid) cases; it could e.g. incorrectly process a short option followed by string arg such as '-Wfoo.j' although having this in MAKEOPTS is extremely unlikely.
* multiprocessing.eclass: makeopts_loadavg: various fixes #543116Mike Frysinger2015-11-241-3/+4
| | | | | | | - Add support for --max-load option - Fix default load value if not specified (999) - Fix trailing flag consumption so we don't leave garbage behind - Add tests!
* proj/gentoo: Initial commitRobin H. Johnson2015-08-081-0/+273
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed