aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bin/emaint: Use __main__ for spawn compatZac Medico2023-10-231-11/+16
| | | | | | | | | If the event loop is closed outside of __main__ then it closes the event loop in child processes for the multiprocessing spawn start method. Bug: https://bugs.gentoo.org/916142 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* */*: rerun black w/ 23.1.0Sam James2023-02-031-0/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Rework signal handling in entry scriptsMike Gilbert2022-12-311-33/+53
| | | | | | | | | | | | | | | | | | Introduce a new exception SignalInterrupt which inherits from KeyboardInterrupt and adds a 'signum' member. When a signal is received, raise SignalInterrupt. At the end of the script, catch KeyboardInterrupt, and look for the signum member. Reset the signal handler to SIG_DFL, and re-raise the signal to kill the process. This ensures that the invoking shell sees that we got killed by a signal instead of calling exit. Bug: https://bugs.gentoo.org/887817 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/portage/pull/965 Signed-off-by: Sam James <sam@gentoo.org>
* pyupgrade everythingJohn Helmert III2022-12-031-1/+1
| | | | | Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Drop -b from shebangsJohn Helmert III2022-03-091-1/+1
| | | | | | | | | | The switch to using '/usr/bin/env python' shebangs doesn't naively work with arguments after 'python', so the shebangs were broken. '-b' is of dubious necessity anyway, so let's just drop it. Fixes: 41f4f6d25019c4f944b8d9576d96482f92231fda Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Blacken previously missed Python filesJohn Helmert III2022-02-211-18/+25
| | | | | Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Use '/usr/bin/env python' shebangsJohn Helmert III2022-02-211-1/+1
| | | | | Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* *: drop all import __future__ statementsAaron Bauman2020-08-061-3/+1
| | | | | | | * We only support Py3 now. Signed-off-by: Aaron Bauman <bman@gentoo.org> 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-0/+3
| | | | | | | 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
* 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>
* Update sys.path in scripts only when using not installed instance of Portage.Arfrever Frehtes Taifersar Arahesis2014-09-201-2/+2
| | | | | 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
|
* fix random pylint errorsMike Frysinger2013-11-291-2/+2
| | | | Shouldn't be any functional changes here.
* emaint: Clean and standardize package docstrings and module descriptionsW. Trevor King2013-03-091-2/+1
|
* Remove stray quotes in emaint docstrings.Zac Medico2013-03-091-1/+1
|
* Add portage._internal_caller var, and use it.Zac Medico2013-01-031-1/+2
|
* Unconditionally insert our pym dir in sys.path.Zac Medico2012-09-021-7/+4
| | | | | This is especially necessary when running in prefix mode, since sys.path may contain the path for a different version of portage.
* emaint: split into separate modulesBrian Dolbec2012-07-221-631/+28
|
* Propagate EAPI for update_dbentry (bug #426476).Zac Medico2012-07-171-3/+4
|
* migrate emaint to use the new title and label features of the progressbar.Brian Dolbec2012-07-091-4/+2
|
* emaint: remove obsolete world category checkZac Medico2012-07-031-7/+2
| | | | | | The reason for this check, as discussed in bug #166785, is no longer relevant since emerge does not suggest to run `emaint --check world` in this case anymore.
* Fix missed ROOT -> EROOT changes.Zac Medico2011-10-271-1/+1
| | | | These go along with commit a715b65f7bd36409c1283e6911265d1f4405ab7a.
* Use EROOT instead of ROOT for keys everywhere.Zac Medico2011-10-251-10/+10
| | | | | | | | | | It makes more sense to use EROOT instead of ROOT for keys in mappings like portage.db, since it allows for multiple prefixes to exist simultaneously within the same map without having a key collision. This affects all portageq commands which take a <root> parameter, since that parameter now corresponds to EROOT instead of ROOT. None of this makes any difference for non-prefix users, since EROOT and ROOT are identical when EPREFIX is empty.
* emaint binhost: add method for SIZE/MTIME checksZac Medico2011-06-181-19/+38
|
* emaint binhost: check SIZE and MTIMEZac Medico2011-06-181-1/+21
|
* Remove redundant initial os.sep argument to os.path.join() callsZac Medico2010-09-051-2/+2
| | | | involving EROOT.
* use EROOT with WORLD_FILEFabian Groffen2010-09-041-1/+1
|
* use EROOT with VDB_PATHFabian Groffen2010-09-041-2/+2
|
* Rename the portage.sets module to portage._sets since it will be usefulZac Medico2010-08-301-2/+2
| | | | | in the upcoming 2.1.9 branch which will not have sets support but will still have the code in private and disabled form.
* Tweak global updates handling so that updates from $PORTDIR are appliedZac Medico2010-07-271-10/+40
| | | | | | | | | for all of the following cases: * package is missing repository metadata * package has repository metadata, but the source repository does not have a profiles/updates/ directory * package has repository metadata, but the source repository is not currently accessible via PORTDIR_OVERLAY
* Make dbapi.update_ents() take a dict of {repo_name: list}, since it'sZac Medico2010-07-271-2/+1
| | | | most efficient to process all repos at once.
* Fallback to updates from PORTDIR if repository has no 'updates' dir.Michał Górny2010-07-271-0/+3
| | | | | | As a backwards-compatibility measure, if a particular repository doesn't come with an 'updates' directory, fallback to updates from dbapi.porttree_root.
* Add repository-wide updates support to emaint.Michał Górny2010-07-271-40/+55
|
* Skip atom validation in WorldHandler since WorldSelectedSet handles thisZac Medico2010-02-091-3/+2
| | | | | | already, and use Atom.cp instead of dep_getkey(). svn path=/main/trunk/; revision=15327
* Bug #300388 - Fix terminal handling code to so term codes aren't sent whenZac Medico2010-01-111-1/+1
| | | | | | TERM=dumb. svn path=/main/trunk/; revision=15191
* Fix WorldHandler to use the "selected" set.Zac Medico2009-10-171-2/+2
| | | | svn path=/main/trunk/; revision=14620
* Use list comprehensions instead of filter() or map() in some places for ↵Arfrever Frehtes Taifersar Arahesis2009-09-251-3/+3
| | | | | | compatibility with Python 3. svn path=/main/trunk/; revision=14421
* Replace doct.keys() usage with __iter__(), since it behaves identically inZac Medico2009-09-221-1/+1
| | | | | | both python 2.x and 3.x. svn path=/main/trunk/; revision=14379
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-2/+2
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Use filter() and zip() instead of itertools.ifilter() and itertools.izip() ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-2/+1
| | | | | | | | for compatibility with Python 3. (2to3-3.1 -f itertools -f itertools_imports -nw ${FILES}) svn path=/main/trunk/; revision=14314
* Update syntax of numbers for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
* Support print() function with Python 2 in some files.Arfrever Frehtes Taifersar Arahesis2009-09-201-0/+3
| | | | svn path=/main/trunk/; revision=14291
* Update syntax of calls to print() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-7/+7
| | | | | | (2to3-3.1 -f print -nw ${FILES}) svn path=/main/trunk/; revision=14290
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Update imports to import portage.os (with unicode wrappers), and useZac Medico2009-08-111-2/+1
| | | | | | _unicode_encode() and _unicode_decode() where appropriate. svn path=/main/trunk/; revision=13993
* Bug #280259 - Fix emaint to call binarytree._load_pkgindex() for unicodeZac Medico2009-08-041-13/+3
| | | | | | handling. svn path=/main/trunk/; revision=13891
* Fix typo in --help.Zac Medico2008-11-241-1/+1
| | | | svn path=/main/trunk/; revision=12072
* Add docs for all of the supported commands.Zac Medico2008-11-231-4/+26
| | | | svn path=/main/trunk/; revision=12047