RPM Community Forums

Mailing List Message of <rpm-users>

Re: error: unpacking of archive failed on file /: cpio: chown failed - No such file or directory

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 16 Dec 2009 - 17:54:05 CET
Message-id: <9E86E9E9-26A6-48D2-80FF-2E968BB03102@mac.com>

On Dec 16, 2009, at 11:44 AM, Jeff Johnson wrote:
> 
> Index: iosm.c
> ===================================================================
> RCS file: /v/rpm/cvs/rpm/rpmio/iosm.c,v
> retrieving revision 1.38.2.2
> diff -p -u -w -r1.38.2.2 iosm.c
> --- iosm.c	22 May 2009 17:57:28 -0000	1.38.2.2
> +++ iosm.c	16 Dec 2009 16:40:47 -0000
> @@ -2427,6 +2427,8 @@ if (!(fi->mapflags & IOSM_PAYLOAD_EXTRAC
>  	    rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
>  		iosm->path, (int)st->st_uid, (int)st->st_gid,
>  		(rc < 0 ? strerror(errno) : ""));
> +	if (rc < 0 && (errno == EINVAL || errno == ENOSYS))
> +	    rc = 0;
>  	if (rc < 0)	rc = IOSMERR_CHOWN_FAILED;
>  	break;
>      case IOSM_LCHOWN:
> 

That should have been ENOENT not EINVAL, but filtering is dirt simple.

The errno's ENOENT and ENOSYS are highly unlikely to be encountered
in with usual chown(2) calls.

I'd rather _NOT_ carry this filtering in RPM because the filtering
is largely a hack-o-round for a deeper flaw in QNX. Masking the
error will only delay getting a real fix into QNX.

The problem appears limited to FAT16 file systems, which makes
it impossible to write a proper AutoFu build configuration test.

But if you insist, I can add the errno filtering under a
	#if defined(__QNX__)

73 de Jeff
Received on Wed Dec 16 17:54:33 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.