Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make uninstall leaves artefacts in standard locations #1501

Open
clanmills opened this issue Mar 19, 2021 · 4 comments
Open

make uninstall leaves artefacts in standard locations #1501

clanmills opened this issue Mar 19, 2021 · 4 comments
Labels
Milestone

Comments

@clanmills
Copy link
Collaborator

clanmills commented Mar 19, 2021

Discovered while working on #1500 (messages from $ sudo make uninstall) Uninstall on macOS:

# manually clean the standard location 
$ (cd /usr/local ; find . -name "*exiv2*" -depth | xargs sudo rm -rf )
$ (cd /usr/local ; find . -name "*exiv2*")
# install
$ sudo make install 2>&1 >/dev/null ; (cd /usr/local ; find . -name "*exiv2*" -depth)
./bin/exiv2json
./bin/exiv2
./include/exiv2/exiv2lib_export.h
./include/exiv2/xmp_exiv2.hpp
./include/exiv2/exiv2.hpp
./include/exiv2
./lib/libexiv2-xmp.a
./lib/pkgconfig/exiv2.pc
./lib/libexiv2.27.dylib
./lib/cmake/exiv2/exiv2Config-noconfig.cmake
./lib/cmake/exiv2/exiv2ConfigVersion.cmake
./lib/cmake/exiv2/exiv2Config.cmake
./lib/cmake/exiv2
./lib/libexiv2.dylib
./lib/libexiv2.0.27.4.10.dylib
./share/man/man1/exiv2.1
./share/locale/sk/LC_MESSAGES/exiv2.mo
./share/locale/ug/LC_MESSAGES/exiv2.mo
./share/locale/pl/LC_MESSAGES/exiv2.mo
./share/locale/vi/LC_MESSAGES/exiv2.mo
./share/locale/sv/LC_MESSAGES/exiv2.mo
./share/locale/ms/LC_MESSAGES/exiv2.mo
./share/locale/ca/LC_MESSAGES/exiv2.mo
./share/locale/ru/LC_MESSAGES/exiv2.mo
./share/locale/pt/LC_MESSAGES/exiv2.mo
./share/locale/uk/LC_MESSAGES/exiv2.mo
./share/locale/bs/LC_MESSAGES/exiv2.mo
./share/locale/gl/LC_MESSAGES/exiv2.mo
./share/locale/nl/LC_MESSAGES/exiv2.mo
./share/locale/de/LC_MESSAGES/exiv2.mo
./share/locale/fi/LC_MESSAGES/exiv2.mo
./share/locale/fr/LC_MESSAGES/exiv2.mo
./share/locale/es/LC_MESSAGES/exiv2.mo
$ sudo make uninstall ; (cd /usr/local ; find . -name "*exiv2*" -depth)
./include/exiv2
./lib/libexiv2.27.dylib
./lib/cmake/exiv2
./lib/libexiv2.dylib

There should be nothing!

We are leaving behind 2 dangling symlinks and 2 empty directories.

501 rmills@rmillsm1:/usr/local $ find . -name "*exiv2*"
./include/exiv2
./lib/libexiv2.27.dylib
./lib/cmake/exiv2
./lib/libexiv2.dylib
502 rmills@rmillsm1:/usr/local $ find . -name "*exiv2*" | xargs ls -alt
lrwxr-xr-x  1 root  admin  17 19 Mar 10:30 ./lib/libexiv2.dylib -> libexiv2.27.dylib
lrwxr-xr-x  1 root  admin  24 19 Mar 10:30 ./lib/libexiv2.27.dylib -> libexiv2.0.27.4.10.dylib

./lib/cmake/exiv2:
total 0
drwxr-xr-x  2 root  wheel   64 19 Mar 10:30 .
drwxr-xr-x  7 root  wheel  224 19 Mar 10:30 ..

./include/exiv2:
total 0
drwxr-xr-x     2 root    admin     64 19 Mar 10:30 .
drwxr-xr-x@ 1275 rmills  admin  40800 19 Mar 10:30 ..
503 rmills@rmillsm1:/usr/local $ 
@clanmills clanmills added this to the v0.27.4 milestone Mar 19, 2021
kmilos added a commit that referenced this issue Mar 19, 2021
@kmilos
Copy link
Collaborator

kmilos commented Mar 19, 2021

The previous commit and b92002b should take care of the symlinks now, taken from the Cmake FAQ.

That leaves empty directories only, and it's not only the ones w/ "exiv2" in the name, but all:

$ cd /opt/exiv2-test && find .
.
./bin
./include
./include/exiv2
./lib
./lib/cmake
./lib/cmake/exiv2
./lib/pkgconfig
./share
./share/man
./share/man/man1

Obviously, it would be safe to remove only the two "*/exiv2" ones without checking.

No idea how to handle those w/ cmake...

@clanmills
Copy link
Collaborator Author

Good Job, @kmilos. dangling symlinks are gone. As you say, empty directories remain. It's totally OK to leave /standard/location/bin include lib cmake pkgconfig share - as they are infrastructure. Don't think about them.

We should be removing lib/cmake/exiv2 and include/exiv2. macOS hasn't populated pkgconfig.

Life isn't perfect. Life goes on! We'll nail it for RC2.

835 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ (cd /usr/local ; find . -name "*exiv2*" -depth | xargs sudo rm -rf )
836 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ (cd /usr/local ; find . -name "*exiv2*")
837 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ (make && sudo make install) 2>&1 >/dev/null
838 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ (cd /usr/local ; find . -name "*exiv2*")
./bin/exiv2json
./bin/exiv2
./include/exiv2
./include/exiv2/exiv2lib_export.h
./include/exiv2/xmp_exiv2.hpp
./include/exiv2/exiv2.hpp
./lib/libexiv2-xmp.a
./lib/pkgconfig/exiv2.pc
./lib/libexiv2.27.dylib
./lib/cmake/exiv2
./lib/cmake/exiv2/exiv2Config-noconfig.cmake
./lib/cmake/exiv2/exiv2ConfigVersion.cmake
./lib/cmake/exiv2/exiv2Config.cmake
./lib/libexiv2.dylib
./lib/libexiv2.0.27.4.1.dylib
./share/man/man1/exiv2.1
./share/locale/sk/LC_MESSAGES/exiv2.mo
./share/locale/ug/LC_MESSAGES/exiv2.mo
./share/locale/pl/LC_MESSAGES/exiv2.mo
./share/locale/vi/LC_MESSAGES/exiv2.mo
./share/locale/sv/LC_MESSAGES/exiv2.mo
./share/locale/ms/LC_MESSAGES/exiv2.mo
./share/locale/ca/LC_MESSAGES/exiv2.mo
./share/locale/ru/LC_MESSAGES/exiv2.mo
./share/locale/pt/LC_MESSAGES/exiv2.mo
./share/locale/uk/LC_MESSAGES/exiv2.mo
./share/locale/bs/LC_MESSAGES/exiv2.mo
./share/locale/gl/LC_MESSAGES/exiv2.mo
./share/locale/nl/LC_MESSAGES/exiv2.mo
./share/locale/de/LC_MESSAGES/exiv2.mo
./share/locale/fi/LC_MESSAGES/exiv2.mo
./share/locale/fr/LC_MESSAGES/exiv2.mo
./share/locale/es/LC_MESSAGES/exiv2.mo
839 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ sudo make uninstall 2>&1 >/dev/null
840 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ (cd /usr/local ; find . -name "*exiv2*" | xargs ls -alt)
./lib/cmake/exiv2:
total 0
drwxr-xr-x  2 root    wheel   64 19 Mar 16:38 .
drwxr-xr-x  4 rmills  wheel  128 19 Mar 16:37 ..

./include/exiv2:
total 0
drwxr-xr-x    2 root      admin    64 19 Mar 16:38 .
drwxrwxr-x  106 piponazo  admin  3392 19 Mar 16:37 ..
841 rmills@rmillsmm-local:~/gnu/github/exiv2/0.27-maintenance/build $ 

@clanmills
Copy link
Collaborator Author

There are artefacts not being removed in the Visual Studio msvc when we run:

> cmake --build . --target uninstall

Lots of empty directories. It's leaving a 7mb exiv2.dll in the bin.

It does an impressive job of removing the header files. Something to investigate for RC2.

@clanmills clanmills self-assigned this Mar 23, 2021
@clanmills
Copy link
Collaborator Author

I'm going to punt this to v1.00. Exiv2 v0.27.4 is better than previous releases. We'll get this right for v1.00.

@clanmills clanmills modified the milestones: v0.27.4, v1.00 Apr 2, 2021
@clanmills clanmills removed their assignment Apr 19, 2021
@kevinbackhouse kevinbackhouse modified the milestones: v0.28.0, Backlog Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants