According to
/usr.sbin/pkg_add/OpenBSD/Temp.pm

If  PKG_TMPDIR is not set, it uses OpenBSD::Paths->vartmp
>our $tempbase = $ENV{'PKG_TMPDIR'} || OpenBSD::Paths->vartmp;

And according to
/usr.sbin/pkg_add/OpenBSD/Paths.pm

Default value is "/var/tmp".
>sub vartmp() { '/var/tmp' }

It seems that pkg_add works for /tmp, but not for /var/tmp.

Lets make sure that
# PKG_TMPDIR=/var/tmp/ pkg_add -r -vvv curl
fails, and we will have 100% guarantee that it is /var/tmp problem.

Do you have enough space in "/var"? Try to fsck -f this partition.

On Tue, Apr 17, 2018 at 5:28 PM, Michael Maurer <[email protected]>
wrote:

> On 17 April 2018 at 14:13, IL Ka <[email protected]> wrote:
> > So, does it work only with PKG_TMPDIR set?
> >
> > # PKG_TMPDIR=/tmp/foo pkg_add -r -vvv curl
> > (-r is used to replace old package)
> >
> > Could it be your harddrive or filesystem problem?
> > Try to fsck partition where pkg_add stores packages.
> >
> > If you are able to download file by wget, you can install it using
> pkg_add
> > by providing path to this file.
>
> Yeah, seems like it's related to PKG_TMPDIR. Everything I need is
> installed now, the only
> thing I fear is that this will bite me during the next upgrade. (fsck
> doesn't generate errors)
>

Reply via email to