summaryrefslogtreecommitdiff
path: root/pym
AgeCommit message (Collapse)Author
2023-06-04enalyze/analyze.py: fix typosDiego Viola
Signed-off-by: Diego Viola <diego.viola@gmail.com> Closes: https://github.com/gentoo/gentoolkit/pull/27 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2023-03-22Support the NO_COLOR environment variableUlrich Müller
Bug: https://bugs.gentoo.org/902551 Signed-off-by: Ulrich Müller <ulm@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/26 Signed-off-by: Sam James <sam@gentoo.org>
2023-03-20*/*: Reformat with newer BlackSam James
Signed-off-by: Sam James <sam@gentoo.org>
2023-01-07eshowkw: Fix spelling errorGreg Kubaryk
Signed-off-by: Greg Kubaryk <kurly@vt.edu> Signed-off-by: Sam James <sam@gentoo.org>
2022-12-14profile: Default to main repo nameKrzesimir Nowak
In Flatcar we have a different repo marked as a default one (portage-stable), so "equery keywords" was crashing because it was trying to use gentoo repo anyways. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/gentoolkit/pull/24 Signed-off-by: Sam James <sam@gentoo.org>
2022-07-28equery: Set nocolor for piping to after options are parsedBrian Dolbec
Fixes commit 84ffe42e5 which set nocolor before options were parsed. Bug: https://bugs.gentoo.org/861116 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-11equery meta: Put maintainer description on the same lineBrian Dolbec
Bug: https://bugs.gentoo.org/576224 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10eclean/pkgindex.py: Fix typo in function callBrian Dolbec
File "/usr/lib/python3.10/site-packages/gentoolkit/eclean/pkgindex.py", line 60, in clean_pkgs_index if self.get_emaint_binhost(): AttributeError: 'PkgIndex' object has no attribute 'get_emaint_binhost'. Did you mean: '_get_emaint_binhost'? Also fix too many parameters in line 68 for the self.controller() call Bug: https://bugs.gentoo.org/857555 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10equery check.py: Fix flake 8 qa for unused variableBrian Dolbec
flake8 did not correctly detect the way the variable is used. Add an assert to eliminate the false detection. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10depends.py: Fix 3e35553df46 missing Package importBrian Dolbec
Remove unused FORMAT_TMPL_VARS import Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10equery depends: Fix a traceback due to UnboundLocalError:Brian Dolbec
File "/home/brian/Dev/git/gentoolkit/pym/gentoolkit/equery/depends.py" , line 106, in format_depend self.print_fn(indent, str(dep.cpv), use_conditional, formatted_dep) UnboundLocalError: local variable 'formatted_dep' referenced before assignment The statement appears to be added as preliminary debug info. Removed it. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10equery check: Fix exception handling for Insufficient permissionsAlexander Miller
A quick look into the source reveals that there is actually code to handle the case, but it expects the wrong exception type. This patch fixes that and also avoids a crash for other errors. Bug: https://bugs.gentoo.org/494134 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10package.py: code cleanup via blackBrian Dolbec
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-10equery meta: Migrate to portage's MetadataXML classBrian Dolbec
Portage's metadata handling code was originally ported from gentoolkit. Finally get around to migrating, eliminating duplicate code. Bug: https://bugs.gentoo.org/573030 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09equery meta: Fix missing description when not in metadata.xmlBrian Dolbec
Add description property to Package class. If no description in metadata.xml, get the description from the ebuild. Bug: https://bugs.gentoo.org/447538 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09Fix typo "informations" revdep-rebuild & eshowkwBrian Dolbec
original Author: buchner.johannes@gmx.at Bug: https://bugs.gentoo.org/648444 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09equery: Turn off color when piping is setBrian Dolbec
Bug: https://bugs.gentoo.org/506394 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09enalyze: Fix missing newline at end of saved rebuild filesBrian Dolbec
Bug: https://bugs.gentoo.org/626308 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09eclean: add early return for empty DISTDIRBrian Dolbec
Gentoo-bug-url: https://bugs.gentoo.org/703282 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09eclean: Complete migration to imported emaint codeBrian Dolbec
eclean-pkg now uses imported emaint binhost code to run, Properly handle --quiet option for progressbar suppression from emaint. Keeps the standalone emaint binhost subprocess call as backup. Closes: https://bugs.gentoo.org/688550 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09ekeyword: remove .ebuild file suffix requirement (bug 762331)Zac Medico
We'd like to use ekeyword in a git merge driver implementation, but the files that the driver will pass to ekeyword do not necessarily have a .ebuild suffix. Therefore, it would be handy to be able to distinguish ebuild arguments some other way. If the ignorable_arg(arg) function returns False and os.path.isfile(arg) returns True, then simply assume that the argument is an ebuild. Bug: https://bugs.gentoo.org/762331 Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/gentoolkit/pull/13 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-09equery: run blackSam James
Signed-off-by: Sam James <sam@gentoo.org>
2022-07-08equery: Add -F TMPL option to depends moduleArno Bauernöppel
Like in other modules it is now possible to format the output of the equery module 'depends' with the commandline switch '-F' and TMPL. The man page was adujusted. A new static method 'print_formated' was created. In method 'format_depend' is checked if the new option is present. Depending on the check the PackageFormatter is used to display the dependencies. manually apply github PR, some minor editing. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-08equery: update linguas->l10n optionMartin Matous
Signed-off-by: Martin Matous <m@matous.dev> Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-08metadata.py: Don't fail on unmatched packageMarco Sirabella
Added a warning hook too to reuse the GentoolkitNoMatches machinery This allows users to do something like: equery list @selected | xargs equery metadata successfuly, even if there are some selected packages that don't exist anymore. Signed-off-by: Marco Sirabella <marco@sirabella.org> Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-08Add -f/--forced-masked to equery usesOskari Pirhonen
Option to include forced and masked USE flags in `equery uses` output. - Marked with F / M in verbose/normal output - Marked with (+flag) / (-flag) in non-verbose/piped output Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-07-08eshowkw: make black happyMike Gilbert
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2022-07-08revdep-rebuild: set up a child logger with propagate = FalseMike Gilbert
This prevents log messages from being emitted more than once, especially by the root level loggger. Bug: https://bugs.gentoo.org/838406 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2022-06-08eshowkw: Fix missing dash for -r? ebuilds in versionlist outputBrian Dolbec
Turns out the real issue causing the row alignment issue was this. The code inadvertently dropped the dash display which in turn caused the row alignment issue. Reverts: 4695379c1921865d7763669580ac909ea94db90d Gentoo-bug-url: https://bugs.gentoo.org/503366 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-06-07eshowkw: Correctly fix row alignment issue bug 503366Brian Dolbec
Reverts: 42cf522c06080d Changes the content_length correctly for versionlist output Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-06-07eshowkw: Fix bug 503366 row alignment issueBrian Dolbec
The first element in the plain_list was a "------" string. This was causing the corner image to throw off the row alignment between the two columns. This fix corrects the alignment, but removes the "------" above the keywords to complete the header seperator line. Gentoo-bug-url: https://bugs.gentoo.org/503366 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2022-06-01fix missing short option "-u" for --unique-useYixun Lan
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2022-05-28implement --unique-use option for eclean-pkgYixun Lan
this will help to clean duplicated binpkg which has exact same USEs flags enabled, and it will choose the more recent version according to BUILD_TIME by default Closes: https://bugs.gentoo.org/727576 Closes: https://github.com/gentoo/gentoolkit/pull/20 Signed-off-by: Yixun Lan <dlan@gentoo.org>
2022-03-16Remove remnants of herds supportMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2022-03-16imlate: Remove 'experimental' codeMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2022-02-09*/*: drop obsolete Changelog referencesSam James
We got rid of Changelogs years ago in ::gentoo and most Portage support is gone too. Closes: https://bugs.gentoo.org/832369 Signed-off-by: Sam James <sam@gentoo.org>
2022-02-09*/*: reformat with latest Black 22.1.0Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2021-09-21Fix flake F401 'imported but unused' errorWolfgang E. Sanyer
Closes: https://github.com/gentoo/gentoolkit/pull/17 Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-09-20Change tabs to spaces (using autopep8). Also, format repo using black.Wolfgang E. Sanyer
The following command was used to change the tabs to spaces: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . And then black was run as `black .` on the entire tree Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-07-16equery: Remove leftovers from 'changes' removalMatt Turner
Closes: https://bugs.gentoo.org/796986 Fixes: bcb8158 ("equery: Remove 'changes' subcommand") Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-06-18ekeyword: fix typoPetr Vaněk
Signed-off-by: Petr Vaněk <pv@excello.cz> Closes: https://github.com/gentoo/gentoolkit/pull/12 Signed-off-by: Sam James <sam@gentoo.org>
2021-01-04equery: Remove 'changes' subcommandMatt Turner
ChangeLogs have been gone from gentoo.git since the beginning, and Council agreed in 2016 to allow Infra to decide whether to distribute them through rsync, which they have decided not to do [1]. [1] https://projects.gentoo.org/council/meeting-logs/20160410-summary.txt Signed-off-by: Matt Turner <mattst88@gentoo.org>
2021-01-02gentoolkit: Remove gentoolkit.test.cmpMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-28ekeyword: Use mock from unittestMatt Turner
Since we only support Python 3.6+. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20eclean: Remove unneeded __init__ to enable pytestMatt Turner
Prevented the unit test from running: pym/gentoolkit/test/eclean/distsupport.py:435: PytestCollectionWarning: cannot collect test class 'TestDisfiles' because it has a __init__ constructor (from: pym/gentoolkit/test/eclean/test_search.py) Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20ekeyword: Fix unit testMatt Turner
arch_status changed from a Dict[str] to Dict[Tuple[str, str]], but these bits of test data were not updated. Update the examples while we're here (e.g. arm64 is stable with stable profiles now). Fixes: 459cfba47d25 (ekeyword: Use now-common load_profile_data() from eshowkw) Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20ekeyword: Rename unit test so that it runsMatt Turner
unittests should be named test_*.py so that they are discoverable. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20Remove unused sys importsMatt Turner
Reported by flake8. Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20Remove inherits from objectMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2020-12-20Remove Python < 3 version checksMatt Turner
Signed-off-by: Matt Turner <mattst88@gentoo.org>