def add_archive(self, src_file, remove_final=False):
        """
        Adds the contents of another tarfile to the build. It will be repackaged during context generation, and added
        to the root level of the file system. Therefore, it is not required that tar (or compression utilities) is
        present in the base image.

        :param src_file: Tar archive to add.
        :type src_file: unicode | str
        :param remove_final: Remove the contents after the build operation has completed. Note that this will remove all
         top-level components of the tar archive recursively. Therefore, you should not use this on standard unix
         folders. This will also not reduce the size of the resulting image (actually may increase instead) unless the
         image is squashed.
        :type remove_final: bool
        :return: Name of the root files / directories added to the Dockerfile.
        :rtype: list[unicode | str]
        """
        with tarfile.open(src_file, 'r') as tf:
            member_names = [member.name
                            for member in tf.getmembers()
                            if posixpath.sep not in member.name]
        self.prefix_all('ADD', *zip(member_names, member_names))
        if remove_final:
            self._remove_files.update(member_names)
        self._archives.append(src_file)
        return member_names