Subject: pkg/22545: pkg_install/lib/ can't handle filenames
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mezis@free.fr>
List: netbsd-bugs
Date: 08/19/2003 11:31:52
>Number: 22545
>Category: pkg
>Synopsis: pkg_install/lib/ can't handle filenames
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Aug 19 11:32:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Julien T. Letessier
>Release: pkgsrc/Solaris
>Organization:
Solarpack project
>Environment:
SunOS shasha 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
>Description:
The call to digest is broken:
===> fake-pkg [kdelibs-2.2.2nb4] ===> Registering installation for kdelibs-2.2.2nb4
/usr/pkg/X/share/kde/config/colors/40
Colors
pkg_create: MD5File: can't read from `/usr/pkg/bin/digest md5 /usr/pkg/X/share/kde/config/colors/40 Colors': Error 0
[...]
===> real-su-package [kdelibs-2.2.2nb4] ===> Building binary package for kdelibs-2.2.2nb4
Creating package /usr/solarpkgsrc/packages/SunOS-5.8/sparc/All/kdelibs-2.2.2nb4.tgz
Using SrcDir value of /usr/pkg/X
Registering depends: bzip2>=1.0.1 cups>=1.1.14nb1 glut>=3.4.2 jpeg-6b lcms>=1.06 libaudiofile>=0.2.1 libiconv>=1.8 libxml2>=2.4.24nb1 libxslt>=1.0.20 mng>=1.0.0 openslp>=1.0.1 openssl>=0.9.6g pcre>=3.4nb1 perl>=5.0 png>=1.2.4 qt2-libs>=2.3.1nb2 tcl>=7.5 tiff>=3.5.4 xfree-[0-9]* zlib>=1.1.3.
Registering conflicts: arts-[1-9]*.
/usr/pkg/X/share/kde/config/colors/40
Colors
pkg_create: MD5File: can't read from `/usr/pkg/bin/digest md5 /usr/pkg/X/share/kde/config/colors/40 Colors': *** Error code 1
>How-To-Repeat:
Build kdelibs2 on any platform.
>Fix:
Hopefully I'll commit this one myself ;)
Index: pkg_install/lib/digest.c
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/pkg_install/lib/digest.c,v
retrieving revision 1.2
diff -r1.2 digest.c
74c74
< (void) snprintf(cmd, sizeof(cmd), "%s md5 %s", DIGEST, filename);
---
> (void) snprintf(cmd, sizeof(cmd), "%s md5 '%s'", DIGEST, filename);
>Release-Note:
>Audit-Trail:
>Unformatted: