rpm-ostree/tests/check
Jonathan Lebon 4249dc8c63 libpriv: Directly parse NEVRAs, don't use branches
When I initially added support for local RPM layering (#657), I was
operating under the assumption that there is no reliable way to parse a
NEVRA back to its constituent elements. So we worked around this by
doing lookups in the pkgcache and comparing against branches converted
back to their NEVRAs, which was pretty hacky.

Later on, I learned that you *can* reliably parse a NEVRA back to its
elements because RPM forbids all fields from having a colon `:` and all
fields other than the package name to have a dash `-`. In fact, there is
a helper from `libdnf` to do exactly this.

This patch swaps out the old way of decomposing NEVRAs and converting
NEVRAs to their cache branch notation with a simpler more direct
approach using the helper function from `libdnf`.

Closes: #1395
Approved by: cgwalters
2018-06-08 20:51:30 +00:00
..
jsonutil.c Switch to glib cleanup macros 2016-07-15 13:08:58 +00:00
postprocess.c postprocess: Handle f26 /etc/nsswitch.conf configuration 2017-03-16 18:39:38 +00:00
test-kargs.c tests/check: Add unit tests for kargs options 2017-11-06 18:49:36 +00:00
test-lib-introspection.sh tests: Split unit test-basic.sh into introspection + upgrade-rebase 2018-04-17 13:08:24 +00:00
test-ucontainer.sh daemon: Add a sanitycheck(/bin/true) before we deploy a tree 2017-07-27 17:58:58 +00:00
test-utils.c libpriv: Directly parse NEVRAs, don't use branches 2018-06-08 20:51:30 +00:00