CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#620 - pkgadd reports a package as installed if disk space runs out while installing a prebuilt package

Attached to Project: CRUX
Opened by K.Mandla (K.Mandla) - Friday, 13 August 2010, 00:44 GMT
Last edited by Fredrik Rinnestam (frinnst) - Tuesday, 19 September 2017, 22:08 GMT
Task Type Bug Report
Category tools → pkgutils
Status Closed
Assigned To Fredrik Rinnestam (frinnst)
Operating System Linux
Severity Medium
Priority Normal
Reported Version 2.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hello. As mentioned here:

http://crux.nu/bugs/index.php?do=details&task_id=619

prt-get, possibly because of pkgadd, thinks a package is installed if disk space runs out while installing a prebuilt package.

As discussed in the comments there, it's possible that pkgadd is reporting the package as installed even though it obviously encountered errors with disk space.

The "installed" package needs to be removed and additional space freed before it can be correctly installed.

Cheers and thanks. ;)
This task depends upon

Closed by  Fredrik Rinnestam (frinnst)
Tuesday, 19 September 2017, 22:08 GMT
Reason for closing:  Implemented
Additional comments about closing:  commit a11b0048057f80b7a8a936b8f56be9f2fd121e7e

pending release
Comment by Erich Eckner (deepthought) - Sunday, 17 April 2016, 16:03 GMT
The same holds true if the destination can't be written to, because it's mounted read-only.

Cheers, deepthought
Comment by Fun (fun) - Sunday, 18 June 2017, 09:48 GMT
Test case:

mkdir /var/cache/test{,-ro}
mkdir -p /var/cache/test/var/lib/pkg
touch /var/cache/test/var/lib/pkg/db
mount --bind -o ro /var/cache/test{,-ro}
mount --bind /var/cache/test{,-ro}/var/lib/pkg
pkgadd -r /var/cache/test-ro ...pkg ; echo $?
pkgadd -r /var/cache/test-ro ...pkg ; echo $?
Comment by Fun (fun) - Sunday, 18 June 2017, 09:55 GMT
pkgutil.cc:

if (archive_read_extract(archive, entry, flags) != ARCHIVE_OK) {
// If a file fails to install we just print an error message and
// continue trying to install the rest of the package.

Comment by Fun (fun) - Sunday, 18 June 2017, 11:57 GMT
Attached a patch that seems to fix this issue.
   0001-pkgadd-avoid-fake-instal... (3.6 KiB)
Comment by Fun (fun) - Sunday, 16 July 2017, 12:33 GMT
Somehow, probably when flyspray was restored, the patch was lost. Added again.

Loading...