aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* save-ebuild-env.sh, special_env_vars.py: add https_proxySam James2023-08-191-1/+1
| | | | | | | | | For parity with http_proxy. Bug: https://bugs.gentoo.org/691434 Bug: https://bugs.gentoo.org/835927 Bug: https://bugs.gentoo.org/911629 Signed-off-by: Sam James <sam@gentoo.org>
* bin/save-ebuild-env.sh: refrain from using the compgen builtinKerin Millar2023-07-031-2/+6
| | | | | | | | | | | | | | | | | For the compgen builtin to be available requires that bash be compiled with --enable-readline. Rather than rely on compgen to generate a list of function names, parse their names out of declare -F instead. Specify -v for the following unset command, so that bash is coerced into unsetting only variables, as is intended. Expand the applicable variable names with "${!___@}". Owing to the constraints placed on identifiers, it's not particularly important that it be done this way, but I think it better expresses the intent. Signed-off-by: Kerin Millar <kfm@plushkava.net> Bug: https://bugs.gentoo.org/909148 Signed-off-by: Sam James <sam@gentoo.org>
* bin: Rename all _E_*DESTTREE_ variables to __E_*DESTTREEUlrich Müller2023-04-271-1/+1
| | | | | | The __* namespace is reserved for package manager use. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* emerge: respect NO_COLORSiddhanth Rathod2023-03-211-1/+1
| | | | | | | Bug: https://bugs.gentoo.org/898224 Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com> Closes: https://github.com/gentoo/portage/pull/1003 Signed-off-by: Sam James <sam@gentoo.org>
* bin: style tweaksSam James2022-08-011-4/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* *: use /usr/bin/env bash iso /bin/bashFabian Groffen2022-07-251-1/+1
| | | | | | | For Prefix systems it's better not to use host-provided bash (if it exists at all), and this is in line with python usage as well. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* Eliminate now-dead code from EAPIs 4-python and 5-progressMatt Turner2022-04-011-7/+0
| | | | Signed-off-by: Matt Turner <mattst88@gentoo.org>
* Use distinct colors for output msg typesMichał Górny2021-10-041-2/+4
| | | | | | | | Introduce distinct colors per output function. For elog and eerror the colors remain the same but the names change. For einfo and eqawarn, use darker colors to distinguish them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Prefix color vars with "PORTAGE_COLOR_"Michał Górny2021-10-041-7/+9
| | | | | | | | | | | | Rename color variables used by einfo etc. to use "PORTAGE_COLOR_" prefix. Currently these variables are prone to being accidentally ovewritten e.g. if an ebuild uses GOOD or BAD variables for some purpose. Using PORTAGE prefix should keep us safe. As an extra benefit, this makes it trivial to grep for all uses of color variables. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Add dostrip for EAPI 7Zac Medico2018-03-271-2/+2
| | | | | | | | | | | | | | This patch includes the essential parts of the dostrip implementation from portage-mgorny. All of the prepstrip code has moved to bin/estrip, without any changes except the addition of argument parsing for estrip --ignore, --queue, and --deque modes which are equivalent to the corresponding ecompressdir modes. Due to overlap, also ban the non-standard prepstrip and prepallstrip helpers in EAPI 7, with a die message suggesting to use 'dostrip' instead. Also ignore the non-standard STRIP_MASK variable for EAPI 7. Bug: https://bugs.gentoo.org/203891
* Ban DESTTREE/INSDESTTREE in EAPI 7Michał Górny2018-03-041-2/+2
| | | | | | | | | Ban the direct use of DESTTREE/INSDESTTREE in EAPI 7. Use new _E_* helper variables for into/insinto. Bug: https://bugs.gentoo.org/173630 Closes: https://github.com/gentoo/portage/pull/261 Series-Reviewed-by: Zac Medico <zmedico@gentoo.org>
* bin/save-ebuild-env.sh: remove redundand unset of DISTCC_*Zac Medico2017-01-121-1/+1
| | | | | | | These variables are unset earlier by this code: # CCACHE and DISTCC config unset ${!CCACHE_*} ${!DISTCC_*}
* ebuild: unset all funcs/vars that start with ___Mike Frysinger2015-11-121-1/+3
| | | | | | Since the __* (two) namespace is reserved, and ___* (three) has rarely (if ever) been used in ebuilds, we can nuke all funcs/vars that start with that. It makes clean up easier for us.
* ebuild: clear __bashpid & __start_distcc from envMike Frysinger2015-11-121-0/+1
| | | | These are internal funcs that should not be exported into the env.
* ebuild: set up bash compat levelsMike Frysinger2015-11-121-1/+1
| | | | | | | | To try and provide better stability across bash versions, set the language compat level based on the current EAPI. This does not ban newer features, it tells bash to use the older bash behavior when the behavior changes across versions.
* bin/save-ebuild-env.sh: remove bogus __1 function namesZac Medico2015-11-111-1/+1
| | | | | | | | | In commit 9b19ac5696c487dab58d7c10990fe07fd7f1f731, these bogus __1 values were inserted where unset_colors and set_colors used to be. The unset_colors and set_colors function have been renamed to have __ prefixes, and they are correctly unset further down. Fixes: 9b19ac5696c4 ("Convert funcs of isolated-functions.sh to __ prefixed namespace.")
* Support escaping network-sandbox through SOCKSv5 proxyMichał Górny2015-02-011-2/+3
| | | | | | | | | | | | | | | | | Add a minimal SOCKSv5-over-UNIX-socket proxy to Portage, and start it whenever ebuilds are started with network-sandbox enabled. Pass the socket address in PORTAGE_SOCKS5_PROXY and DISTCC_SOCKS_PROXY variables. The proxy can be used to escape the network sandbox whenever network access is really desired, e.g. in distcc. The proxy is based on asynchronous I/O using the asyncio module. Therefore, it requires the asyncio module that is built-in in Python 3.4 and available stand-alone for Python 3.3. Escaping the sandbox is not supported with older versions of Python. The proxy supports connecting to IPv6 & IPv4 TCP hosts. UDP and socket binding are not supported. SOCKSv5 authentication schemes are not supported (UNIX sockets provide a security layer).
* Remove __eqalog & __eqawarnlogMichał Górny2014-11-201-1/+1
| | | | Replaced by eqatag.
* Introduce eqatag to output proper machine-readable QA logsMichał Górny2014-11-201-1/+1
| | | | | | The eqatag command syntax conforms to pre-GLEP describing install-qa-check.d. The qa.log file format strictly conforms to YAML for easy machine parsing.
* Introduce eqalog and eqawarnlog functions.Michael Palimaka2014-10-271-0/+1
| | | | | | | | | | | | | | | | These functions are to be used for creating a log of QA violations in a machine-readable format. Stored in ${T]/qa.log, the log consists of one entry per line in the following format: violation-tag data For example: deprecated-directory /usr/man deprecated-directory /usr/info world-writable /var/db/foo/bar Signed-off-by: Zac Medico <zmedico@gentoo.org> Acked-by: Alexander Berntsen <bernalex@gentoo.org>
* package.bashrc: per profile, per-package bashrc mechanismBertrand SIMONNET2014-10-241-1/+1
| | | | | | Profiles can define per-package bashrc files to be sourced before emerging. Each line in package.bashrc must be an atom name then a list of space-delimited bashrc files (stored in $profile/bashrc/).
* Refactor bashrc scripts sourcingBertrand SIMONNET2014-10-241-0/+1
| | | | | Creates two new helper functions __try_source and __source_env_files to simplify __source_all_bashrcs.
* Re-apply "Rewrite default ebuild phase setting code" (bug 523182)"Michał Górny2014-09-251-1/+1
| | | | | | | | | Add empty default src_prepare() as required by PMS Add missing bind for pkg_nofetch. Spotted-by: Zac Medico <zmedico@gentoo.org> X-Gento-Bug: 523182 X-Gentoo-URL: https://bugs.gentoo.org/show_bug.cgi?id=523182 Merged 3 pathces by: Brian Dolbec <dolsen@gentoo.org>
* Revert "Rewrite default ebuild phase setting code" (bug 523182)Brian Dolbec2014-09-191-1/+1
| | | | | | This reverts commit 772ed29fd9e7cf722aed943adbe33a27f250e1ff. X-Gentoo-Bug: 523182 X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=523182
* Rewrite default ebuild phase setting codeMichał Górny2014-09-111-1/+1
| | | | | | | Replace the ebuild phase setting code for EAPI 2 and newer with a simpler approach; first set proper default_* functions, and call them within the phase. Disallow calling default_* for other phase functions than the one being run.
* Rename a private function.Arfrever Frehtes Taifersar Arahesis2014-02-051-2/+2
|
* docompress: add --limit support with newer EAPIsMike Frysinger2013-12-011-1/+2
| | | | | | | | | | We added support for not compressing files below a certain size (since the speed/size/etc... tradeoffs didn't make sense), but it was only for man pages and old EAPI's. Add the logic to the newer EAPIs and apply to all compressed paths. URL: http://bugs.gentoo.org/169260
* Make keepdir an external ebuild helper program.Ulrich Müller2013-08-221-1/+1
| | | | | This is required by PMS section 11.3.3.8 "Installation commands". Fixes bug #481762.
* Sanitize PYTHONPATH for helpers, bug #477764Zac Medico2013-07-221-1/+1
|
* __save_ebuild_env: filter __repo_keyZac Medico2013-07-211-1/+1
|
* EAPI="5-progress": Add package_manager_build_user() and ↵Arfrever Frehtes Taifersar Arahesis2012-11-161-0/+2
| | | | package_manager_build_group().
* EAPI="5-progress": Add master_repositories(), repository_path(),Arfrever Frehtes Taifersar Arahesis2012-10-141-3/+6
| | | | available_eclasses(), eclass_path() and license_path() functions.
* Add eapi.sh with ___eapi_*() functions and use these functions in other files.Arfrever Frehtes Taifersar Arahesis2012-09-261-4/+5
|
* doebuild: update environment.bz2 for pre/postinstv2.2.0_alpha129Zac Medico2012-09-171-1/+1
| | | | Also, remove unnecessary __dyn_preinst func.
* Use __ prefix for _hasg, _hasgq, and _unpack_tar.Zac Medico2012-09-141-2/+2
|
* save-ebuild-env: fix for __dyn* renamesZac Medico2012-09-141-4/+7
|
* Convert funcs of ebuild.sh to __ prefixed namespace.Brian Harring2012-09-141-3/+3
|
* Convert funcs of save-ebuild-env.sh to __ prefixed namespace.Brian Harring2012-09-141-3/+3
|
* Convert funcs of phase*.sh to __ prefixed namespace.Brian Harring2012-09-141-10/+11
|
* Convert funcs of isolated-functions.sh to __ prefixed namespace.Brian Harring2012-09-131-6/+6
|
* Convert funcs of bashrc-functions.sh to __ prefixed namespace.Brian Harring2012-09-131-1/+1
|
* drop dead functionsBrian Harring2012-09-131-3/+3
| | | | Specifically, esyslog, {un,}set_unless_changed, and remove_path_entry.
* Drop diefunc protection.Brian Harring2012-09-131-1/+1
| | | | | The last usage of it was added 67e88b82726a93eda^, 01/20/08; 4.5 years later, the compatibility measure is no longer needed.
* Deprecate EAPI 5_pre1.Zac Medico2012-09-131-5/+0
|
* save-ebuild-env: don't filter apply_user_patchesZac Medico2012-09-111-1/+5
| | | | Except for EAPI 5_pre1.
* Quote ${EAPI} more.Zac Medico2012-09-021-1/+1
| | | | | This will avoid a potential syntax error in save-ebuild-env.sh if a saved environment containing corrupt EAPI is sourced.
* Update years in header.Ulrich Müller2012-08-311-1/+1
|
* Fix usex for EAPI 4-python|4-slot-abi.Zac Medico2012-08-311-1/+1
|
* EAPI 5: usex helper functionUlrich Müller2012-08-311-0/+5
| | | | See bug #382963.
* EAPI 5: User patches (no-op dummy stub for now)Zac Medico2012-08-291-1/+3
| | | | | | | A real apply_user_patches implementation will be a bit more work, so for now we'll just implement the minimum amount necessary to satisfy the spec: http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=a8bf7862967cce36b7f1b408934a774126da2538