bug-groff
[Top][All Lists]
Advanced

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

[bug #44890] address@hidden find's -maxdepth option is not portable


From: Peter Bray
Subject: [bug #44890] address@hidden find's -maxdepth option is not portable
Date: Tue, 21 Apr 2015 06:47:01 +0000
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:29.0) Gecko/20100101 Firefox/29.0

URL:
  <http://savannah.gnu.org/bugs/?44890>

                 Summary: address@hidden find's -maxdepth option is not
portable
                 Project: GNU troff
            Submitted by: illumino
            Submitted on: Tue 21 Apr 2015 04:47:00 PM AEST
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Greetings,

The file font/devpdf/devpdf.am, Line 24 use GNU find's -maxdepth option.

    23  GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
    24                    && find * -maxdepth 0 -type f ! -name 'devpdf.am' \
    25                              -exec grep -l internalname {} \;`

This breaks quietly on Solaris 10, but stops the build on Solaris 11
systems.  On Solaris 10 this result in a number of files not being
installed (when compared to a "fixed" build)

It seems the intent is to list the filenames in the current directory
that contain the string "internalname" except the file 'devpdf.am'.

The following show the summarized results of the GNU find version, and
two possible alternate implementations. Drop the wc -l to convince
yourself, these results are the same.

% ( cd font/devpdf ; gfind * -maxdepth 0 -type f ! -name 'devpdf.am' \
                       -exec grep -l internalname {} \; ) | wc -l
      71

% ( cd font/devpdf ; grep -l internalname * | grep -v devpdf.am ) | wc -l
      71

% ( cd font/devpdf ; grep -l internalname [A-Z]* ) | wc -l
      71

Question: Are font names in this directory always [A-Z]* ?

I tested the middle approach in the provided patch. It seems to work
with Solaris grep as part of the normal build process, and on the
command line with GNU grep 2.5.1.

This appears to be the only use of find's -maxdepth in the project.

Additionally, the process of building "font/devpdf/build_font_files",
the BuildFoundries command can call "missing", which is located in the
"build-aux" directory. This is not part of the PATH variable setup for
that command invocation. The attached patch also fixes that issue.

Regards,
Peter Bray
Sydney, Australia





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 21 Apr 2015 04:47:00 PM AEST  Name: devpdf.am.diff  Size: 1kB   By:
illumino

<http://savannah.gnu.org/bugs/download.php?file_id=33733>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44890>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]