On Tue, 2006-05-09 at 22:04, Peter Tribble wrote:
> > oh and the longest filename in s10 seems to be
> > SUNWgnome-img-editor-devel-share at 33 chars :)
>
> Well, 32 + the trailing NULL/newline.
>
> I had a feeling somewhere that 32 was the actual limit, but on checking
> the real limit seems to be 64. (See /usr/include/pkgstrct.h.) Back
> in Solaris 7 the limits were very much smaller!
>
> I sniff a possible bug here, but haven't enough machines to
> check fully. Try:
>
> pkginfo -l SUNWgnome-img-editor-devel-share
>
> Now, on my sparc boxes (both S10 and nevada) this works correctly;
> on my test x86 machine (running patched S10U1 - so as far as I
> know it's got the same patches as the S10 sparc boxes I tested)
> completely misses the files and only says:
>
> FILES: 1 installed pathnames
>
> unfortunately I haven't got a proper nevada x86 machine (although
> I did try with pkg binaries and libraries I built from source and
> those didn't work either).
Yup. That's a bug. I've filed it, not got a number yet.
The problem is in pkginfo.c:
static struct cfstat {
char pkginst[32];
isn't long enough. My suggested fix is:
*** pkginfo.c.orig Fri Mar 31 15:38:48 2006
--- pkginfo.c Wed May 10 11:50:24 2006
***************
*** 112,118 ****
static char *ckarch = NULL;
static struct cfstat {
! char pkginst[32];
short exec;
short dirs;
short link;
--- 112,118 ----
static char *ckarch = NULL;
static struct cfstat {
! char pkginst[PKGSIZ+1];
short exec;
short dirs;
short link;
Which aligns the size with the rest of the code. I'll
mail this off to request-sponsor when I get the bugid.
Actually, it doesn't work correctly on sparc; it's
giving bogus information there too, it just looks
more plausible (which is probably even worse - it's
pretty obvious that it's broken on x86).
--
-Peter Tribble
L.I.S., University of Hertfordshire - http://www.herts.ac.uk/
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/