LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 659|回复: 1

如何在移除deb包时,不去移除系统原有的文件?

[复制链接]
发表于 2007-4-25 20:28:18 | 显示全部楼层 |阅读模式
如何在移除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.

怎样才能只移除特定文件,或者不显示警告信息,谢谢
发表于 2007-4-26 09:05:33 | 显示全部楼层
它就没有删除其它包的文件啊。。。

不显示警告用什么什么参数
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表