When the automatic patching step was implemented, the metadata started
being read from the original Cargo.toml file instead of from the one
with manually applied changes.
Recent changes (in particular, use of the new "structural pattern
matching" syntax, which was introduced in Python 3.10) were already
incompatible with Python <3.10, but neither the tox settings nor
the project metadata had been updated to reflect this fact.
Fedora 35, the oldest currently supported branch of Fedora, already
ships with Python 3.10 by default, so we don't drop support for any
current Fedora releases.
This is slightly undefined, but it's more user-friendly to treat e.g. VISUAL=
the same as $VISUAL being unset. So to use e.g. RUST2RPM_NO_DETECT_PACKAGER,
"RUST2RPM_NO_DETECT_PACKAGER=1" must be used, and "RUST2RPM_NO_DETECT_PACKAGER="
is not enough.
The basic workflow is that very similarly to how we would open an editor to do
manual patching of Cargo.toml, we automatically rewrite the file first. In this
automatic rewrite, for any sections like [target.cfg(…)], we evaluate the
conditional and drop the whole section if the conditional is known to be false.
When the conditional cannot be evaluated because it uses some form that we don't
understand, it is left untouched. But it seems that the conditionals used in
practice don't have too much variety. If parser and evaluator certainly don't
cover all the corner cases, but it might not matter in practice. We can always
fix them later if unsupported cases are found.
Removed dependencies are filter out from [feature] lists:
For example for tokio:
[features]
-net = ["libc", "mio/os-poll", "mio/os-ext", "mio/net", "socket2", "winapi/namedpipeapi"]
+net = ["libc", "mio/os-poll", "mio/os-ext", "mio/net", "socket2"]
If -p was used, after the automatic filtering, the editor is opened for the user
to do further manual patching.
Automatic and manual changes land in separate patches.
Fixes#2.
This is a prerequisite for testing the rendering logic without invoking
the whole program. But I think it also makes it much easier to see what
is going on.
I used slightly non-standard formatting with extra whitespace because
the invocation was hard to rid otherwise.
We also use "md" as short for "markdown", and this abbrevation can be
confusing. It's also weird to use 'md' as the parameter name in an
exported entry point.
The infrastracture to translate the license remains in place.
We can remove it later, when all users are gone. I'm keeping
the behaviour for Mageia unchanged for now. I assume that they'll
want to follow the change in Fedora later too.
We still want to do syntax cleanup with translate_slashes().
Fixes#193.
The code is complicated by passing behaviour options through multiple
levels. This is already hard to read because the names are different
at different levels. Let's just pass args, so that it's easy to add
new options in the future.
I don't have enough energy to do this for all functions, but I'll try
to add some docs as I look at the code. The project is growing and it's
harder to remember what all the parts do.