Age | Commit message (Collapse) | Author |
|
Commit 8fb99cde21ba409ed9d12c40e020038974032ba1 added a detection
mechanism for duplicated NEVRA packages and an useful warning.
The new option '--duplicated-nevra keep' keeps the default behavior (if
specified) — all the duplicate packages are dumped into metadata.
When '--duplicated-nevra keep-last' argument is used, only the last
NEVRA (ordered by build time, then by its ocation path) is dumped to
the metadata and the former duplicates are skipped.
Relates: https://pagure.io/copr/copr/issue/840
Fixes: 325
|
|
Normally we dump (to XML and DB) directly from the pool of threading
workers, in a streaming fashion (as soon as the metadata about packages
are determined it is written).
The new option causes that the metadata are loaded first (still in
parallel), and then written at one time (by one thread for now).
Since all the metadata (cr_Package) is available in the memory in one
time, we can do some additional processing and filtering (before we
eventually perform the dump).
This is an optional behavior because the delayed XML chunk preparation
slows down the overall multi-threaded processing time.
|
|
Will be needed later for the "skip" mechanism.
|
|
The 'task_cleanup' target was reached without free-ing the 'pkg'
structure in one of the error cases before.
The 'res' was allocated on two places.
|
|
Revamped 'pkg_from_md' that was unused for some time, but renamed to
'clean'.
|
|
Even though we are destructively changing the recycled cr_Packages data,
we can keep the structure self-contained so the upper level logic will
automatically take care of the allocated memory.
The recycled metadata cr_Packages use one chunk per all packages
(CR_PACKAGE_SINGLE_CHUNK). That's why (pkg->chunk == NULL) and we can
re-use it for a new chunk. We just need to change the type of pkg to
!CR_PACKAGE_SINGLE_CHUNK so the cr_package_free() cleans the new
chunk.
This allows us to stop taking care of the locally allocated location_*
variables, because they are _cleanup_free_. This makes even the buffer
handling simpler.
|
|
Fixes build with Clang 16.
Bug: https://bugs.gentoo.org/875698
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
Return an error code and print a message when more than one package have
the same NEVRA.
closes #307
|
|
closes #323
|
|
Either the call to g_strerror or the GLib logging calls have been
changing the value of `errno` before it is used to set the error message
in g_set_error. This resulted in a correct error message being logged,
but an incorrect message being reported to the caller.
This change resolves the issue by calling g_strerror(errno) once and
re-using the same message to pass to both the logging function and
g_set_error.
|
|
This function has no definition.
|
|
|
|
|
|
|
|
Signature https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_iternext
|
|
It is obsoleted by cr_PkgIterator_new and its API.
It also converts some of the tests to using cr_PkgIterator.
|
|
|
|
They are obsoleted by cr.PackageIterator
|
|
|
|
When loading repodata libxml2 replaces all '&' with "&"
This can lead to problems, if an rpm contains '&' in a dependency and we
run createrepo_c on it it gets stored as "&" if we later run
createrepo_c with --update its loaded and encoded as "&" which get
stored in the xml as "&#38;"
To circumvent this change all "&" back to '&' when parsing.
|
|
Allow the user to control the parsing loop ("external" iteration).
This provides more flexibility in how packages are handled, accomodating
lazy / pull-based workflows.
|
|
|
|
|
|
|
|
This is not a problem for `filelists` or `other` because when they create
their package they immediately add it to in_progress_pkgs_list.
Add unit tests for interrupting parsing in filelists and other.
|
|
If we just move the HEAD of the list to the next link we lose a
reference to the first link forever. We need to free it.
|
|
The option was causing issues when repository has duplicate packages and
it was providing little value. All repos should really have the same
order of packages in primary, filelists and other metadata.
For: https://github.com/rpm-software-management/createrepo_c/issues/305
|
|
Normally the `in_progress_pkgs_list` is empty (all packages get parsed
and processed) however there are cases such as hitting an error or
interrupting parsing when there can be packages present.
If there are packages we can free them only if there is no newpkgcb
because otherwise their references are stored in python layer which then
also tries to free them leading to a crash.
|
|
|
|
Data allocated with glib should be freed with g_free.
|
|
There is no way to access parser warnings without using the low level
API.
|
|
= changelog =
msg: Use --error-exit-val option by default
type: enhancement
resolves: https://github.com/rpm-software-management/createrepo_c/issues/302
|
|
|
|
If the repomd matches it contains the same data. By not touching the
repodata files we can potentially save resources because other tools
don't have to evaluate the files for changes.
= changelog =
msg: If the new repodata generated during an --update run exactly matches the old repodata don't touch the files.
type: enhancement
|
|
|
|
We want to later use it to check if it matches the new repomd.
|
|
This was causing mismatches when comparing repomds, because the database
version is dumped only for the database records. So old loaded records
didn't have it but the new generated ones did even though it wouldn't
be written to an repomd xml later.
|
|
= changelog =
msg: Switch default of --keep-all-metadata to TRUE and add --discard-additional-metadata
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1992209
|
|
For: https://github.com/rpm-software-management/createrepo_c/issues/266
|
|
|
|
|
|
|
|
|
|
closes #293
|
|
|
|
|
|
But ON for Python build.
= changelog =
msg: Remove insecure hashes SHA-1 and MD5 from the default build
type: security
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1935486
|
|
|
|
|