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

Re: dpkg: error while cleaning up

Le lundi 05 novembre 2007 à 15:20 +0100, BRIAND, Michel M a écrit :
> Hi,
> I've built dpkg on Solaris, to use it as a normal user (not-root).
> I keep having some troubles with this message during installation 
> of hand-made packages (hand made software+dh_make+dpkg-buildpackage) :
> dpkg: error while cleaning up:
>  failed to delete `/my/install/dir/var/dpkg/tmp.ci': File exists
> Installation complete but with this error.
> Should I say that I have complete ownership of /my/install/dir...?...
> Someone can point me to somewhere in the code to fix this ?
> Best regards,
> Michel

Reply to myself...

Here are the occurences of ENOTEMPTY :

src/help.c:511:  if (errno != ENOTEMPTY) { /* Huh ? */
src/remove.c:251:      if (errno == ENOTEMPTY) {
src/remove.c:366:    if (errno == ENOTEMPTY) {

On Solaris rmdir returns EEXIST in this case.

Here we can see that the two values are permitted :

So I added :

if (errno == EEXIST)
	  errno = ENOTEMPTY;

before each occurence.

And it works.

Any comment ?


This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.

Reply to: