Bug 121165 - pkg_add(1) prints a weird message: PKG_TMPDIR environment variable to a location with at least 0 bytes
Summary: pkg_add(1) prints a weird message: PKG_TMPDIR environment variable to a locat...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 03:50 UTC by yuri
Modified: 2016-12-10 15:33 UTC (History)
0 users

See Also:


Attachments
bin.121165.diff (6.50 KB, patch)
2010-03-21 23:35 UTC, Garrett Cooper
no flags Details | Diff
bin.121165.diff (6.52 KB, patch)
2010-03-22 09:37 UTC, Garrett Cooper
no flags Details | Diff
bin.121165.diff (5.99 KB, patch)
2010-03-24 07:06 UTC, Garrett Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yuri 2008-02-28 03:50:02 UTC
My machine is low on space.
And I got this weird message below.
What is find_play_pen?
Why 0 bytes?

==== message ====
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-current/Latest/kde.tbz...pkg_add: find_play_pen: can't find enough temporary space to extract the files, please set your
PKG_TMPDIR environment variable to a location with at least 0 bytes
free
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2008-02-28 06:44:41 UTC
State Changed
From-To: open->closed

This is not a PR this is a question to begin with. You clearly have 
limited space available and pkg_add tells you that it cannot extract the 
file in the temporary directory. find_play_pen probably is a function 
that does the extraction. Why the 0 bytes i dont know, but better -ask- 
around first before submitting these kind of PRs.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2008-02-28 23:01:43 UTC
State Changed
From-To: closed->open

From an exchange on freebsd-bugs: 

Kris Kennaway wrote: 

Comment 3 Garrett Cooper 2010-03-21 23:35:58 UTC
    Patch under test attached; will test and produce tests if
successful. This proposed change does the following:

1. Tacks on the application name that failed in an effort to provide
improved logging; this is limited to lib/pen.c for the time being, but
can and should be easily extended to other areas using variadic
macros.
2. Prevents a potential failure with realpath(3) in pkg_add(1).

Cheers,
-Garrett
Comment 4 Garrett Cooper 2010-03-22 09:37:06 UTC
    Functions as expected provided test added in
http://p4web.freebsd.org/chv.cgi?CH=175930 ; I'm just making one minor
style change from the previous patch so that errx(3) in find_play_pen
exits with EXIT_FAILURE instead of 2 (I agree that EXIT_FAILURE is
synonymous to 2, but for it's more readable and consistent as
EXIT_FAILURE).
Thanks,
-Garrett
Comment 5 Garrett Cooper 2010-03-24 07:06:09 UTC
    Apparently the compiler missed the missing format qualifier after
the `stack overflow' format string modification because
-Wno-format-strings is specified in the default system CFLAGS (not
sure where but it's being set in /usr/share/mk...). Sorry for the
noise -- here's a correct patch -- I also removed an unneeded newline
in an err(3) call.
Thanks,
-Garrett
Comment 6 Baptiste Daroussin freebsd_committer freebsd_triage 2016-12-10 15:33:25 UTC
pkg_ is not supported anymore