aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* emerge --search: auto-detect regular expressions (bug 737480)Zac Medico2020-09-074-2/+29
| | | | | | | | | | | | | | | | | | | | | Automatically detect regular expressions when the search string contains any of these regular expression characters or character sequences: ^ $ * [ ] { } | ? .+ This simplifies usage, so that users no longer have to remember to prefix regular expressions with the % character. The new behavior can be disabled by --regex-search-auto=n, in case the regular expressions interpretation causes some kind of problem. Note that fuzzy search and regular expression search are mutually exclusive, and fuzzy search remains the default for search strings that do not contain any regular expression characters. Bug: https://bugs.gentoo.org/737480 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* env-update: create systemd user-session environment definitionFlorian Schmaus2020-09-071-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Portage's env-update currently transforms the environment information from /etc/env.d into /etc/profile.env, which is typically sourced by every user session, setting up its environment. However, /etc/profile.env is not sourced by systemd user services. Instead, for the definition of a systemd user session environment, the 'environment.d' machinery exists. Unfortunately, up to now, env-update does not produce a profile.env equivalent for this machinery, causing issues for systemd user services. For example, an emacs daemon run as user systemd service does not have a complete PATH (bug #704412 [1]), because some PATH components are injected by packages via /etc/env.d. For example, an LLVM ebuild may set PATH="/usr/lib/llvm/9/bin". This commit changes env-update so that a systemd user session environment configuration file named /etc/environment.d/10-gentoo-env.conf is created. Thanks to Michael 'veremitz' Everitt, Arfrever Frehtes Taifersar Arahesis, Ulrich Müller, Joakim Tjernlund, and Zac Medico for the useful feedback. 1: https://bugs.gentoo.org/704412 Bug: https://bugs.gentoo.org/704416 Signed-off-by: Florian Schmaus <flo@geekplace.eu> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* man/{portage,make.conf}.5: Files in subdirs are parsed in lexical orderMichael Everitt2020-09-072-10/+9
| | | | | | | | | | Most files in packages.*, make.conf/*, *.postsync.d/* are parsed not just in ascending alphabetical order, but actually in lexographical (lexical) order, which means alpha-numerically + symbols. Closes: https://github.com/gentoo/portage/pull/616 Signed-off-by: Michael Everitt <gentoo@veremit.xyz> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* syncbase: update with newer Gemato proxy parameter in openpgp envFrédéric Pierret (fepitre)2020-09-074-15/+31
| | | | | | | | | | | - Handle global proxy setting which is overrided by the one provided in Portage configuration (if exists). Bug: https://bugs.gentoo.org/740904 Closes: https://github.com/gentoo/portage/pull/607 See: https://github.com/mgorny/gemato/commit/9980de271de4f8f5e993e2b634d0e8d7753e382f Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* rsync: ignore addrinfos with proxy settingsFrédéric Pierret (fepitre)2020-09-071-9/+10
| | | | | | | | | | | | | Not doing so makes getting addrinfos failing due to "Temporary failure in name resolution" due to proxy settings. An alternative to this solution would be to define a socks.setdefaultproxy and passing socks.socksocket to socket. Bug: https://bugs.gentoo.org/740904 See: https://github.com/gentoo/portage/pull/607 Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Use portage proxy settings for fetching BINPKG hostFrédéric Pierret (fepitre)2020-09-072-4/+15
| | | | | | | Bug: https://bugs.gentoo.org/740898 See: https://github.com/gentoo/portage/pull/607 Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* man/portage.5: Tidy up some long (>80 char) linesMichael Everitt2020-09-051-10/+13
| | | | | | Closes: https://github.com/gentoo/portage/pull/615 Signed-off-by: Michael Everitt <gentoo@veremit.xyz> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* ChangedDepsSet: use strip_slots function like --changed-deps (bug 739908)Zac Medico2020-09-011-36/+15
| | | | | Bug: https://bugs.gentoo.org/739908 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-3.0.5 releaseportage-3.0.5Zac Medico2020-08-302-1/+9
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Use cached portage.getpid() function (bug 739540)Zac Medico2020-08-3020-32/+42
| | | | | | | | | Use the cached portage.getpid() function to avoid unnecessary syscalls, and update the cache after each call to os.fork() where the fork may invoke portage APIs. Bug: https://bugs.gentoo.org/739540 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* dephgraph: Allow elimination of highest version after slot conflict (bug 439688)Zac Medico2020-08-303-14/+2
| | | | | | | | | | | | | | | | | After a slot conflict occurs, allow the highest version to be eliminated from the graph when appropriate. This is needed for correct behavior in cases the highest version cannot be installed because an older version is required by some package. This reverts a change related to bug 531656 from commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0, and that change no longer appears to be necessary, since the unit tests related to bug 531656 now pass without it. Due to this change in slot conflict handling, the --changed-slot test case related to bug 456208 will now fail unless we use an @world update to trigger rebuilds, therefore fix it to do so. Bug: https://bugs.gentoo.org/439688 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_slot_conflict_rebuild: Add dev-lang/go case for bug 439688Zac Medico2020-08-301-1/+63
| | | | | | | | | | | | | | | | | | | Demonstrate this unwanted dev-lang/go rebuild triggered by a missed update due to a slot conflict: [ebuild R ] dev-lang/go-1.14.7 WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict: dev-lang/go:0 (dev-lang/go-1.15:0/1.15::test_repo, ebuild scheduled for merge) USE="" conflicts with =dev-lang/go-1.14* required by (net-p2p/syncthing-1.3.4-r1:0/0::test_repo, installed) USE="" ^ ^^^^^ Bug: https://bugs.gentoo.org/439688 Bug: https://bugs.gentoo.org/739648 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* async_iter_completed: fix InvalidStateError in finally clause (bug 738766)Zac Medico2020-08-231-1/+0
| | | | | | | | | | Do not attempt to wait for the TaskScheduler instance in the finally clause, since it will always raise InvalidStateError if its status is not available yet (which is normal if it has remaining tasks with done callbacks that have not been scheduled yet). Bug: https://bugs.gentoo.org/738766 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* repoman: Update for a repoman-3.0.1 releaserepoman-3.0.1Zac Medico2020-08-182-1/+6
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-3.0.4 releaseportage-3.0.4Zac Medico2020-08-182-1/+7
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* coroutine: use explicit loop parameter (bug 737698)Zac Medico2020-08-1828-125/+138
| | | | | | | | | | | In order to support local event loops within API functions like doebuild, use an explicit loop parameter when calling a coroutine. Internal code will now raise an AssertionError if the loop parameter is omitted for a coroutine, but API consumers may omit it. Bug: https://bugs.gentoo.org/737698 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* repoman: Update for a repoman-3.0.0 releaserepoman-3.0.0Zac Medico2020-08-162-1/+7
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* repoman: Add --jobs and --load-average options (bug 448462)Zac Medico2020-08-163-19/+116
| | | | | | | | | | | | | Add --jobs and --load-average options which allow dependency checks for multiple profiles to run in parallel. The increase in performance is non-linear for the number of jobs, but it can be worthwhile (I measured a 35% decrease in time when running 'repoman -j8 full' on sys-apps/portage). For the -j1 case (default), all dependency checks run in the main process as usual, so there is no significant performance penalty for the default case. Bug: https://bugs.gentoo.org/448462 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-3.0.3 releaseportage-3.0.3Zac Medico2020-08-162-1/+10
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* ForkExecutor: support unlimited jobs with max_jobs=TrueZac Medico2020-08-161-1/+1
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* async_iter_completed: check if loop is closed in finally clauseZac Medico2020-08-161-2/+3
| | | | | | | This avoids RuntimeError('Event loop is closed') errors triggered by SIGINT. Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge: Add short -l option for --load-average (bug 699256)Zac Medico2020-08-162-1/+3
| | | | | | | | | Add a short -l option for --load-average just like make(1) has. Bug: https://bugs.gentoo.org/699256 Reviewed-by: Brian Dolbec <dolsen@gentoo.org> Reviewed-by: Matt Turner <mattst88@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge: Remove deprecated --changelog option (bug 699256)Zac Medico2020-08-165-156/+3
| | | | | Bug: https://bugs.gentoo.org/699256 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* repoman/lib/repoman/scanner.py: Remove unneeded y_ebuild_continue varZac Medico2020-08-151-5/+0
| | | | | | | | Since commit 203bc84894d76f4e17e47b9373e84bebc217a246, this variable has triggered a continue statement which no longer bypassed any relevant code in the containing loop. Signed-off-by: Zac Medico <zmedico@gentoo.org>
* repoman/lib/repoman/scanner.py: Fix useless-returnZac Medico2020-08-151-7/+0
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Revert "repoman: deprecate netsurf.eclass."Michael Orlitzky2020-08-141-1/+0
| | | | | | | | | | | This reverts commit a73024729860f9224b8d1660d24c450080b67d9f. This eclass was successfully purged from the tree, so the deprecation is no longer needed. And eventually, to address an eblit infestation, another eclass with the same name will return. The new one will not be deprecated. Signed-off-by: Michael Orlitzky <mjo@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/xml/metadata.py: tolerate xml.parsers.expat import failures (bug ↵Zac Medico2020-08-121-1/+4
| | | | | | | | | | | | 736912) Tolerate broken or missing xml support in python. This reverts a behavior change from commit 935c47d972d986f1822850618442c19c97e300c3. Fixes: 935c47d972d9 ("lib/portage/xml/metadata.py: fix ungrouped-imports w/refactor") Bug: https://bugs.gentoo.org/736912 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* SpawnProcess: fix _cancel to cleanup PipeLogger quicklyZac Medico2020-08-091-6/+16
| | | | | | | | Cleanup PipeLogger as quickly as possible, in order to prevent access to unclosed logs. Bug: https://bugs.gentoo.org/711174 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-3.0.2 releaseportage-3.0.2Zac Medico2020-08-082-1/+11
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* cnf/repo.postsync.d/example: add egencache --update-pkg-desc-index (bug 735626)Zac Medico2020-08-081-1/+14
| | | | | | | | | Add an egencache --update-pkg-desc-index example for users of app-portage/esearch to migrate to. Bug: https://bugs.gentoo.org/735626 Reviewed-by: Brian Dolbec <dolsen@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sqlite: fork safety (bug 736334)Zac Medico2020-08-082-9/+38
| | | | | | | | | | Use a separate connection instance for each pid, since it is not safe to use a connection created in a parent process. See: https://www.sqlite.org/howtocorrupt.html Bug: https://bugs.gentoo.org/736334 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sqlite: add lazy connection initZac Medico2020-08-081-5/+24
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Add cached portage.getpid() functionZac Medico2020-08-082-0/+40
| | | | | | | Since getpid is a syscall, cache results, and update them via an after fork hook. Signed-off-by: Zac Medico <zmedico@gentoo.org>
* BuildLogger: fix _cancel to cleanup PipeLogger quicklyZac Medico2020-08-081-6/+17
| | | | | | | | Cleanup PipeLogger as quickly as possible, in order to prevent access to unclosed logs. Bug: https://bugs.gentoo.org/711174 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* treewalk: reset config for unmerge (bug 711174)Zac Medico2020-08-081-1/+3
| | | | | | | | | | | When cloning config instances for unmerge, call the reset method in order to ensure that there is no unintended leakage of variables which should not be shared. This fixes leakage of the PORTAGE_LOG_FILE variable, which triggered log corruption for FEATURES=compress-build-logs. Bug: https://bugs.gentoo.org/711174 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* BinpkgEnvExtractor: fix subprocess logfile usage (bug 711174)Zac Medico2020-08-081-1/+6
| | | | | | | | | | | Do not write to log file when in a MergeProcess subprocess, since stdout and stderr are already redirected to the log file by MergeProcess. This fixes log corruption when BinpkgEnvExtractor is use to extract environment.bz2 prior to pkg_prerm. Bug: https://bugs.gentoo.org/711174 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* EventLoopInForkTestCase: use AsyncFunctionZac Medico2020-08-071-18/+5
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/*: Fix useless-returnAaron Bauman2020-08-0710-17/+1
| | | | | | | * Python implies such things. Let's drop 'em and be consistent. Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* *: drop all import __future__ statementsAaron Bauman2020-08-0676-214/+76
| | | | | | | * We only support Py3 now. Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/*: exempt two core files from ungrouped-imports checkAaron Bauman2020-08-063-7/+10
| | | | | | | | * These will take some time to refactor/address if at all possible. * Turn on ungrouped-imports check for entire repo Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/xml/metadata.py: fix ungrouped-imports w/refactorAaron Bauman2020-08-061-21/+8
| | | | | | | | | | | | | | | * This drops the import for cElementTree as it is deprecated. See: https://docs.python.org/3/library/xml.etree.elementtree.html * Drop the error checking as these modules are a part of stdlib. * Additionally, the pyexpat issue was fixed in 3.2. See: https://bugs.python.org/issue14988 Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/*: Fix ungrouped-importsAaron Bauman2020-08-068-33/+39
| | | | | | | | | | | | * This fixes ungrouped imports for a portion of the repo. The remaining fixes will come in another batch of atomic commits as the imports are buried behind conditionals, are __futures__ that may be able to go away, etc * Per the above, check will not be enabled yet Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/*: fix superfluous-parens and enable checkAaron Bauman2020-08-0523-50/+51
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* pylintrc: enable multiple-imports checkAaron Bauman2020-08-051-0/+1
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* tabcheck.py: fix multiple-importsAaron Bauman2020-08-051-1/+2
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/dep/__init__.py: fix multiple-importsAaron Bauman2020-08-051-1/+3
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/tests/runTests.py: fix multiple-importsAaron Bauman2020-08-051-3/+4
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/elog/mod_mail.py: fix multiple-importsAaron Bauman2020-08-051-1/+3
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/elog/mod_custom.py: fix multiple-importsAaron Bauman2020-08-051-1/+3
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/repository/config.py: fix trailing-comma-tupleAaron Bauman2020-08-042-1/+2
| | | | | | | | | | | * This fixes the one instance of trailing-comma-tuple in the repo * A tuple does need created, but lets do so inside of parentheses as expected Suggested-By: Sam James <sam@gentoo.org> Suggested-By: Zac Medico <zmedico@gentoo.org> Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>