| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
The flatten argument is purely type specific, and there are no
users of this function beyond one internal site. Thus simplify
the API (to make typing easier), and to make future refactoring easier.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This never made much sense in light of how args were handled,
and it complicates the heck out of typing, thus require invokers
to be explicit.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ConfigHint's should be treated as immutable; any manipulation of their data
should be handled either via clone or via pre-processing. This system is
complex enough we don't want mutability, and the allowance of that was an
oversight from the good ole days of py2.4.
Force immutability sincei t's the actual design contract and also to flush
out anyone breaking said contract (no pkgcore code breaks that, to be clear).
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add support for `-*` and `USE_EXPAND: -*` syntax. Allow this syntax, and
update incremental computation of resulting use combination.
Resolves: https://github.com/pkgcore/pkgcore/issues/393
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
We're only trying to limit the retries, thus use islice
instead.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/394
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repos.conf into methods.
The previous code had the exception + fallback handling in the init; this is already
a long init, and there are changes needed for repos conf, thus introduce a method to
do the fallback logic.
Said method will be extended to essentially bury the complexity of repos.conf- that problem-
into an encapsulated method to try and reduce the cognitive burden of dealing with it.
Why this matters: this work is prep for extension of repos.conf to add in various syncing
features portage grew over the last decade+.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
| |
This code was written before exception chaining, but it's esoteric
enough we very much want the chain to be thrown.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally, since we know the sync subsystem was written before basic sanity
of the frontend, and we know that it invokes processes that write to stdout/stderr,
force a flush of those handles to ensure that we don't wind up with interlaced output
from two processes.
The need to bury a flush here is a sign that the abstraction needs redesign, but
that's a problem for a later date.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Effectively, add '_spawn' and '_spawn_interactive' to the base class,
and expect consumers to invoke the appropriate one.
This addition doesn't fully fix the fundamental lack of an observer (or log)
based approach to getting info out of syncers, but it at least hides some of
the internals so the syncer classes can do things like knowing what the
correct encoding is for stdout, thus being able to write their own messages
to it.
TL;DR: This subsystem's interaction w/ CLI (and used as a library) needs rewriting,
this just reduces that problem when we visit it.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Support /etc/portage/make.profile as a directory, and not as symbolic
link. In this state, /etc/portage/profile takes precedence over, and
this is taken as a "normal" profile. We need to make sure that
`load_profile_base` is turned off, as profiles base is irrelevant now.
Resolves: https://github.com/pkgcore/pkgcore/issues/305
Resolves: https://github.com/pkgcore/pkgcheck/issues/426
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
| |
- add support for parsing of multiple USE_EXAPNDs
- fix error reporting when not USE_EXPAND has parsing error
- updates tests to catch warning thrown by parsing
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Whilst this should probably matter, all reporting pathways I know of
involve "don't yell at the user" this it's probably not optimal
to have pathways that "yell at the user".
Closes: https://github.com/pkgcore/pkgcore/issues/365
Signed-off-by: Brian Harring <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/387
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://github.com/pkgcore/pkgcore/pull/333
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
| |
Had this been in place, it would've detected pkgcore/pkgcore#384 long ago.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Specifically, this moves strong blockers, use deps, and slot deps to
rely upon the EAPI context of the atom parse. EAPI ultimately has say
on this, thus just remove the 15+ year old hardcoded constants and use
eapi_obj instead.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
| |
We already paid the cost of looking up the eapi obj constants, thus use it,
and remove the atom implementations awareness of magic eapi constants.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
EAPI objects are responsible for deciding the rules of how to parse
atoms, and this extends to use flags. Thus just ask the EAPI obj
to tell us "is it valid?".
In moving this out of atom.py it allows us to lace that validation
into other configuration loading aspects of the code.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently no EAPI varies the use flag parsing rules, but if it ever comes up,
this will address it.
In the process, this also will be used to move some logic out of atom.py whilst
introducing the concept of 'latest PMS' as the 'latest' rules to parse under in
the absense of an explicit directive.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, if you have:
`*/* PYTHON_TARGETS: -python2_7 python3_9`
Pkgcore was treating `PYTHON_TARGETS:` as a use flag. That's obviously
wrong, and the parsing should be tightened there.
Closes: https://github.com/pkgcore/pkgcore/issues/384
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, alphanumeric sorting; a '00' should always be
parsed before an '01' or 'a'.
The ordering must be stable so that globals- in a 00 file- can
be overridden per package via other files. If there is no stable
ordering forced on how the order of files read, then this isn't supported.
Closes: https://github.com/pkgcore/pkgcore/issues/385
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Operations isn't a verb on it's own, so this naming isn't explanatory
on it's own. 'get_pkg_operations'- plus a docstring- is clearer, thus
the rename.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The intention has always been to only target `configure` scripts that use
libtool, not just any script with a `--disable-static*` option.
* libtool has been using the same `configure` format for at least
the past 15 years (going back to libtool 1.5.22):
1. shared and static libraries enabled (the main use case):
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
2. shared libraries enabled and static libraries disabled:
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
3. shared libraries disabled and static libraries enabled:
--enable-shared[=PKGS] build shared libraries [default=no]
--enable-static[=PKGS] build static libraries [default=yes]
Bug: https://bugs.gentoo.org/814380
Signed-off-by: David Seifert <soap@gentoo.org>
Closes: https://github.com/pkgcore/pkgcore/pull/386
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This can be activated (per repo) via:
git config blame.ignoreRevsFile .git-blame-ignore-revs
Signed-off-by: Brian Harring <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/382
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Further in this __init__, self.pid is initialized to the process
that is started. If that fails- an exception is thrown- then
self.pid doesn't exist, which in turn breaks the assumptions of
`shutdown_processor()` and `.is_alive` (both of which are
designed to work if an init partially failed).
Finally, add protections to ensure a failed spawn doesn't leak
file descriptors. Python won't reap raw FD's, so we need to
handle this gracefully.
This secondary exception is visible in pkgcore/pkgcore#296
Signed-off-by: Brian Harring <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/383
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests are added to validate, but essentially an atom like `sys-libs/libxcrypt[abi_x86_32(-),abi_x86_64(-),system(-)]`
would fail to match IUSE='+system' due to the restriction using the unstripped
iuse for a set check.
With that fixed, the resolver- at least on my system- now actually can generate
solutions that are sane/correct.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/381
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current resolver is effectively brute force graph exploration,
iteratively adding results to the graph changing previously decisions
based on new requests. This means that the resolver *can* produce
different solutions if the order of constraints added to it differ.
It's desirable the resolver behaviour be reproducible, thus change the default
behaviour to sort the target list given to the resolver.
As to why we don't force sorting within the resolver itself; for processing
of package dependencies, those are already stably ordered. A future
enhancement would be to modify the resolver to be explicit, but that's for
when the resolver is rewritten.
Currently the source of instability is the atoms fed to the resolver from
pmerge, thus why I'm adding the sorting in pmerge.
Finally: the resolver must always produce a solution, or must always not, irregardless
of the argument ordering it's given. Thus '--disable-resolver-target-sorting' is
added to allow disabling the sorting and doing something of a random entry/walk
into the depgraph. This can produce differing solutions than what a sorted entry
would produce; that is working as intended (there is no global optimizer of solutions,
thus 'first solution' is what pmerge uses).
Basically, these two invocations should agree that a solution exists, or doesn't.
If they disagree this directly shows that the resolver is failing to explore solution
space fully:
* `pmerge <targets> --disable-resolver-target-sorting`
* `pmerge <targets>
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
|
|
|
| |
This is fairly hackish, but will be extended as a way to jump into the resolver
decision making for debugging and development.
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
|
|
|
|
| |
The previous form was risky in that it assigned a generator
to consume from; this form of pattern can bite folks in the
ass; minimally, it makes tests trickier.
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
| |
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
|
|
|
|
|
|
|
| |
Based on new `snakeoil.constraints`, this adds a solver which can build
satisfying USE flag combinations for a given set of REQUIRED_USE
restricts. This will be used by new tool `pkgdev tatt`.
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
| |
Resolves: https://github.com/pkgcore/pkgcore/issues/376
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|