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:44:18 CET
Message-id: <0FF33918-CC1B-4E6F-890D-B5DF6CEF63ED@mac.com>

On Dec 16, 2009, at 11:30 AM, Manoj Palhade wrote:

> Dear RPM Team,
> 
>  I installed RPM binaries on QNX. QNX is running on Hardware with SD-Card. I tried to install RPM Package but I a getting following error mentioned in subject i.e. (error: unpacking of archive failed on file /: cpio: chown failed - No such file or directory).
> 
>  Preparing...                ########################################### [100%]
> 
>    1:Story                  ########################################### [100%]
> 
> error: unpacking of archive failed on file /: cpio: chown failed - No such file or directory
> 
>  
> I applied Patch (rpm-5.1.7_rpmio_rpmrpc.c.patch) given by Mr. Michael Baudisch in community discussions “RPM running on FAT16-formatted systems”( http://rpm5.org/community/rpm-devel/3472.html) because previous to this error I was getting following error.
> 
>  Preparing...                       ########################################### [100%]
> 
> 1:GrosseDatei_kaum_packba########################################### [100%]
> 
> error: unpacking of archive failed on file /: cpio: chown failed - Function not implemented
> 
>  
> Is there any way to resolve this error? Is this issue is because of FAT16-formatted systems. If yes then please let me know how I can fix this issue.
> 
>  

Sure there's a way to resolve. However the best
fix is to get chmod(2) in QNX fixed. RPM is not
the right place for a busted system call.

Meanwhile this dinky patch to rpmio/iosm.c ignores
either of the two errno's being returned on FAT16
file systems:

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:


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