Bug 251990 - pkg(8) doesn't print the affected filesystem (or path) name when it runs out of space
Summary: pkg(8) doesn't print the affected filesystem (or path) name when it runs out ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-20 15:22 UTC by Robert Watson
Modified: 2024-01-16 21:30 UTC (History)
2 users (show)

See Also:
linimon: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Watson freebsd_committer freebsd_triage 2020-12-20 15:22:58 UTC
The default tmpfs on my install seems to small to run the pkg command properly (this seems separately reported).  When it reports an out-of-space error, it would be useful if it reported the pathname affected, not just the API that saw the error:

> root@generic:/home/robert/cambridge-l41-aos-labs/2020-2021/Laboratories/ipc # pkg install python
> Updating FreeBSD repository catalogue...
> Fetching meta.txz: 100%    916 B   0.9kB/s    00:01    
> Fetching packagesite.txz: 100%    6 MiB   5.8MB/s    00:01    
> pkg: archive_read_extract(extract error): No space left on device
> pkg: No signature found
> Unable to update repository FreeBSD
> Error updating repositories!

Above, it would be more immediately useful to the user if the pkg error had indicated that it was /tmp that was out of space.

(This is with pkg-1.15.10 on FreeBSD-CURRENT running on aarch64 on an RPi4.)
Comment 1 Miguel Arroz 2024-01-16 21:30:07 UTC
I've hit a similar problem. Currently, the message seems less helpful than it was when Robert created this ticket. Specifically, in a similar situation (RPI with a /tmp too small), running FreeBSD 14, pkg 1.20.9, the error messages are similar to what is described in https://forums.freebsd.org/threads/error-on-pkg-update.89243/:

> Updating FreeBSD repository catalogue...
> Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
> Fetching packagesite.pkg: 100% 7 MiB 14.4kB/s 07:58
> pkg: Error extracting the archive: 'Write error'
> pkg: No signature found
> Unable to update repository FreeBSD
> Error updating repositories!

As stated in that forum thread, running with --debug doesn't add any more useful information. It took me a while to understand what the problem was, since nothing hinted the cause of the underlying problem.