aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ebuild.profiles: Fix case where a parent path omits the repo identifierJames Le Cuirot2024-06-131-0/+2
| | | | | | | | | | According "SPECIFIC FILE DESCRIPTIONS" in `man portage`, it is valid to have a parent path like `:path/to/profile` where the repo identifier is missing. This refers to a path in the current repo. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Closes: https://github.com/pkgcore/pkgcore/pull/435 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.28Arthur Zamarin2024-06-121-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Revert "refactor: leverage ABC protections for prototype.tree"Arthur Zamarin2024-03-291-6/+2
| | | | | | | | | This change broke ConfiguredTree, since it was implementing the ABC function through the `__getattr__` magic. While good intentions, reality hit us. Reverts: cc6a8d054363561890bb0552f1439a8ace92b367 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.27Arthur Zamarin2024-03-271-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add git@Vitaly Zdanevich2024-03-091-1/+2
| | | | | | Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru> Closes: https://github.com/pkgcore/pkgcore/pull/434 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* reformat with black 24Arthur Zamarin2024-01-2612-30/+19
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* refactor: loosen prototype.tree._get_* requirements, add typing.Brian Harring2024-01-231-8/+10
| | | | | | | | | | | | | | | This moves the burden of derivatives having to ensure they return immutables, instead this is handled by the internals of prototype.tree since it already partially was. This change basically makes it easier to write generators for cat/pkg/ver listing. For existing implementations returning immutable objects this has no impact; `t=(1,2);assert t is tuple(t)` for example, and the same holds for frozenset. Signed-off-by: Brian Harring <ferringb@gmail.com>
* refactor: leverage ABC protections for prototype.treeBrian Harring2024-01-231-2/+6
| | | | | | | This was always an abstract class, just typing/ABC didn't exist when it was written. Leverage modern protections. Signed-off-by: Brian Harring <ferringb@gmail.com>
* fix filtered.tree.{categories,packages,versions} .Brian Harring2024-01-231-1/+21
| | | | | | | | | | | | The implementation wasn't properly aliasing _get_* to the underlying raw_repo, and it should've been filtering packages and versions according to the filter. This adds that. This isn't a huge issue, but it breaks API guarantees for code tring to efficienctly access this sort of info for a repository stack. Signed-off-by: Brian Harring <ferringb@gmail.com>
* refactor: Add missing abstractmethods for ConfiguredTree.Brian Harring2024-01-231-0/+6
| | | | | | | In this case, it's not needed beyond being explicit- the GetAttrProxy redirects _get_categories and such to .raw_repo. Signed-off-by: Brian Harring <ferringb@gmail.com>
* fix: suppress $HOME for tests.Brian Harring2024-01-231-0/+3
| | | | | | | | | | | | | Suppressing $HOME is necessary for hygenic tests; to avoid anything in the dev's environment becoming relied upon for the test passing. A slightly more salient point for me; every `git commit` test was asking for my gpg unlock for git commits; obviously annoying, also obviously unhygenic (I could have modified default git commit template for example). Signed-off-by: Brian Harring <ferringb@gmail.com>
* start work on 0.12.26Arthur Zamarin2024-01-181-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Write LICENSE before SLOT in create_ebuild()Anthony Ryan2024-01-151-2/+2
| | | | | | | | | | Better matches the order defined in skel.ebuild A prerequisite for https://github.com/pkgcore/pkgcheck/pull/645 Signed-off-by: Anthony Ryan <anthonyryan1@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/425 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fix: child repository not inheriting license groups when it defines noneBrian Harring2024-01-121-3/+5
| | | | | | | | | | | If the child repository defines no license groups, the previous code would exit out before it integrated the parents license groups. This fixes that, and adds tests for it. Signed-off-by: Brian Harring <ferringb@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/424 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fix: tweak CPV parsing rules to match PMS.Brian Harring2023-12-281-1/+6
| | | | | | | | | | | | | | | Bug #421 captures this; pkgcore was allowing version components as the package name if it was suffixed by a revision; the fix for that incorrectly limited a package name that has a trailing revision, but *no version syntax* in the name. This commit just refactors the revision check to also force a check for a leading version if revision-like is found. Resolves: https://github.com/pkgcore/pkgcore/issues/421 Signed-off-by: Brian Harring <ferringb@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/422 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* atom: limit the start of a slot to left of use components.Brian Harring2023-12-261-1/+2
| | | | | | | | | It's a minor redundant protection + optimization, but it's worth ensuring the only spot considered for a slot prefix is left of any use restrictions. Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Fix: parsing bug that allows a revision to be part of a packageBrian Harring2023-12-261-4/+4
| | | | | | | | | | The previous logic was just checking for a trailing version component; it wasn't checking for a trailing revision. Relates to issue: #419 Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.25Arthur Zamarin2023-12-261-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* core: remove the ability to have multi-level categoriesBrian Harring2023-12-037-86/+42
| | | | | | | | | | | | | | The support for multiple levels of categories never was used, thus it's time to remove it since it also simplifies things. Doing this means the original dict functionality of repo.categories should be replaced w/ a sequence which this also does. Signed-off-by: Brian Harring <ferringb@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/417 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* repo: Simplify SimpleTree signatureBrian Harring2023-12-031-3/+1
| | | | | Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* cleanup: Replace fake_pkg with common mockBrian Harring2023-12-031-0/+9
| | | | | Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pquery: Fix --environment-re support .Brian Harring2023-11-241-4/+15
| | | | | | | | | | | | | This has been broken for a long while, thus I'm renaming it to `--environment-re` (from `--environment`) in the process. Tests will follow in a later PR (pquery test infra needs some work). Signed-off-by: Brian Harring <ferringb@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/415 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pquery: correct minor english typo in commentsBrian Harring2023-11-241-3/+3
| | | | | Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* repository: shift args to docstringBrian Harring2023-11-241-9/+9
| | | | | Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pmaint eclass: add better invocation with output filename formatArthur Zamarin2023-10-231-3/+23
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pmaint eclass: improve rst outputArthur Zamarin2023-10-232-18/+36
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pmaint eclass: add devbook output formatArthur Zamarin2023-10-233-1/+252
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* eclassdoc: parse default and initial valuesArthur Zamarin2023-10-231-5/+18
| | | | | | | A little bit ugly, but does the job. Resolves: https://github.com/pkgcore/pkgcore/issues/297 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* eclassdoc: output exported phasesArthur Zamarin2023-10-232-1/+12
| | | | | Closes: https://bugs.gentoo.org/846503 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* eclassdoc: remove @BUGREPORTS tagArthur Zamarin2023-10-231-5/+4
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* operations.format.fetch_base: try to use proxy values from domainArthur Zamarin2023-08-302-4/+9
| | | | | | | https://github.com/pkgcore/pkgcore/commit/b1053683ecb8e17ed69e5797c32b83dd48452f59#r125093286 Follows: 8d1a2095e9e3d5892d5eef39725d8bd2bcf74cbe Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.24Arthur Zamarin2023-08-301-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ebuild.repository: require .group extension for stabilization groupsArthur Zamarin2023-08-291-15/+20
| | | | | | | | | | | | After further consideration, it seems that the requiring .group extension will make our life easier, with exact format, and save us from backup files, readme or similar. https://github.com/pkgcore/pkgcore/pull/412#discussion_r1307738865 Suggested-by: Michał Górny <mgorny@gentoo.org> Follows: d00711f2d6cbae14a57088ef78caa3daf72069aa Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ebuild.repository: add support for stabilization groupsArthur Zamarin2023-08-281-0/+24
| | | | | | | | This is a special metadata files that can be used to group packages for stabilization bugs. Resolves: https://github.com/pkgcore/pkgcore/issues/411 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* operations.format.fetch_base: fix for when no proxyArthur Zamarin2023-08-211-2/+2
| | | | | | Follows: b1053683ecb8e17ed69e5797c32b83dd48452f59 Resolves: https://github.com/pkgcore/pkgdev/issues/151 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* operations.format.fetch_base: support proxy configurationArthur Zamarin2023-08-202-11/+10
| | | | | | | | | | | Add support for proxy configuration to the fetch_base operation, through the environment variables ``http_proxy`` and ``https_proxy``. I see no security concern from passing those variables to the fetcher, as they are run with the same permissions as the rest of pkgcore, under user level. https://github.com/pkgcore/pkgdev/issues/103 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.23Arthur Zamarin2023-08-051-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pass PATH variable to calls of FETCHCOMMANDArthur Zamarin2023-07-261-1/+5
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/145 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgsets.glsa: exclude metadata files from warning + cleanupArthur Zamarin2023-07-151-32/+27
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* multiplex.tree: fix config name and typeArthur Zamarin2023-07-152-12/+6
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/602 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Revert "multiplex.tree: fix config name and type"Sam James2023-07-157-30/+34
| | | | | | | | | This reverts commit ef79d4dcc640658b335fd80cd69bc743d566010a. As discussed on IRC, temporary fix for live users. Bug: https://github.com/pkgcore/pkgcheck/issues/602 Signed-off-by: Sam James <sam@gentoo.org>
* multiplex.tree: fix config name and typeArthur Zamarin2023-07-147-34/+30
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* manifest: fix missing errors when all ebuilds for package are masked badEric Huber2023-06-301-0/+12
| | | | | | | | | | | | | If all of a package's ebuild files have been masked bad, that package gets filtered out of the iterator for the previous loop in this function, so a followup loop over the masked bad packages can help to emit the unreported errors. Resolves: https://github.com/pkgcore/pkgdev/issues/55 Co-authored-by: YiFei Zhu <zhuyifei1999@gmail.com> Authored-by: Eric Huber <echuber2@illinois.edu> Closes: https://github.com/pkgcore/pkgcore/pull/406 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.22Arthur Zamarin2023-04-211-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pytest.plugin: blank line after EAPI declare in create_ebuildArthur Zamarin2023-04-201-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.12.21Arthur Zamarin2023-04-201-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fix(config): cleanup deprecated access of central.*, using central.objects.* ↵Brian Harring2023-02-053-6/+8
| | | | | | | | | | | | instead See the last commit for particulars, or fa90aff05306fb4935604e64645f2d1d2049233e . This just completes the migration for what I can find. Signed-off-by: Brian Harring <ferringb@gmail.com> Closes: https://github.com/pkgcore/pkgcore/pull/398 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fix(config): Add deprecation warnings for very old config shimsBrian Harring2023-02-051-0/+11
| | | | | | | | | | | | | | | | | | | The context of this is fa90aff05306fb4935604e64645f2d1d2049233e; the original 'central' manager exposed objecst in the same attr namespace as it's own internals. Whilst no conflicts occured, it was possible, so the configuration objects were moved to .objects to remove the potential. A compatibility shim was added (CompatConfigManager), but no warnings were added at the time due to presumably the module not existing. Either way, it exists, thus add a warning. There are multiple users in pkgcore's code (fixed in followup commit). Pkgcheck and pkgdev are clean, but it may be wise to wait a release or two before removing the compatibility shim. It's been in place 11 years, not like it's going to kill us to wait another month... Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* refactor(config): remove prepend/append incremental return signature fully.Brian Harring2023-02-053-177/+26
| | | | | | | | | | | | | The previous commit disabled the logic to generate prepend/val/append- nothing used it- this commit realigns the client consumers to expect a single value unless they're invoked arg_type="repr". Essentially, now if you ask the config layer for a value, you don't have to know if it's a value that is considered 'incremental'- you just get back a python object for what you asked, ready for usage. Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* refactor(config): remove the notion of config layer incremental prepend/append.Brian Harring2023-02-052-79/+22
| | | | | | | | | | | | | | | | Many moons gone past the original config system tried to support the idea of incrementally stacked values (x y -x z -y == z). This commit removes the fundamental core of that functionality; the incremental logic is now implemented in domain specific layers, rather than being a capability of the config layer. Note: this just removes the logic. The signature of [before, mid, after] return is still in place, and will be removed as the API is normalized. In particular, pconfig still reports on .prepend/.apend, there just no longer is content there. That behaviour (and signature) change will be a followon commit. Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>