Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 2020 14:05:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        pkg@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 249374] ports-mgmt/pkg: 1.15.4 cannot unroll hard links to copies, and still runs pkg-install after error
Message-ID:  <bug-249374-32340-4OYwvuKbUz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-249374-32340@https.bugs.freebsd.org/bugzilla/>
References:  <bug-249374-32340@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody)
<pkg@FreeBSD.org> for maintainer-feedback:
Bug 249374: ports-mgmt/pkg: 1.15.4 cannot unroll hard links to copies, and
still runs pkg-install after error
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249374



--- Description ---
Presume I have hardlinked files in my $STAGEDIR, say, sbin/example and
usr/local/sbin/example.

I can package them into the tarball (examplepkg-1.2.3_4,5.txz), and tar xvf
properly shows them as "link to".

Installing the package however can fail with "cross-device link" errors.

pkg should copy the file in that case. We can't make a global decision as to
where and how a package user will split their file systems, so we need to
prepare for unexpected device crossings.

also, in that situation, pkg then removes all files, but still tries to run
POST-INSTALL, which it should not.

The port shown to error as given below is not committed to any trees yet:

=3D=3D=3D>  Installing for e2fsprogs-1.45.6_4
=3D=3D=3D>  Checking if e2fsprogs is already installed
=3D=3D=3D>  Switching to root credentials for 'install' target
=3D=3D=3D>   Registering installation for e2fsprogs-1.45.6_4
Installing e2fsprogs-1.45.6_4...
pkg-static: Fail to create hardlink:
/usr/local/sbin/.pkgtemp.e2fsck.S4cGKN1JKu2i:Cross-device link
cp: /usr/local/etc/mke2fs.conf.dist: No such file or directory
pkg-static: POST-INSTALL script failed
*** Error code 70



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-249374-32340-4OYwvuKbUz>