|
|
如何在移除deb包时,不去移除系统原有的文件?
比如gati-cts_1.0_all.deb是我自己做的一个包,会将一个文件放到tomcat里
#dpkg -c gati-cts_1.0_all.deb
drwxrwxr-x root/root 0 2007-04-25 19:58 ./usr/
drwxrwxr-x root/root 0 2007-04-25 19:58 ./usr/local/
drwxrwxr-x root/root 0 2007-04-25 19:58 ./usr/local/apache-tomcat-5.5.17/
drwxrwxr-x root/root 0 2007-04-25 19:58 ./usr/local/apache-tomcat-5.5.17/webapps/
-rwxr-xr-x root/root 17351054 2007-04-25 19:58 ./usr/local/apache-tomcat-5.5.17/webapps/TestResultMonitorWS.war
而移除该包的时候,系统总会尝试去移除整个tomcat目录,然后给出警告说目录不为空,无法删除.
# aptitude remove gati-cts
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following packages will be REMOVED:
gati-cts
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 10.2MB will be freed.
Writing extended state information... Done
(Reading database ... 121599 files and directories currently installed.)
Removing gati-cts ...
dpkg - warning: while removing gati-cts, directory `/usr/local/apache-tomcat-5.5.17/webapps' not empty so not removed.
dpkg - warning: while removing gati-cts, directory `/usr/local/apache-tomcat-5.5.17' not empty so not removed.
dpkg - warning: while removing gati-cts, directory `/usr/local' not empty so not removed.
dpkg - warning: while removing gati-cts, directory `/var/log/gati' not empty so not removed.
dpkg - warning: while removing gati-cts, directory `/opt/gati/bin' not empty so not removed.
dpkg - warning: while removing gati-cts, directory `/opt/gati' not empty so not removed.
怎样才能只移除特定文件,或者不显示警告信息,谢谢 |
|