Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 19:31:14 GMT
From:      Ian Tegebo<yontege@rescomp.berkeley.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/107583: [PATCH] cp: Argument too long - Makefile.in should use xargs
Message-ID:  <200701051931.l05JVEwR068667@www.freebsd.org>
Resent-Message-ID: <200701051940.l05JeDf8022345@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         107583
>Category:       ports
>Synopsis:       [PATCH] cp: Argument too long - Makefile.in should use xargs
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 05 19:40:13 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Ian Tegebo
>Release:        5.3-RELEASE-p19
>Organization:
Residential Computing at UCB
>Environment:
FreeBSD granite.rescomp.berkeley.edu 5.3-RELEASE-p19 FreeBSD 5.3-RELEASE-p19 #0: Fri Jul 22 13:08:49 PDT 2005     root@milk.rescomp.berkeley.edu:/usr/obj/usr/src/sys/MILK_5_3_07_22  i386
>Description:
The number of xml files in db/source/printer is too many for my version of cp:

yontege@granite foomatic-db-20061214 $ ls db/source/printer/|wc -l
    2055

It looks like the newest version of foomatic-db, foomatic-db-20070105, might have the same issue.  When trying to install I get the following error:

===>  Installing for foomatic-db-20061214
===>   foomatic-db-20061214 depends on file: /usr/local/bin/perl5.8.8 - found
===>   foomatic-db-20061214 depends on shared library: xml2.5 - found
===>   foomatic-db-20061214 depends on shared library: curl.4 - found
===>   Generating temporary packing list
install -d //usr/local/share/foomatic
install -d //usr/local/share/foomatic/db/source/printer
install -d //usr/local/share/foomatic/db/source/driver
install -d //usr/local/share/foomatic/db/source/opt
install -d //usr/local/share/foomatic/db/source/PPD
cp db/oldprinterids //usr/local/share/foomatic/db
cp db/source/printer/*.xml //usr/local/share/foomatic/db/source/printer
cp: Argument list too long
gmake: *** [install-db] Error 2
*** Error code 2

Stop in /usr/ports/print/foomatic-db.
*** Error code 1

>How-To-Repeat:
I'm using the following port version, 20061214, with Makefile CVS tag:
# $FreeBSD: ports/print/foomatic-db/Makefile,v 1.23 2006/12/16 15:54:52 acm Exp

cd /usr/ports/print/foomatic-db
make install
>Fix:
I wasn't able to attach my patch without error using the web form.  What follows is a simple patch that uses find and xargs to work around this problem; I created /usr/ports/print/foomatic-db/files and dropped my patch inside.

--- Makefile.in Thu Dec 14 04:11:54 2006
+++ Makefile.in-new     Fri Jan  5 10:51:50 2007
@@ -66,12 +66,14 @@
        install -d $(DESTDIR)$(LIBDIR)/db/source/opt
        install -d $(DESTDIR)$(LIBDIR)/db/source/PPD
        cp db/oldprinterids $(DESTDIR)$(LIBDIR)/db
-       cp db/source/printer/*.xml $(DESTDIR)$(LIBDIR)/db/source/printer
+       find db/source/printer -name '*.xml' | \
+               xargs -J % cp % $(DESTDIR)$(LIBDIR)/db/source/printer
        ( cd db/source/driver/; \
          for d in $(DRIVERXMLS); do \
            cp $$d $(DESTDIR)$(LIBDIR)/db/source/driver; \
          done )
-       cp db/source/opt/*.xml $(DESTDIR)$(LIBDIR)/db/source/opt
+       find db/source/opt -name '*.xml' | \
+               xargs -J % cp % $(DESTDIR)$(LIBDIR)/db/source/opt
        ( cd db/source && tar cf - --exclude=.svn PPD ) | \
          ( cd $(DESTDIR)$(LIBDIR)/db/source && tar xf -)
        if test $(GZIP) != GZIP_NOT_FOUND -a $(GZIP_PPDS) != no ; then \

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701051931.l05JVEwR068667>