Do not add package to world if it fails to install due to file ownership conflicts
Seems like package gets added to world even if install fails due to file ownership conflicts. When trying to remove the conflicting package it tries to install the failed package:
ncopa-desktop:~/src/libvirt$ sudo apk add portablexdr-rpcgen
(1/1) Installing portablexdr-rpcgen (4.9.1-r1)
ERROR: portablexdr-rpcgen: Trying to overwrite usr/bin/rpcgen owned by rpcgen.
ERROR: http://nl.alpinelinux.org/alpine/edge/testing/x86_64/portablexdr-rpcgen-4.9.1-r1.apk: Operation not permitted
ncopa-desktop:~/src/libvirt$ sudo apk del rpcgen
(1/2) Installing portablexdr-rpcgen (4.9.1-r1)
ERROR: portablexdr-rpcgen: Trying to overwrite usr/bin/rpcgen owned by rpcgen.
ERROR: http://nl.alpinelinux.org/alpine/edge/testing/x86_64/portablexdr-rpcgen-4.9.1-r1.apk: Operation not permitted
To work around this i have to remove the failed package first, and then remove install it again.
ncopa-desktop:~/src/libvirt$ sudo apk del portablexdr-rpcgen
(1/1) Purging rpcgen (1.2.6-r0)
Executing busybox-1.20.2-r3.trigger
OK: 2890 MiB in 1052 packages
ncopa-desktop:~/src/libvirt$ sudo apk add portablexdr-rpcgen
(1/1) Installing portablexdr-rpcgen (4.9.1-r1)
Executing busybox-1.20.2-r3.trigger
OK: 2890 MiB in 1053 packages
I think the package should be removed if it fails to install in first place, but I’m open for discussion.
(from redmine: issue id 1482, created on 2012-11-28, closed on 2013-10-12)
- Changesets:
- Revision 7e183987 by Timo Teräs on 2013-06-20T12:12:44Z:
commit, db: make file conflicts and script errors non-fatal
fixes #1482