mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-24 18:52:15 +00:00
1ddde3d9d0
abipkgdiff extracts the content of the first package in a directory named <tmpdir>/package1 and the content second package in <tmpdir>/package2. If two independant instances of abipkgdiff are launched at the same time, they are going to walk on each others' toes, to say the least. This patch extracts the content of each package in directory named <tmpdir>/<randomname>/package1, where randomname is supposed to be a random number, and so should be unique, most of the time. I guess we should try harder to generate a randomname that is unique when we see that the directory <tmpdir>/<randomname> exists already, but for now, what we have is good enough, or at least better than what we have had so far. * include/abg-tools-utils.h (get_random_number) (get_random_number_as_string): Declare new functions. * src/abg-tools-utils.cc (get_random_number) (get_random_number_as_string): Define them. * tools/abipkgdiff.cc (package::extracted_package_parent_dir_path): New data member. (package::package): Initialize package::extracted_package_parent_dir_path to <tmpdir>/<randomname>, with randomname being a random number represented as a string. (extract_rpm): Make sure to create a hierarchy of directories, not just a directory. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-writer.h | ||
Makefile.am |