[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: custom package error: dpkg -P tries to remove /opt



"Roberto C. Sanchez" <roberto@familiasanchez.net> writes:

> Mike Fogel wrote:
>> $ dpkg -P custom-package
>>  ... removal goes perfectly until this error/warning....
>> dpkg - warning: while removing custom-package, unable to remove
>> directory `/opt': Device or resource busy - directory may be a mount
>> point ?
>> 

> Hello Mike,
>
> This question is really more appropriate for debian-user.  However, the
> message you see from dpkg is just that, a warning.  Whenever a Debian
> package is removed and there are no packages left with files in a
> particular directory, dpkg tries to remove the directory.  Of course, it
> doesn't do an rm -rf (thankfully), so directories that are still
> populated can't be removed.  You see this, for example when removing a
> kernel-image package after you have added your own modules that are not
> part of a package under the control of dpkg.
>
> Anyhow, the warning is relatively harmless and can be safely ignored.
>
> (I hope that all of this is correct.  If I messed somethig up, someone
> please let me know.)
>
> -Roberto

You are more (theoreticaly) or less (practicaly) correct. Dpkg tries
to remove dirs when nothing in /var/lib/dpkg/info/*.list contains it
anymore. But dpkg also sometimes removes dirs from *.list on remove
(not purge) while the package still has conffiles in there (leading to
the 'dir not empty' warnings).

The bigger question is: Why is no package containing /opt? Shouldn't
that be in base-files like all the other core dirs?

MfG
        Goswin



Reply to: