Ticket #3623 (closed defect: fixed)
Opened 5 years ago
Last modified 4 years ago
'make uninstall' does not clean out all empty installation directories
| Reported by: | Nick Morrott <knowledgejunkie [at] gmail [dot] com> | Owned by: | nigel |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.21 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | make uninstall |
| Cc: | Ticket locked: | no |
Description
After dispensing advice on -users about using 'make uninstall' to remove a locally compiled and installed MythTV installation, I thought I'd better test the functionality and check whether it does clean everything up that did not exist before, bar user-generated files.
The results are as follows (after running 'make uninstall' for myththemes, mythplugins and mythtv in that order i.e. reverse of installation order):
# ls -l /usr/local/bin/myth* ls: /usr/local/bin/myth*: No such file or directory # ls -l /usr/local/lib/libmyth* ls: /usr/local/lib/libmyth*: No such file or directory # ls -l /usr/local/lib/mythtv/ total 0 # ls -l /usr/local/include/mythtv/ total 0 # ls -lR /usr/local/share/mythtv/ /usr/local/share/mythtv/: total 8 drwxr-xr-x 2 root root 4096 Jun 16 08:10 mytharchive drwxr-xr-x 2 root root 4096 Jun 16 08:10 mythvideo /usr/local/share/mythtv/mytharchive: total 0 /usr/local/share/mythtv/mythvideo: total 0
From this process it therefore seems that the following directories are not being removed:
/usr/local/share/mythtv/mytharchive /usr/local/share/mythtv/mythvideo /usr/local/share/mythtv /usr/local/include/mythtv /usr/local/lib/mythtv
Is this something that needs to be addressed? I can attempt a suitable patch if it is.
Nick
Attachments
Change History
comment:1 Changed 4 years ago by stuartm
- Owner changed from ijr to stuartm
- Status changed from new to assigned
- Milestone changed from unknown to 0.21
comment:4 Changed 4 years ago by nigel
- Status changed from assigned to accepted
This isn't a huge problem - running make ununstall a second time should work around the bug, but it should be fixable. There are two things happening here. 1) some directories may not be empty when uninstall is trying to remove them. e.g.:
$ sudo make uninstall 2>&1 | egrep 'rmdir.*include' rmdir "/usr/include/mythtv/ffmpeg/" rmdir: /usr/include/mythtv/ffmpeg/: No such file or directory rmdir "/usr/include/mythtv/ffmpeg/" rmdir: /usr/include/mythtv/ffmpeg/: No such file or directory rmdir "/usr/include/mythtv/ffmpeg/" rmdir: /usr/include/mythtv/ffmpeg/: No such file or directory rmdir "/usr/include/mythtv/" rmdir: /usr/include/mythtv/: Directory not empty rmdir "/usr/include/mythtv/mpeg2dec/" rmdir: /usr/include/mythtv/mpeg2dec/: No such file or directory rmdir "/usr/include/mythtv/dvdnav/" rmdir: /usr/include/mythtv/dvdnav/: No such file or directory rmdir "/usr/include/mythtv/upnp/" rmdir: /usr/include/mythtv/upnp/: No such file or directory rmdir "/usr/include/mythtv/libmythui/" rmdir: /usr/include/mythtv/libmythui/: No such file or directory rmdir "/usr/include/mythtv/" rmdir: /usr/include/mythtv/: Directory not empty rmdir "/usr/include/mythtv/" rmdir: /usr/include/mythtv/: Directory not empty rmdir "/usr/include/mythtv/libmythtv/" rmdir: /usr/include/mythtv/libmythtv/: No such file or directory $ ls /usr/include/mythtv libmyth
(I will try to fix that extra libmyth dir soon - it is related to [15545])
2) sequencing. qmake is installing and uninstalling in the same order, which means that the Makefile in the subdir that creates and removes the top-level installed dir is called too early. I will try to add extra rmdir commands to the uninstall targets in libs.pro
