Bug 105149 - devel/cdk does not install man pages: Argument list too long
Summary: devel/cdk does not install man pages: Argument list too long
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-04 17:53 UTC by Igor Roshchin
Modified: 2006-11-26 19:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Roshchin 2006-11-04 17:53:40 UTC
When trying to install the port using "portupgrade cdk" (from sources):

===>   Compressing manual pages for cdk-5.0.20050424,1
/bin/sh:Argument list too long
*** Error code 1

Stop in /usr/ports/devel/cdk.
*** Error code 1

Stop in /usr/ports/devel/cdk.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.30763.0 env PORT_UPGRADE=yes make -DFORCE_PKG_REGISTER reinstall
--->  Restoring the old version
** Fix the installation problem and try again.
[Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 218 packages found (-0 +1) . done]
** Listing the failed packages (*:skipped / !:failed)
        ! devel/cdk (cdk-5.0.20050424,1)        (install error)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
** Could not clean up temporary directory: Directory not empty - /var/tmp/portupgrade3sKhJUvT

Also, but the port doesn't seem to react to these variables:
NO_INSTALL_MANPAGES=yes
NOMANCOMPRESS=yes
It still tries to install and compress manpages.

The side effect of the absent manpages: annoying error messages in the output of "weekly":
Rebuilding whatis database:
makewhatis: /usr/local/man/man3/Beep.3: No such file or directory
makewhatis: /usr/local/man/man3/CDKallocStrings.3: No such file or directory
.. etc

Fix: 

I contacted the maintainer (MrL0Lz _at_ gmail.com) back in April 2006.
According to him - "This a known issue with the 5.X branch"
The patch suggested by him (replacing -pdm with -pdmu in post-install section of the Makefile) does not work. I did not have any further response.
How-To-Repeat: portupgrade -f cdk on a FreeBSD-5.x branch (I am not sure about 6.x)
Comment 1 Edwin Groothuis freebsd_committer 2006-11-04 18:23:14 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Dirk Meyer freebsd_committer 2006-11-05 07:02:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

I will take care of it.
Comment 3 dfilter service freebsd_committer 2006-11-05 07:05:26 UTC
dinoex      2006-11-05 07:05:20 UTC

  FreeBSD ports repository

  Modified files:
    devel/cdk            Makefile 
  Log:
  - set NOPRECIOUSSOFTMAKEVARS
  PR:             105149
  
  Revision  Changes    Path
  1.37      +1 -0      ports/devel/cdk/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 dirk.meyer 2006-11-06 22:46:04 UTC
Please try this patch.

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/cdk/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile	5 Nov 2006 07:05:20 -0000	1.37
+++ Makefile	6 Nov 2006 22:44:51 -0000
@@ -58,4 +58,6 @@
 	cd ${WRKSRC}/examples; \
 	${FIND} . | ${CPIO} -pdm -R ${LIBOWN}:${LIBGRP} ${EXAMPLESDIR}/examples
 
+.include "${.CURDIR}/mancompress.mk"
+
 .include <bsd.port.post.mk>
Index: mancompress.mk
===================================================================
RCS file: mancompress.mk
diff -N mancompress.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mancompress.mk	6 Nov 2006 22:44:51 -0000
@@ -0,0 +1,25 @@
+#
+# $FreeBSD$
+#
+# this files is a workaround for the target in bsd.port.mk
+# which breaks when the list of MLINKS gets > 32k
+#
+
+# Compress (or uncompress) and symlink manpages.
+compress-man::
+	@${ECHO_MSG} "===>   Compressing manual pages for ${PKGNAME}"
+	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE}
+	${ECHO_CMD} '${MLINKS}' | \
+	${AWK} -v MAN="${MANPREFIX}/man/man3/" \
+	'{ for (i=1; i<=NF; i+=2) \
+		{ print MAN $$i ".gz " MAN $$(i+1) ".gz" } }' | \
+	while read regular link; do \
+		${ECHO_CMD} $${regular} $${link}; \
+		${RM} -f $${link%.gz}; ${RM} -f $${link%.gz}.gz; \
+		${LN} -fs `${ECHO_CMD} $${regular} $${link} | ${AWK} '{ \
+			z=split($$1, a, /\//); x=split($$2, b, /\//); \
+			while (a[i] == b[i]) i++; \
+			for (q=i; q<x; q++) printf "../"; \
+			for (; i<z; i++) printf a[i] "/"; printf a[z]; }'` $${link}; \
+	done
+
Comment 5 Igor Roshchin 2006-11-16 20:04:50 UTC
I tried the patch "patch-1.diff" from Nov. 6 2006, 22:44:51 as listed
in the PR followup, but make complains and breaks:

 ...ports/devel/cdk#make
"/usr/ports/devel/cdk/mancompress.mk", line 10: Need an operator
"/usr/ports/devel/cdk/mancompress.mk", line 24: Error in archive specification: "z=split"
make: fatal errors encountered -- cannot continue
Comment 6 dirk.meyer 2006-11-17 05:33:00 UTC
Igor Roshchin schrieb:,

>  I tried the patch "patch-1.diff" from Nov. 6 2006, 22:44:51 as listed
>  in the PR followup, but make complains and breaks:
>  
>   ...ports/devel/cdk#make
>  "/usr/ports/devel/cdk/mancompress.mk", line 10: Need an operator
>  "/usr/ports/devel/cdk/mancompress.mk", line 24: Error in archive specificatio
> n: "z=split"
>  make: fatal errors encountered -- cannot continue

looks like the patch was got corrupted at your download.

When I download the patch and apply it,
it creates the same file I use for testing.

$ ls -l mancompress.mk*
-rw-r--r--  1 dm  dm  899 17 Nov 06:30 mancompress.mk
-rw-r--r--  1 dm  dm  899  6 Nov 23:44 mancompress.mk.orig
$ diff mancompress.mk*
$ md5 mancompress.mk
MD5 (mancompress.mk) = a0242a5e14d303ec089ded4353213b04
MD5 (mancompress.mk.orig) = a0242a5e14d303ec089ded4353213b04

Please verify the you got the same file.
It is also present at:
http://people.freebsd.org/~dinoex/ports/cdk/mancompress.mk


kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
http://people.freebsd.org/~dinoex/errorlogs/
Comment 7 Igor Roshchin 2006-11-23 17:42:31 UTC
The patch as downloaded from
http://people.freebsd.org/~dinoex/ports/cdk/mancompress.mk
works fine. The man pages do get installed.

So, it fixes the bug I reported.

In this situation I didn't check if the other problem was fixed or not
but this may not be related to the port itself.
-----------
Also, but the port doesn't seem to react to these variables:
NO_INSTALL_MANPAGES=yes
NOMANCOMPRESS=yes
It still tries to install and compress manpages.
-----------

Thank you!
Comment 8 dfilter service freebsd_committer 2006-11-26 12:00:41 UTC
dinoex      2006-11-26 11:59:57 UTC

  FreeBSD ports repository

  Modified files:
    devel/cdk            Makefile 
  Added files:
    devel/cdk            mancompress.mk 
  Log:
  - fix build on FreeBSD5 and FreeBSD4
  PR:             105149
  Approved by:    (maintainer timeout)
  
  Revision  Changes    Path
  1.38      +2 -0      ports/devel/cdk/Makefile
  1.1       +25 -0     ports/devel/cdk/mancompress.mk (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Dirk Meyer freebsd_committer 2006-11-26 19:10:47 UTC
State Changed
From-To: feedback->closed

fix was commited. 

The options: 
NO_INSTALL_MANPAGES=yes 
NOMANCOMPRESS=yes 

are not supported by thsi ports. 
This options works only on the base and ports of former base software.