Aurelien Larcher
2021-01-14 a3ab109cc57a944c74982382601acd3b6cf393fc
userland-mangler: avoid broken packages mixing incompatible libraries when published from non-clean prototype area
1 files modified
11 ■■■■ changed files
tools/userland-mangler 11 ●●●● patch | view | raw | blame | history
tools/userland-mangler
@@ -263,9 +263,14 @@
                                destdir = os.path.dirname(dest)
                                if not os.path.exists(destdir):
                                        os.makedirs(destdir)
                                # Create a copy to mangle if it doesn't exist yet.
                                if os.path.isfile(dest) == False:
                                        shutil.copy2(src, dest)
                                # Create a copy to mangle
                                # Earlier the code would check that the destination file does not exist
                                # yet, however internal library versioning can be different while the
                                # filename remains the same.
                                # When publishing from a non-clean prototype directory older libraries
                                # which may be ABI incompatible would then be republished in the new
                                # package instead of the new version.
                                shutil.copy2(src, dest)
                                # Mangle the copy by deleting the tag if there is nothing left to keep
                                # or replacing the value if there is something left.