Subject: Re: pkg/36841: emulators/netbsd32_compat30-extras installation errors
To: None <jlam@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,>
From: Johnny C. Lam <jlam@pkgsrc.org>
List: pkgsrc-bugs
Date: 08/27/2007 21:45:02
The following reply was made to PR pkg/36841; it has been noted by GNATS.

From: "Johnny C. Lam" <jlam@pkgsrc.org>
To: gnats-bugs@NetBSD.org
Cc: pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36841: emulators/netbsd32_compat30-extras installation errors
Date: Mon, 27 Aug 2007 21:41:01 +0000

 On Sun, Aug 26, 2007 at 08:50:00AM +0000, juan@xtrarom.org wrote:
 > 
 > 	I wanted to install the new netbsd32_compat30 pkg, but
 > 	netbsd32_compat30-extras installation is incomplete...
 > 	here's the full build log. Let me know if you need something more.
 > 
 [snip]
 > => Registering installation for netbsd32_compat30-extras
 > pkg_admin: netbsd32_compat30-extras: File `/usr/pkg/emul/netbsd32/usr/lib/libm387.so' is in +CONTENTS but not on filesystem!
 > pkg_admin: netbsd32_compat30-extras: File `/usr/pkg/emul/netbsd32/usr/lib/libm387.so.0' is in +CONTENTS but not on filesystem!
 > pkg_admin: netbsd32_compat30-extras: File `/usr/pkg/emul/netbsd32/usr/lib/libm387.so.0.0' is in +CONTENTS but not on filesystem!
 [snip]
 > => Checking file-check results for netbsd32_compat30-extras
 > => Checking file permissions in netbsd32_compat30-extras
 > warning: /usr/pkg/emul/netbsd32/usr/libexec/ld.so: executable bit is set on non-executable file.
 > 0 errors and 1 warnings.
 > => Checking for work-directory references in netbsd32_compat30-extras
 > => Dropping ``root'' privileges.
 
 I saw this too with some other packages, and I felt it was okay.
 These are due to a bug in pkg_admin because, for example, in your
 output above, the symlink:
 
     /usr/pkg/emul/netbsd32/usr/lib/libm387.so
 
 definitely exists on the filesystem.  It just happens that it's an
 "emul" symlink, which points to "/lib/libm387.so", which gets mapped
 to /usr/pkg/emul/netbsd/lib/libm387.so by the COMPAT_NETBSD32 emulation
 code.  Unfortunately, pkg_admin tries to verify the existence of the
 target of the symlink instead of the existence of the symlink itself,
 and when it doesn't see "/lib/libm387.so", which shouldn't exist on
 your amd64 system, it spouts that warning.
 
 We can do one of the following:
 
     (1) Leave the warning, which doesn't break anything.
     (2) Teach pkg_admin not to follow symlinks.
     (3) Ignore the output of pkg_admin.
 
 I would like to do (2), and maybe change that warning to say:
 
     pkg_admin: Target of symlink "/usr/pkg/emul/netbsd32/foo" may not exist.
 
 so that the warning doesn't sound quite so alarming.
 
 	Thoughts?
 
 	-- Johnny Lam <jlam@pkgsrc.org>