This is essentially what current uninstall script attempts to do [by keeping track of installed files - i.e files that 'make install' copied over.
[there could be bugs introduced that broke this 'desing thingy?' - i.e the change that introduced shutil.rmtree - and perhaps others that need to be fixed] But its not clear to me if we can do this for packages installed with --download-package. We don't know how to get the list of files those tools install. Also if the package provides 'make uninstall' - for it to work - we have to keep the sources arround [which i don't think we want to do] - smilar to this install_manifest.txt feature. Satish On Mon, 26 Feb 2018, Jed Brown wrote: > It would be pretty easy to provide the equivalent of CMake's > install_manifest.txt. > > https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F > > "Smith, Barry F." <[email protected]> writes: > > > For each package that has an uninstall we run the uninstall. (that is for > > no packages since it is unlikely any have an uninstaller) > > > > For the other packages we can manually determine what they install and > > then list those items in the uninstall script. Not ideal but it will > > uninstall most of the items. > > > > Barry > > > > > >> On Feb 25, 2018, at 8:17 PM, Satish Balay <[email protected]> wrote: > >> > >> On Sun, 25 Feb 2018, Lawrence Mitchell wrote: > >> > >>> > >>> > >>>> On 25 Feb 2018, at 21:13, Jed Brown <[email protected]> wrote: > >>>> > >>>> > >>>> The try part of that commit (around os.remove) is necessary. Also, > >>>> "rmdir -p" provides a useful semantic in this context, but needs to be > >>>> implemented manually in Python (or I don't know where that functionality > >>>> is available in the standard library). > >>> > >>> shutil.rmtree > >> > >> I think [in uninstall script] - we want to delete dirs only if the dir > >> is empty. [if not empty - it could contain files installed by a > >> different package - as its common to install multiple packages in the > >> same prefix] > >> > >> Also - thinking about it - its not clear if we can really do a proper > >> uninstall - esp with --download-packages. > >> > >> Previously - 'make install' would also install the downloaded packages > >> and we kept track of them for the uninstall script. But now - we let > >> each package do its own 'make install' to the prefix location. But we > >> don't have an 'uninstall' option for these externalpackages. [I don't > >> know if any of them provide 'make uninstall' feature] > >> > >> Satish >
