[gentoo-dev] last-rites: app-emulation/virtinst
# Matthias Maier tam...@gentoo.org (4 Nov 2014) # Masked for removal in 30 days. The package has multiple open bugs # (bug #482472, bug #501818, bug #528190) and is superseded by # app-emulation/virt-manager[-gtk] app-emulation/virtinst
Re: [gentoo-dev] terminal spreadsheet - sc fork
On 03/11/14 20:24, Andrés Martinelli wrote: Yes, Vim license was the base of it, as I noticed, at least by now, that it meets the requirements I thought necessary. About that mistake, thanks for noticing it. It will be corrected. Just: - change the name, it conflicts with another package. - use AGPLv3 + as many exceptions as you like if you want something special, who doesn't agree with them has to stay with the vanilla agpl3 with all its forced freedom. - I'd advise to stay with LGPL though. (it is actually GPL3+exceptions as well) I hope it helps. lu
Re: [gentoo-dev] terminal spreadsheet - sc fork
On Tue, 04 Nov 2014, Luca Barbato wrote: - use AGPLv3 + as many exceptions as you like if you want something special, who doesn't agree with them has to stay with the vanilla agpl3 with all its forced freedom. I disagree. AGPL-3 only makes sense for programs that directly interact with users via a web server or similar. Using it for other packages can lead to awkward situations. (If you want an example, we're currently bitten by Oracle's inappropriate use of AGPL-3 for sys-libs/db:6.0 [1].) Ulrich [1] https://bugs.gentoo.org/show_bug.cgi?id=525110 pgpvrE83Fdcn0.pgp Description: PGP signature
[gentoo-dev] Packages up for grabs
Due kingtaco lack of time this package is now up for grab: net-misc/rwhoisd
Re: [gentoo-dev] RFC: Deprecating and killing the concept of herds
On Tue, 9 Sep 2014 21:45:49 +0200 Michał Górny mgo...@gentoo.org wrote: Let's keep it short: I think herds don't serve any special purpose nowadays. Their existence is mostly resulting in lack of consistency and inconveniences. Resurrecting this thread per the last council decision: The council is in favor of retiring herds, allowing non-maintainer aliases to exist, and having a way to distinguish between individuals, projects, and non-maintainer aliases in metadata.xml. The details of how to implement this will be worked out in the lists before the next meeting. Whether this gets worked out before the next meeting remains to be seen. However, the council is certainly interested in proposals and discussion. So, herds are going to go away. That leaves maintainers (who can be projects), and aliases (who are NOT maintainers, but can be listed in addition to maintainers). My proposal: For the steady state: 1. For the maintainer tag in metadata, have a type attribute that can be developer, project, or proxy. 2. Add a contacts tag in metadata that takes an email. 3. Package without maintainers (individuals or projects - regardless of presence of aliases) get assigned to maintainer-needed and get treecleaned as usual. I'm also fine with normalizing this and just switching to a contact tag that can have a type of developer, project, proxy, or contact. That is a bigger change. However, it would probably simplify scripting and be a bit cleaner for the long-term. For the transition to the steady state: a. We generate a list of all current herds and email their aliases to see if they want to be converted to a non-maintainer alias, or be disbanded entirely. One reply to the email is enough to keep the alias around, no replies means retirement. b. Anybody in Gentoo can start a project already by following GLEP 39. It is encouraged for these projects to take over existing aliases where they feel it is appropriate. There is no need for all aliases to have a project - just ones that want some kind of structure (ie this is strictly voluntary). When this is done the project will remove the herd from metadata and add the project alias as a maintainer with the agreed-upon tagging. c. We generate a list of all current packages that do not have a maintainer (either one or more individuals or projects (NOT herds)). That gets posted so that individuals can claim them. I suggest not doing the usual treecleaning email since there could be a LOT of them. Or we could do it herd-by-herd over time to ease the load. d. We remove all herds from the existing packages. Where aliases were kept in (a) above they are converted to aliases with appropriate tagging. If no maintainer exists the package is handled per the result of (c). Comments, alternatives, etc? -- Rich
[gentoo-dev] Re: terminal spreadsheet - sc fork
Ulrich Mueller posted on Tue, 04 Nov 2014 12:51:54 +0100 as excerpted: On Tue, 04 Nov 2014, Luca Barbato wrote: - use AGPLv3 + as many exceptions as you like if you want something special, who doesn't agree with them has to stay with the vanilla agpl3 with all its forced freedom. I disagree. AGPL-3 only makes sense for programs that directly interact with users via a web server or similar. Using it for other packages can lead to awkward situations. (If you want an example, we're currently bitten by Oracle's inappropriate use of AGPL-3 for sys-libs/db:6.0 [1].) Ulrich [1] https://bugs.gentoo.org/show_bug.cgi?id=525110 I think that was the intention. The suggestion was that if you want a lot of otherwise custom restrictions, to avoid license proliferation start with something like the AGPLv3+ that's recognized as a standard free license but ends up being impractical for many, and then add further liberating exceptions as you like. Because the AGPLv3 is a recognized standard free license even if restricted for many in practice, and the exceptions only add additional freedoms, anyone who doesn't like them or doesn't want to legally review them can take the already well reviewed AGPLv3 only, while the exceptions do reduce the normal restrictions of the AGPLv3 in certain additional areas, for those who want/need them. Because the AGPLv3 is already both lawyer reviewed and accepted as a standard free license, that'll solve several issues at once, being unlikely to have the loopholes or internal conflicts that layman-created licenses without sufficient lawyer review often have, being accepted as a standard free license, allowing distros to do their distro thing without too much additional hassle because it's a license they're familiar with, etc. But at the same time it's restrictive enough that it tends to prevent a lot of code sharing, like the custom license alternative it replaces, and a license exception can be fashioned to encourage distribution of patches as separate tarballs, etc, as necessary. Assuming there's a proprietary license available for those wishing to purchase it and be freed of the restrictions otherwise imposed by the AGPLv3, the choice of AGPLv3 for those not choosing to purchase the proprietary license may be seen as appropriate indeed. And given Oracle's history of deliberate choice of incompatible licenses in other areas I strongly suspect the inappropriate choice of the AGPLv3 in this area was deliberate obstructionism as well. IOW, given Oracle's goals, they very likely see the AGPLv3 as an /entirely/ appropriate choice for this product, as evidenced by their active enforcement activities. Who care's about the unpaid user? Certainly Oracle doesn't seem too much concerned about inconveniencing them. They're unpaid and thus generate no revenue, after all! -- Duncan - List replies preferred. No HTML msgs. Every nonfree program has a lord, a master -- and if you use the program, he is your master. Richard Stallman
[gentoo-dev] fixed my virt-manager issue; libvirt-python-9999.ebuild
Hey, didn't feel like figuring out what was wrong with old packages (they're broken) and since I use libvirt- remotely on my hypervisor anyways locally makes sense to use virt-manager- as well. It stopped working recently with the libvirt-python package that's available so I made a - one: https://github.com/paigeadele/netcrave/blob/master/dev-python/libvirt-python/libvirt-python-.ebuild everything works fine now. Hope that helps, -Paige
[gentoo-dev] Implicit system dependency
When I was taking my ebuild quizzes, I asked for someone to clarify the implicit system dependency that we have enshrined in the devmanual: https://bugs.gentoo.org/show_bug.cgi?id=485356 There is... some agreement, but also special cases and special-special cases that are folklore-only at this point. To me it seems like a fine thing to ask the council to sort out, so I'm asking here for discussion. Can we come up with an idiot-proof list (or FLOWCHART, even!) of what should and should not be excluded from *DEPEND?
Re: [gentoo-dev] Implicit system dependency
On 11/04/2014 08:16 PM, Michael Orlitzky wrote: When I was taking my ebuild quizzes, I asked for someone to clarify the implicit system dependency that we have enshrined in the devmanual: https://bugs.gentoo.org/show_bug.cgi?id=485356 There is... some agreement, but also special cases and special-special cases that are folklore-only at this point. To me it seems like a fine thing to ask the council to sort out, so I'm asking here for discussion. Can we come up with an idiot-proof list (or FLOWCHART, even!) of what should and should not be excluded from *DEPEND? In my opinion, it's safe to ignore deps on glibc and gcc at this time, I personally don't ignore any other deps. On of my long term goals is to remove as much as humanly possible from the system set and replace it with the packages.default concept. I can't say we are far enough to actually do this yet, but that's why it's a long term goal. https://bugs.gentoo.org/show_bug.cgi?id=393445 -Zero signature.asc Description: OpenPGP digital signature
[gentoo-portage-dev] [PATCH 1/5 v2] Add egencache --update-pkg-desc-index action.
This adds an egencache --update-pkg-desc-index action which generates a plain-text index of package names, versions, and descriptions. The index can then be used to optimize emerge --search / --searchdesc actions. X-Gentoo-Bug: 525718 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525718 --- This updated patch optimizes pkg_desc_index_line_read to skip package name and version validation. This fixes a performance problem reported by Brian Dolbec. bin/egencache | 38 ++-- man/egencache.1 | 4 +++ man/portage.5 | 12 +++ pym/portage/cache/index/__init__.py | 2 ++ pym/portage/cache/index/pkg_desc_index.py | 59 +++ 5 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 pym/portage/cache/index/__init__.py create mode 100644 pym/portage/cache/index/pkg_desc_index.py diff --git a/bin/egencache b/bin/egencache index e366058..f97432f 100755 --- a/bin/egencache +++ b/bin/egencache @@ -48,6 +48,7 @@ portage._internal_caller = True from portage import os, _encodings, _unicode_encode, _unicode_decode from _emerge.MetadataRegen import MetadataRegen from portage.cache.cache_errors import CacheError, StatCollision +from portage.cache.index.pkg_desc_index import pkg_desc_index_line_format from portage.const import TIMESTAMP_FORMAT from portage.manifest import guessManifestFileType from portage.package.ebuild._parallel_manifest.ManifestScheduler import ManifestScheduler @@ -57,7 +58,7 @@ from portage.util._async.run_main_scheduler import run_main_scheduler from portage.util._eventloop.global_event_loop import global_event_loop from portage import cpv_getkey from portage.dep import Atom, isjustname -from portage.versions import pkgsplit, vercmp +from portage.versions import pkgsplit, vercmp, _pkg_str try: from xml.etree import ElementTree @@ -91,6 +92,9 @@ def parse_args(args): actions.add_argument(--update-changelogs, action=store_true, help=update the ChangeLog files from SCM logs) + actions.add_argument(--update-pkg-desc-index, + action=store_true, + help=update package description index) actions.add_argument(--update-manifests, action=store_true, help=update manifests) @@ -451,6 +455,29 @@ class GenCache(object): if hasattr(trg_cache, '_prune_empty_dirs'): trg_cache._prune_empty_dirs() +class GenPkgDescIndex(object): + def __init__(self, portdb, output_file): + self.returncode = os.EX_OK + self._portdb = portdb + self._output_file = output_file + + def run(self): + + portage.util.ensure_dirs(os.path.dirname(self._output_file)) + f = portage.util.atomic_ofstream(self._output_file, + encoding=_encodings[repo.content]) + + portdb = self._portdb + for cp in portdb.cp_all(): + pkgs = portdb.cp_list(cp) + if not pkgs: + continue + desc, = portdb.aux_get(pkgs[-1], [DESCRIPTION]) + + f.write(pkg_desc_index_line_format(cp, pkgs, desc)) + + f.close() + class GenUseLocalDesc(object): def __init__(self, portdb, output=None, preserve_comments=False): @@ -893,7 +920,8 @@ def egencache_main(args): local_config=False, env=env) if not (options.update or options.update_use_local_desc or - options.update_changelogs or options.update_manifests): + options.update_changelogs or options.update_manifests or + options.update_pkg_desc_index): parser.error('No action specified') return 1 @@ -1057,6 +1085,12 @@ def egencache_main(args): else: ret.append(scheduler.returncode) + if options.update_pkg_desc_index: + gen_index = GenPkgDescIndex(portdb, os.path.join( + repo_config.location, metadata, pkg_desc_index)) + gen_index.run() + ret.append(gen_index.returncode) + if options.update_use_local_desc: gen_desc = GenUseLocalDesc(portdb, output=options.uld_output, diff --git a/man/egencache.1 b/man/egencache.1 index f71feb3..3a3197f 100644 --- a/man/egencache.1 +++ b/man/egencache.1 @@ -19,6 +19,10 @@ for the details on package atom syntax. .BR \-\-update\-changelogs Update the ChangeLog files from SCM logs (supported only in git repos). .TP +.BR \-\-update\-pkg\-desc\-index +Update the package description index which is located at +\fImetadata/pkg_desc_index\fR in the repository. +.TP .BR \-\-update\-use\-local\-desc Update
[gentoo-portage-dev] Re: [PATCH 5/5 v3] Add emerge --search-index option.
On 11/03/2014 09:42 PM, Zac Medico wrote: This updated patch causes indexed search to be enabled only for searchdesc, since indexed variants can actually be slower when only package names need to be searched. With the recent pkg_desc_index_line_read optimization (removal of package name and version validation), performance is better if we use the index for emerge --search too. Therefore, revert back to the previous version of this patch. -- Thanks, Zac
Re: [gentoo-portage-dev]
On 11/03/2014 01:42 PM, Brian Dolbec wrote: I know the above times are probably slowed by not having overlays indexed, but it is still a significant speedup. esearch is only marginally slower doing a -S search than a regular pkg-name search, typically just over 0.2 seconds The above was done with only the gentoo repo indexed, plus I need to clean out some old ebuilds in overlays. But I was shocked to see the normal -s searches going from 3.4s to 5.5s with your new index. If you update now, performance should be much better. Specifically: 1) pkg_desc_index_line_read has been optimized to skip validation (biggest performance problem). 2) IndexedPortdb has been optimized to use a single portdbapi.cp_all call that covers all of the unindexed repositories. Also I did not see a way to specify all repos to be index updated. It is I believe a requirement of this new system. Re-running is for each repo installed individually is something to be reserved for the new postsync() to do when it lands in master. Yeah, I guess we may as well wait for the plugin-sync branch to get merged first. -- Thanks, Zac
[gentoo-portage-dev] [PATCH 3/5 v3] Add IndexedPortdb class.
The IndexedPortdb class uses pkg_desc_index to optimize searchs for package names and descriptions. If the package description index is missing from a particular repository, then all metadata for that repository is obtained using the normal pordbapi.aux_get method. This class only implements a subset of portdbapi functionality that is useful for searching pkg_desc_index incrementally. For this reason, the cp_all method returns an ordered iterator instead of a list, so that search results can be displayed incrementally. X-Gentoo-Bug: 525718 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525718 --- This updated patch optimizes IndexedPortdb to avoid unnecessary cp_list calls for repositories that are not indexed. Now IndexedPortdb performs almost as well as the regular portdbapi for the case where no repositories are indexed. pym/portage/dbapi/IndexedPortdb.py | 165 + 1 file changed, 165 insertions(+) create mode 100644 pym/portage/dbapi/IndexedPortdb.py diff --git a/pym/portage/dbapi/IndexedPortdb.py b/pym/portage/dbapi/IndexedPortdb.py new file mode 100644 index 000..fc431a2 --- /dev/null +++ b/pym/portage/dbapi/IndexedPortdb.py @@ -0,0 +1,165 @@ +# Copyright 2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +import errno +import io +import functools +import operator +import os + +import portage +from portage import _encodings +from portage.dep import Atom +from portage.exception import FileNotFound +from portage.cache.index.IndexStreamIterator import IndexStreamIterator +from portage.cache.index.pkg_desc_index import \ + pkg_desc_index_line_read, pkg_desc_index_node +from portage.util.iterators.MultiIterGroupBy import MultiIterGroupBy +from portage.versions import _pkg_str + +class IndexedPortdb(object): + + A portdbapi interface that uses a package description index to + improve performance. If the description index is missing for a + particular repository, then all metadata for that repository is + obtained using the normal pordbapi.aux_get method. + + For performance reasons, the match method only supports package + name and version constraints. For the same reason, the xmatch + method is not implemented. + + + _copy_attrs = ('cpv_exists', 'findname', 'getFetchMap', + '_aux_cache_keys', '_cpv_sort_ascending', + '_have_root_eclass_dir') + + def __init__(self, portdb): + + self._portdb = portdb + + for k in self._copy_attrs: + setattr(self, k, getattr(portdb, k)) + + self._desc_cache = None + self._cp_map = None + self._unindexed_cp_map = None + + def _init_index(self): + + cp_map = {} + desc_cache = {} + self._desc_cache = desc_cache + self._cp_map = cp_map + index_missing = [] + + streams = [] + for repo_path in self._portdb.porttrees: + outside_repo = os.path.join(self._portdb.depcachedir, + repo_path.lstrip(os.sep)) + filenames = [] + for parent_dir in (repo_path, outside_repo): + filenames.append(os.path.join(parent_dir, + metadata, pkg_desc_index)) + + repo_name = self._portdb.getRepositoryName(repo_path) + + try: + f = None + for filename in filenames: + try: + f = io.open(filename, + encoding=_encodings[repo.content]) + except IOError as e: + if e.errno not in (errno.ENOENT, errno.ESTALE): + raise + else: + break + + if f is None: + raise FileNotFound(filename) + + streams.append(iter(IndexStreamIterator(f, + functools.partial(pkg_desc_index_line_read, + repo = repo_name + except FileNotFound: + index_missing.append(repo_path) + + if index_missing: + self._unindexed_cp_map = {} + + class _NonIndexedStream(object): + def __iter__(self_): + for cp in self._portdb.cp_all( + trees =
[gentoo-portage-dev] [PATCH 5/5 v4] Add emerge --search-index option.
The new emerge --search-index option, which is enabled by default, causes pkg_desc_index to be used for search optimization. The search index needs to be regenerated by egencache after changes are made to a repository (see the --update-pkg-desc-index action). For users that would like to modify ebuilds in a repository without running egencache afterwards, emerge --search-index=n can be used to get non-indexed search. Alternatively, the user could simply remove the stale index file, in order to disable the search index for a particular repository. In order to conserve memory, indices are read as streams, and MultiIterGroupBy is used to group results from IndexedPortdb and IndexedVardb. Stream-oriented search also makes it possible to display search results incrementally (fixing bug #412471). X-Gentoo-Bug: 525718 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525718 --- This updates patch optimizes search._iter_search and search.output to use fewer search._xmatch calls. With this optimization, performance with IndexedPortdb is nearly indistinguishable from regular portdbapi for the case where no repositories are indexed. man/emerge.1| 8 +++ pym/_emerge/actions.py | 3 +- pym/_emerge/depgraph.py | 2 +- pym/_emerge/main.py | 5 ++ pym/_emerge/search.py | 137 ++-- 5 files changed, 103 insertions(+), 52 deletions(-) diff --git a/man/emerge.1 b/man/emerge.1 index bbe71ac..7bcdd9a 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -796,6 +796,14 @@ If ebuilds using EAPIs which \fIdo not\fR support \fBHDEPEND\fR are built in the same \fBemerge\fR run as those using EAPIs which \fIdo\fR support \fBHDEPEND\fR, this option affects only the former. .TP +.BR \-\-search\-index y | n +Enable or disable indexed search for search actions. This option is +enabled by default. The search index needs to be regenerated by +\fBegencache\fR(1) after changes are made to a repository (see the +\fB\-\-update\-pkg\-desc\-index\fR action). This setting can be added +to \fBEMERGE_DEFAULT_OPTS\fR (see \fBmake.conf\fR(5)) and later +overridden via the command line. +.TP .BR \-\-select [ y | n ] (\-w short option) Add specified packages to the world set (inverse of \fB\-\-oneshot\fR). This is useful if you want to diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 48b0826..8a22ab5 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2015,7 +2015,8 @@ def action_search(root_config, myopts, myfiles, spinner): searchinstance = search(root_config, spinner, --searchdesc in myopts, --quiet not in myopts, --usepkg in myopts, - --usepkgonly in myopts) + --usepkgonly in myopts, + search_index = myopts.get(--search-index, y) != n) for mysearch in myfiles: try: searchinstance.execute(mysearch) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 94eaed8..da408ad 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -8656,7 +8656,7 @@ def ambiguous_package_name(arg, atoms, root_config, spinner, myopts): s = search(root_config, spinner, --searchdesc in myopts, --quiet not in myopts, --usepkg in myopts, - --usepkgonly in myopts) + --usepkgonly in myopts, search_index = False) null_cp = portage.dep_getkey(insert_category_into_atom( arg, null)) cat, atom_pn = portage.catsplit(null_cp) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index cf7966c..c08e12a 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -616,6 +616,11 @@ def parse_opts(tmpcmdline, silent=False): choices :(True, rdeps) }, + --search-index: { + help: Enable or disable indexed search (enabled by default), + choices: y_or_n + }, + --select: { shortopt : -w, help: add specified packages to the world set + \ diff --git a/pym/_emerge/search.py b/pym/_emerge/search.py index 4b0fd9f..1916afe 100644 --- a/pym/_emerge/search.py +++ b/pym/_emerge/search.py @@ -7,9 +7,12 @@ import re import portage from portage import os from portage.dbapi.porttree import _parse_uri_map +from portage.dbapi.IndexedPortdb import IndexedPortdb +from portage.dbapi.IndexedVardb import IndexedVardb from portage.localization import localized_size from portage.output import bold, bold as white, darkgreen, green, red from portage.util import writemsg_stdout +from portage.util.iterators.MultiIterGroupBy import MultiIterGroupBy from _emerge.Package import Package @@ -25,15 +28,17 @@ class search(object): # public interface # def __init__(self,
[gentoo-portage-dev] [PATCH] doebuild: fix bug #528272
The doebuild function has a boolean unpacked variable which it sets to True if it determines that the unpack phase has already executed and the last modification times of the distfiles are older than the last modification time of WORKDIR. The code which sets the unpacked flag does not need to run unless the current phase is supposed to have a build directory. Therefore, disable this code for all phases that are not supposed to have a build directory. This fixes incorrect behavior of the fetch phase as reported in bug #528272. X-Gentoo-Bug: 528272 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528272 --- pym/portage/package/ebuild/doebuild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 544d193..6df3c69 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -829,7 +829,8 @@ def doebuild(myebuild, mydo, _unused=DeprecationWarning, settings=None, debug=0, alist = set(mysettings.configdict[pkg].get(A, ).split()) unpacked = False - if tree != porttree: + if tree != porttree or \ + mydo in _doebuild_commands_without_builddir: pass elif unpack not in phases_to_run: unpacked = os.path.exists(os.path.join( -- 2.0.4
[gentoo-portage-dev] [PATCH] ebuild.sh: force fresh env for pkg_setup (528274)
In ebuild.sh, $T/environment is loaded for most phases, but it should always start with a fresh environment for pkg_setup. Therefore, skip environment loading for pkg_setup. X-Gentoo-Bug: 528274 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528274 --- bin/ebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 658884a..1cd029e 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -501,7 +501,7 @@ fi export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)} trap 'exit 1' SIGTERM -if ! has $EBUILD_PHASE clean cleanrm depend \ +if ! has $EBUILD_PHASE clean cleanrm depend setup \ [ -f ${T}/environment ] ; then # The environment may have been extracted from environment.bz2 or # may have come from another version of ebuild.sh or something. -- 2.0.4
[gentoo-portage-dev] [PATCH v2] ebuild.sh: force fresh env for pkg_setup (528274)
In ebuild.sh, $T/environment is loaded for most phases, but it should always start with a fresh environment for pkg_setup. Therefore, skip environment loading for pkg_setup. This also requires a change in the config.environ method, in order to ensure that the calling environment is inherited by pkg_setup (even though $T/environment may exist). X-Gentoo-Bug: 528274 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=528274 --- This updated patch adds the config.environ fix. bin/ebuild.sh| 2 +- pym/portage/package/ebuild/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 658884a..1cd029e 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -501,7 +501,7 @@ fi export EBUILD_MASTER_PID=${BASHPID:-$(__bashpid)} trap 'exit 1' SIGTERM -if ! has $EBUILD_PHASE clean cleanrm depend \ +if ! has $EBUILD_PHASE clean cleanrm depend setup \ [ -f ${T}/environment ] ; then # The environment may have been extracted from environment.bz2 or # may have come from another version of ebuild.sh or something. diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 2ceb122..5b706f2 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -2655,7 +2655,7 @@ class config(object): phase = self.get('EBUILD_PHASE') filter_calling_env = False if self.mycpv is not None and \ - phase not in ('clean', 'cleanrm', 'depend', 'fetch'): + phase not in ('clean', 'cleanrm', 'depend', 'fetch', 'setup'): temp_dir = self.get('T') if temp_dir is not None and \ os.path.exists(os.path.join(temp_dir, 'environment')): -- 2.0.4