pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/38488: "pkg_install" package shouldn't use Mac OS X Leopard's warnx(3)



>Number:         38488
>Category:       pkg
>Synopsis:       "pkg_install" package shouldn't use Mac OS X Leopard's warnx(3)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 23 08:50:00 +0000 2008
>Originator:     Matthias Scheler
>Release:        Darwin 9.2.2
>Organization:
Matthias Scheler                                  http://zhadum.org.uk/
>Environment:
System: Darwin excalibur.zhadum.org.uk 9.2.2 Darwin Kernel Version 9.2.2: Tue 
Mar  4 21:23:43 PST 2008; root:xnu-1228.4.31~1/RELEASE_PPC Power Macintosh
Architecture: powerpc
Machine: Power Macintosh
>Description:
"pkg_install" uses warnx(3) a lot the problem is that it behaves differently
under Mac OS X Leopard:

tron@excalibur:~>cat tt.c

#include <err.h>
#include <stdlib.h>

int
main(int argc, char **argv)
{
        warnx("It is all Joerg's fault.\n");
        return EXIT_SUCCESS;
}
tron@excalibur:~>uname -sr
Darwin 9.2.2
tron@excalibur:~>gcc tt.c -Wall -O2 -o tt 
tron@excalibur:~>./tt
tt: It is all Joerg's fault.\n
tron@excalibur:~>

tron@colwyn:~>uname -sr
NetBSD 4.0_STABLE
tron@colwyn:~>gcc tt.c -Wall -O2 -o tt 
tron@colwyn:~>./tt
tt: It is all Joerg's fault.

tron@colwyn:~>

It seems that we should ignore warnx(3) and friends under Mac OS X and
use the version from "libnbcompat".

>How-To-Repeat:
Install a package, put an extra file in one of the directories it created
and delete it with "pkg_install" afterwards. The error message that
"pkg_delete" prints will contain the string "\n".

>Fix:
Don't use warnx(3) under Mac OS X Leopard.



Home | Main Index | Thread Index | Old Index