• Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category tools → pkgutils
  • Assigned To
    frinnst
  • Operating System Linux
  • Severity Medium
  • Priority Very Low
  • Reported Version 2.6
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: CRUX
Opened by K.Mandla - 13.08.2010
Last edited by frinnst - 19.09.2017

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

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. ;)

Closed by  frinnst
19.09.2017 22:08
Reason for closing:  Implemented
Additional comments about closing:  commit a11b0048057f80b7a8a936b8f56be9f2fd121e7e

pending release

The same holds true if the destination can't be written to, because it's mounted read-only.

Cheers, deepthought

fun commented on 18.06.2017 09:48

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 $?

fun commented on 18.06.2017 09:55

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.

fun commented on 18.06.2017 11:57

Attached a patch that seems to fix this issue.

   0001-pkgadd-avoid-fake-instal... (3.6 KiB)
fun commented on 16.07.2017 12:33

Somehow, probably when flyspray was restored, the patch was lost. Added again.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing