MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012542 | CMake | CPack | public | 2011-10-27 09:32 | 2011-10-27 11:41 |
|
Reporter | Alex Neundorf | |
Assigned To | Eric NOULARD | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | |
Platform | | OS | | OS Version | |
Product Version | CMake 2.8.6 | |
Target Version | | Fixed in Version | | |
|
Summary | 0012542: Uninstalling a cpack-generated rpm leaves empty directories behind |
Description | We are using cpack to generate rpms for our package.
When such a rpm is uninstalled later on, the files are removed, but empty directories are left behind.
It would be nice if those would be removed too.
One way could be to collect all installed directories, and put them with %dir in the spec file.
But, AFAIK, not all those directories should be removed when uninstalling the package, e.g. /usr/local/bin should not be removed.
One way to do this would be to filter the obtained list of directories against a set of known directories (e.g. from CMAKE_PREFIX_PATH), so that /usr, /usr/local, and their bin, include and lib directories are filtered out.
This could be extended by an additional variable e.g. in Modules/Platforms/UnixPaths.cmake like CMAKE_OTHER_STANDARD_PATHS which could contain e.g. shared/, doc/ etc.
Alex
|
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0009654 | closed | Eric NOULARD | [CPackRPM] %files section in spec file shall not contain all directories | related to | 0012305 | closed | Eric NOULARD | RPM should include directories |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2011-10-27 09:32 | Alex Neundorf | New Issue | |
2011-10-27 09:32 | Alex Neundorf | Status | new => assigned |
2011-10-27 09:32 | Alex Neundorf | Assigned To | => Eric NOULARD |
2011-10-27 09:33 | Alex Neundorf | Relationship added | related to 0009654 |
2011-10-27 09:52 | Eric NOULARD | Note Added: 0027660 | |
2011-10-27 09:52 | Eric NOULARD | Relationship added | related to 0012305 |
2011-10-27 09:56 | Eric NOULARD | Note Added: 0027661 | |
2011-10-27 10:39 | Alex Neundorf | Note Added: 0027662 | |
2011-10-27 11:41 | Alex Neundorf | Note Added: 0027663 | |
2011-10-27 11:41 | Alex Neundorf | Status | assigned => closed |
2011-10-27 11:41 | Alex Neundorf | Resolution | open => no change required |
Notes |
|
(0027660)
|
Eric NOULARD
|
2011-10-27 09:52
|
|
Hi Alex,
This include or not include dir is somehow popping-up again
in various direction each time...
See 0012305
May be you have ready-to-run test case for that? |
|
|
(0027661)
|
Eric NOULARD
|
2011-10-27 09:56
|
|
Alex,
Reading the referred bug makes me think that rpm command should remove
a directory when no installed packaged are refering to the dir.
Reading your report makes me think the other way around...
Thus my previous comment: do you have a simple test case at hand?
Could give me more info on the distro you use (Fedora, CentOS, OpenSuSE ???)
and what is the rpm version installed on the distro.
$ rpmbuild --version
should give you the answer. |
|
|
(0027662)
|
Alex Neundorf
|
2011-10-27 10:39
|
|
Tested on OpenSUSE 11.4 (rpm 4.8.0), SLES 10 (rpm 4.4.2), Scientific Linux 6 (rpm 4.8.0) and Centos 5.6 (rpm 4.4.2.3), the empty directories stay on all 4 systems.
I just saw in your other bug report that there may be a change with cmake 2.8.6, this was still with 2.8.4.
...testing now with 2.8.6.
Alex |
|
|
(0027663)
|
Alex Neundorf
|
2011-10-27 11:41
|
|
Ok, works fine with cmake 2.8.6.
Tested on OpenSUSE 11.4 and Centos 5.6.
Empty directories are removed.
|
|