aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* portageq get_repos: fix <eroot> parameter (bug 670082)Bruce Schultz2018-11-181-0/+3
| | | | | | | | | | Use the @uses_configroot decorator to make portage get_repos respect the <eroot> parameter, like portage repos_config since commit 382f4be415394886026ccd5dcd08ca96ecda31fa. Apply the same fix to master_repositories and master_repos. Bug: https://bugs.gentoo.org/670082 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* portageq get_repo_path: fix <eroot> parameter (bug 670082)Bruce Schultz2018-11-021-0/+1
| | | | | | | | | Use the @uses_configroot decorator to make portage get_repo_path respect the <eroot> parameter, like portage repos_config since commit 382f4be415394886026ccd5dcd08ca96ecda31fa. Bug: https://bugs.gentoo.org/670082 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Rename pym→lib, for better distutils-r1 interoperabilityMichał Górny2018-07-181-1/+1
| | | | Closes: https://github.com/gentoo/portage/pull/343
* asyncio: explicitly close event loops (bug 654390)Zac Medico2018-05-061-1/+5
| | | | | | | The default asyncio event loop triggers a resource warning if it is not explicitly closed, therefore close it when appropriate. Bug: https://bugs.gentoo.org/654390
* portageq repos_config: fix <eroot> parameter (bug 648062)Zac Medico2018-03-261-1/+17
| | | | | | | | | | | | The <eroot> parameter is ineffective for commands that query configuration, since the PORTAGE_CONFIGROOT variable controls the location of configuration files. Therefore, for portageq repos_config, implicitly set PORTAGE_CONFIGROOT equal to the value of the <eroot> parameter. Note that this works correctly for both prefix and non-prefix systems, because both EROOT and PORTAGE_CONFIGROOT are supposed to include the EPREFIX offset. Bug: https://bugs.gentoo.org/648062
* Do not enable optimizations by default to work-around pycparser issueMichał Górny2017-09-021-1/+1
| | | | | | | | | | | | | | dev-python/pycparser-2.18+ exposes a design flaw in dev-python/ply that makes it unable to work with -OO code. Given that Gentoo compiles its Python packages with -OO and both -O and -OO use the same files for Python < 3.5, using -O in Portage implicitly means -OO for those implementations. Remove the optimizations from Portage shebangs to prevent triggering the issue until we find a proper solution for it. Bug: https://bugs.gentoo.org/628386 Reviewed-by: Zac Medico <zmedico@gentoo.org>
* portageq: allow disabling regex matching of maintainer emails #604164Göktürk Yüksek2016-12-311-0/+7
| | | | | | | | | | | | | | When the email address of a maintainer contains unescaped regex-special characters (such as '+'), the maintainer-email match may return undesirable results. Add a command line option '--no-regex' to use re.escape() with list comprehension on maintainer emails when constructing the matcher regex. This way, an exact string match can be made rather than a regex match. X-Gentoo-bug: 604164 X-Gentoo-bug-url: https://bugs.gentoo.org/604164
* Remove unneeded native_kwargs wrapperMichał Górny2016-05-311-1/+1
| | | | | | | | Remove the native_kwargs wrapper and all uses of it. As pointed out by Zac Medico, this was only needed for Python < 2.6.5, and we no longer support those versions for quite some time. Acked-by: Alexander Berntsen <bernalex@gentoo.org>
* portageq: Case-insensitive match maintainer emailsGöktürk Yüksek2016-04-221-2/+2
| | | | | | | Reported-by: NP-Hardass <NP-Hardass@gentoo.org> Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu> Signed-off-by: Alexander Berntsen <bernalex@gentoo.org> Reviewed-by: Alexander Berntsen <bernalex@gentoo.org>
* bin/portageq: remove the herd matcher per GLEP 67Göktürk Yüksek2016-03-061-18/+0
| | | | | | | Herds are obsolete per GLEP 67. Projects can be matched using the project's email address just like any other maintainer. Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu>
* bin/portageq: add 'match_orphaned' to the non_commands listGöktürk Yüksek2016-03-061-1/+1
| | | | | Reported-By: Coacher Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu>
* bin/portageq: add a matcher to match the orphaned (maintainer-needed) packagesGöktürk Yüksek2016-03-051-0/+13
| | | | | | | | | | Per GLEP 67, orphaned packages do not have a <maintainer> in metadata.xml. They can't be matched using '--maintainer-email=maintainer-needed@gentoo.org' anymore. Add a new command line argument '--orphaned' to match the orphaned packages. Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu> Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* Revert "portage.repository.config: Clean reading of repository (...) "Michał Górny2015-12-131-4/+0
| | | | | | This reverts commit 2cde1f65e9c585e78415857fdcac1fe5deaa60da. This was unreviewed and is a breaking change made without any discussion or announcement.
* portage.repository.config: Clean reading of repository names and drop ↵Arfrever Frehtes Taifersar Arahesis2015-12-081-0/+4
| | | | support for repositories with missing or invalid names.
* portageq envvar: Return 1 for any nonexistent variable.Arfrever Frehtes Taifersar Arahesis2015-11-251-3/+13
|
* _argparse: punt the moduleMike Frysinger2015-10-291-3/+3
| | | | | Since we don't support python 2.6 anymore, there's no need to wrap argparse, so switch all the users to the standard library for it.
* bin/portageq: Update the portdir, portdir_overlay and envvar deprecation ↵Brian Dolbec2015-05-091-5/+11
| | | | messages
* Update best_version() docstringsBrian Dolbec2015-04-211-1/+1
| | | | Original pull request by yaccz: https://github.com/gentoo/portage/pull/10 We ended up with a slightly different message.
* portageq pquery: Search ebuilds in all repositories be default.Arfrever Frehtes Taifersar Arahesis2014-12-151-12/+4
| | | | | | --all-repos option is no longer supported. 1 call to deprecated portage.repository.config.RepoConfigLoader.mainRepo() function has been deleted.
* FEATURES=case-insensitive-fs for bug #524236Zac Medico2014-11-171-3/+4
| | | | | | | | | | | | | When case-insensitive-fs is enabled in FEATURES, the dblink.isowner method, _owners_db class, and ConfigProtect class will be case-insensitive. This causes the collision-protect and unmerge code to behave correctly for a case-insensitive file system. If the file system is case-insensitive but case-preserving, then case is preserved in the CONTENTS data of installed packages. X-Gentoo-Bug: 524236 X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=524236 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* unprivileged mode: fix cross-prefix supportZac Medico2014-11-171-3/+1
| | | | | | | | | | | | In commit 1364fcd89384c9f60e6d72d7057dc00d8caba175, EROOT calculation in portage.data did not account for cross-prefix support. This is fixed by using new _target_root and _target_eprefix functions to perform the calculation. The _target_eprefix function is also useful in portageq, where the target EPREFIX needs to be known before portage.settings is instantiated. Fixes 1364fcd89384 ("Support unprivileged mode for bug #433453.") Acked-by: Brian Dolbec <dolsen@gentoo.org>
* portageq: fix eroot parameter (bug #529200)Zac Medico2014-11-141-1/+8
| | | | | | | | | | | | | The portageq eroot parameter has been broken since commit c9f6aa9f0151adb3c86706eaef1914cdbdcf2b6d, due to premature instantiation of portage.settings (before the ROOT variable was set). Premature access to the portage.settings attribute must be avoided by using other available means to determine the EPREFIX. Fixes: c9f6aa9f0151 ("Add cross-prefix support") X-Gentoo-Bug: 529200 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=529200 Acked-by: Alexander Berntsen <bernalex@gentoo.org>
* portageq: Migrate docstrings to a dictionaryBrian Dolbec2014-09-191-126/+199
| | | | | Due to python optimizations, __doc__ are removed. Reviewed by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
* Update sys.path in scripts only when using not installed instance of Portage.Arfrever Frehtes Taifersar Arahesis2014-09-201-9/+13
| | | | | Modules of installed instance of Portage are now placed in standard location, which is included in default sys.path.
* Use -b instead of -bb.Arfrever Frehtes Taifersar Arahesis2014-01-231-1/+1
| | | | (-bb can trigger errors, depending on Python version and environment.)
* Enable BytesWarnings.Arfrever Frehtes Taifersar Arahesis2014-01-181-2/+2
|
* portageq: Print deprecation warnings for deprecated commands.Arfrever Frehtes Taifersar Arahesis2013-12-021-0/+6
|
* fix random pylint errorsMike Frysinger2013-11-291-25/+23
| | | | Shouldn't be any functional changes here.
* portageq envvar: shell escape variable (bug 492314)Sebastian Luther2013-11-261-1/+1
|
* Bug #485056: Fix portageq with Python <2.6.5.Arfrever Frehtes Taifersar Arahesis2013-09-161-1/+1
|
* portageq: portage.util._argparseZac Medico2013-08-021-50/+96
|
* portageq: add aliases for bug #476830Zac Medico2013-07-211-0/+13
|
* portageq: Delete incorrect usage of uses_eroot decorator for pquery.Arfrever Frehtes Taifersar Arahesis2013-07-141-1/+0
|
* portageq: Use uses_eroot decorator.Arfrever Frehtes Taifersar Arahesis2013-07-141-23/+33
|
* portageq repositories_configuration: Require EROOT argument.Arfrever Frehtes Taifersar Arahesis2013-07-141-2/+6
|
* portageq: Support repositories_configuration command.Arfrever Frehtes Taifersar Arahesis2013-07-141-0/+8
|
* portageq: avoid portdbapi instantiationZac Medico2013-07-131-6/+6
| | | | | The portdbapi takes time to instantiate, and for some commands we really only need the RepoConfig instance.
* Decode sys.argv with surrogateescape for Python 3Zac Medico2013-06-201-2/+1
| | | | | | With Python 3, the surrogateescape encoding error handler makes it possible to access the original argv bytes, which can be useful if their actual encoding does no match the filesystem encoding.
* Add cross-prefix supportRuud Koolen2013-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch series adds support for using a portage installed in one prefix to build packages with a different prefix. The current portage has a single EPREFIX variable specifying both the prefix of the portage installation, and the prefix of the packages portage is building. This patch series splits it into two parts: the portage.const.EPREFIX variable specifying the prefix of the portage installation, used for constructing the PATH as well as the paths to files belonging to a portage installation itself rather than a target root; and the EPREFIX setting in config instances, specifying the prefix of the to-be-built packages and being used for almost everything else. The EPREFIX config setting defaults to const.EPREFIX, but can be overridden by the EPREFIX environment variable, as well as the emerge --prefix option. This allows one to install systems with different prefixes using `EPREFIX=/foo emerge @system`, though some unrelated changes need to happen elsewhere first in order to make that a reality. Ruud Koolen (3): Distinguish between portage prefix and package prefix Based GLOBAL_CONFIG_PATH and DEPCACHE_PATH on portage prefix Pick up EPREFIX environment variable
* portageq: fix envvar -v, bug #462412v2.2.0_alpha168Zac Medico2013-03-191-0/+8
|
* portageq: optimize pquery --no-versionZac Medico2013-03-181-3/+11
|
* portageq: fix visiblity filter with no atomsZac Medico2013-03-181-11/+26
|
* portageq: add pquery to global command listZac Medico2013-03-181-67/+76
|
* portageq: optimize cat/name expansion for pqueryZac Medico2013-03-181-7/+17
|
* portageq: visiblity filter for pquery modeZac Medico2013-03-181-2/+25
|
* portageq: support atoms for pquery modeZac Medico2013-03-171-12/+77
|
* portageq: emulate subset of Pkgcore's pqueryZac Medico2013-03-171-11/+145
| | | | | | | | | | | | | | | | | Pkgcore pquery compatible options: Repository matching options: --repo=REPO repo to use (default is PORTDIR if omitted) --all-repos search all repos Package matching options: --herd=HERD exact match on a herd --maintainer-email=MAINTAINER_EMAIL comma-separated list of maintainer email regexes to search for Output formatting: -n, --no-version collapse multiple matching versions together
* portageq: remove unused importsZac Medico2013-03-171-2/+0
|
* portageq: fix 'Unicode equal comparison failed'Zac Medico2013-02-171-19/+19
|
* Use unicode_literals more.Zac Medico2013-01-181-7/+3
| | | | | This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.