aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* EbuildBuild: Execute EbuildFetchonly in subprocessZac Medico2024-02-121-19/+20
| | | | | | | | | | | | | | | | | | | | | | Execute EbuildFetchonly in a subprocess since it needs to run the event loop itself (even for pretend mode since it may need to fetch mirror layouts as reported in bug 702154). Also remove obsolete loop.is_running() case in doebuild related to bug 601252, since it will fail if a mirror layout file needs to be fetched, so we should just assume that the event loop is not running. Set fetched = 2 for listonly (pretend) mode in the fetch function so that EbuildFetchonly will properly report success for this mode. Pass ebuild_path to EbuildFetchonly, and also remove setcpv call from EbuildFetchonly since it's called earlier in EbuildBuild. Bug: https://bugs.gentoo.org/924287 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Cancel prefetchers that have not started yetZac Medico2023-11-281-0/+4
| | | | | | | | | | | Cancel prefetchers that have not started yet. This will cause the parallel-fetch SequentialTaskQueue to simply discard them, and a regular fetcher will be instantiated immediately. This prevents errors when accessing the pkg_path attribute of BinpkgPrefetcher instances that have not started yet. Bug: https://bugs.gentoo.org/918636 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* */*: rerun black w/ 23.1.0Sam James2023-02-031-5/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* */*: convert to f-strings (run flynt)Sam James2023-01-101-7/+5
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* drop unused importsJohn Helmert III2022-12-031-1/+0
| | | | | | | | | Some of the pyupgrade changes removed the only uses of some imports. Thus, this autoflakes everything to remove those now-unused imports. Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* pyupgrade everythingJohn Helmert III2022-12-031-10/+12
| | | | | Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Exclude binary cache build for live ebuildsMadhu Priya Murugan2021-11-191-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new value "buildpkg-live" for FEATURES, which is enabled by default (so the default behavior of building binary cache for all packages is retained). When it is disabled by calling emerge with FEATURES="-buildpkg-live", binary caches will not be built live ebuilds even if we specify --buildpkg. So that it is no longer necessary to pass a list of packages with live ebuilds to --buildpkg-exclude. Before this commit, when an emerge is called with the option '--buildpkg', a binary cache for the package is created under /var/cache/binpkgs. For example, when we do a, 'emerge --ask --verbose --buildpkg some-gitpkg/abc', a binary cache abc-1.1.1.tbz2 is created under /var/cache/binpkgs/some-gitpkg. With this commit, even if we explicitly use the options, '--buildpkg' for the packages with live ebuilds, no binary cache will be created (given we disable it calling emerge with FEATURES="-buildpkg-live"). Motivation: Since binary caches are created for all packages, including packages with live ebuilds, a separate list of (for eg.,) git packages needs to be maintained. And this is then passed to the options '--buildpkg-exclude' via, EMERGE_DEFAULT_OPTS. So the motivation behind this patch was to reduce redundancy, while we can simply disable binary cache for live ebuilds with this option. Closes: https://github.com/gentoo/portage/pull/766 Signed-off-by: Madhu Priya Murugan <madhu.murugan@rohde-schwarz.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Reformat to use spaces instead of tabs. Also, use blackWolfgang E. Sanyer2021-09-191-520/+607
| | | | | | | | | | | The following command was used to reformat: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . black was run as `black .`, using the default configurations Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge --fetchonly --quiet: use emerge-fetch.log when writable (bug 285614)James Stevenson2021-05-161-4/+21
| | | | | | | Closes: https://github.com/gentoo/portage/pull/707 Bug: https://bugs.gentoo.org/285614 Signed-off-by: James Stevenson <james.al.stevenson@gmail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/_emerge/EbuildBuild.py: drop unused-importAaron Bauman2020-08-031-2/+2
| | | | | | | | * Drop unused-import * Update copyright Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Fix R1705.Alec Warner2020-07-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | The codebase appears to have this pattern like: if foo == bar: return a elif foo == baz: return b else: return c This can often be rewritten as: if foo == bar: return a if foo == baz: return b return c Closes: https://github.com/gentoo/portage/pull/592 Signed-off-by: Alec Warner <antarus@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Remove from __future__ import unicode_literalsZac Medico2020-07-151-2/+0
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Rename pym→lib, for better distutils-r1 interoperabilityMichał Górny2018-07-181-0/+535
Closes: https://github.com/gentoo/portage/pull/343