Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-03New --duplicated-nevra <solution> optionHEADmasterPavel Raiskup
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
2022-11-03New (hidden) --delayed-dump optionPavel Raiskup
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.
2022-11-03New helper wait_for_incremented_ids()Pavel Raiskup
Will be needed later for the "skip" mechanism.
2022-11-03Better 'res' and 'pkg' allocation handlingPavel Raiskup
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.
2022-11-03Don't remove old metadata packages with --updatePavel Raiskup
Revamped 'pkg_from_md' that was unused for some time, but renamed to 'clean'.
2022-11-03Make the --update old_metadata override hack simplerPavel Raiskup
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.
2022-10-19Include <rpm/rpmstring.h> for rasprintfSam James
Fixes build with Clang 16. Bug: https://bugs.gentoo.org/875698 Signed-off-by: Sam James <sam@gentoo.org>
2022-06-28Release 0.20.10.20.1Aleš Matěj
2022-06-28createrepo_c shouldn't silently produce duplicate-NEVRA reposDaniel Alley
Return an error code and print a message when more than one package have the same NEVRA. closes #307
2022-06-27Fix bad performance with task queue managementDaniel Alley
closes #323
2022-06-22Update errno usage to fix incorrect GError messagesScott K Logan
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.
2022-06-08Drop leftover declaration for cr_set_global_exit_valueScott K Logan
This function has no definition.
2022-06-08Install header for createrepo_shared moduleScott K Logan
2022-04-04fix memory allocation in unescape_ampersand_from_valuesFrank Schreiner
2022-03-29Release 0.20.00.20.0Neal Gompa
2022-03-29Fix signature of `pkg_iterator_next_package` to prevent a warningAleš Matěj
Signature https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_iternext
2022-03-29Remove C API for cr_xml_parse_main_metadata_togetherAleš Matěj
It is obsoleted by cr_PkgIterator_new and its API. It also converts some of the tests to using cr_PkgIterator.
2022-03-29Remove unused GError paramAleš Matěj
2022-03-29Remove python bindings for xml_parse_main_metadata_togetherAleš Matěj
They are obsoleted by cr.PackageIterator
2022-03-29Add unittests for decoding escaped &amp; in xml dataAleš Matěj
2022-03-29Fix '&' encoding in attributes when parsing repodataAleš Matěj
When loading repodata libxml2 replaces all '&' with "&#38;" This can lead to problems, if an rpm contains '&' in a dependency and we run createrepo_c on it it gets stored as "&amp;" if we later run createrepo_c with --update its loaded and encoded as "&#38;" which get stored in the xml as "&amp;#38;" To circumvent this change all "&#38;" back to '&' when parsing.
2022-03-17Add a streaming parsing API that is user-controllable.Daniel Alley
Allow the user to control the parsing loop ("external" iteration). This provides more flexibility in how packages are handled, accomodating lazy / pull-based workflows.
2022-03-17Fix test name typosDaniel Alley
2022-03-07Release 0.19.00.19.0Neal Gompa
2022-03-07Enhance cr_xml_parse_main_metadata_together doc stringAleš Matěj
2022-03-07Fix a memory leak of primary pkg when parsing interruptedAleš Matěj
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.
2022-03-07Fix a memory leak when removing the first link in a listAleš Matěj
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.
2022-03-07Remove `allow_out_of_order` option for `xml_parse_main_metadata_together`Aleš Matěj
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
2022-03-07Free `in_progress_pkgs_list` fully only when there is no newpkgcbAleš Matěj
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.
2022-02-23Add missing return value check for `g_remove` and log failsAleš Matěj
2022-02-23Improve matching of allocator with its freeAleš Matěj
Data allocated with glib should be freed with g_free.
2022-02-03Make parse warnings visible through cr.Repomd(), cr.UpdateInfo()Daniel Alley
There is no way to access parser warnings without using the low level API.
2022-02-02Use --error-exit-val option by defaultAleš Matěj
= changelog = msg: Use --error-exit-val option by default type: enhancement resolves: https://github.com/rpm-software-management/createrepo_c/issues/302
2022-01-04Release 0.18.00.18.0Neal Gompa
2022-01-04If new and old repomd matches during --update don't updateAleš Matěj
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
2022-01-04Add `cr_repomd_compare` for comparing two repomdsAleš Matěj
2022-01-04Store parsed repomd in `cr_MetadataLocation`Aleš Matěj
We want to later use it to check if it matches the new repomd.
2022-01-04Set database version only for the database records, not everythingAleš Matěj
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.
2022-01-04Default --keep-all-metadata to TRUE and add --discard-additional-metadataAleš Matěj
= 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
2021-12-12Use copy+delete fallback when moving of a dir failsAleš Matěj
For: https://github.com/rpm-software-management/createrepo_c/issues/266
2021-12-12cr_str_to_nevr/a can return NULL, check for that so we don't crashAleš Matěj
2021-12-12Zero init buffer to prevent use of garbage values if input is too shortAleš Matěj
2021-11-29Fix a bug in cr_repomd_record_compress_and_fill()Daniel Alley
2021-11-25Fix memory leaksDaniel Alley
2021-11-25Fix lifetime issuesDaniel Alley
closes #293
2021-11-15[spec] Option for legacy hashes, enable on RHEL <= 8 (RhBug:2022271)Pavla Kratochvilova
2021-10-21Release 0.17.70.17.7Pavla Kratochvilova
2021-09-29Make use of SHA-1 and MD5 conditional, off by default (RhBug:1935486)Aleš Matěj
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
2021-09-29Don't use SHA-1 and MD5 in the testsAleš Matěj
2021-09-29Remove commented out MD2 checksumAleš Matěj