mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-11 20:44:48 +00:00
bad389f01a
Some symlinks in some RPMs resolve to binaries outside of the package. In those cases, avoid considering them. * src/abg-tools-utils.cc (maybe_get_symlink_target_file_path): Do not require that the file path points to a symlink. A file path can point to a file that is not a symlink and yet the whole path can be in parent directory that is a symlink. In this case, realpath will correctly resolve to the correct target file. * tools/abipkgdiff.cc (maybe_update_package_content): A path to a binary that is not inside the RPM (because a symlink resolved to a file outside of the RPM) should not be added to the set of binaries to be analyzed. * tests/data/test-diff-pkg/symlink-dir-test1-report1.txt: Add new test file. * tests/data/test-diff-pkg-ctf/symlink-dir-test1-report1.txt: Likewise. * tests/data/Makefile.am: Add new test file to source distribution. * tests/test-diff-pkg.cc (in_out_specs): for the data/test-diff-pkg/symlink-dir-test1/dir{1,2}/symlinks test, the root dir of the package is data/test-diff-pkg/symlink-dir-test1/dir{1,2}. Use that to test that the symlinks are properly handled. Also, use the data/test-diff-pkg/symlink-dir-test1/dir{1,2}/symlinks as a root of an alternative package for which the symlinks resolve outside the package, under data/test-diff-pkg/symlink-dir-test1/dir{1,2}/targets. In this later case, the symlinked files should be ignored in the comparison. Likewise for data/test-diff-pkg-ctf/symlink-dir-test1/dir1/symlinks. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
0 lines
Plaintext
0 lines
Plaintext