bugGNU troff - Bugs: bug #44890, [git@2015_04_10] find's -maxdepth...

 
 

bug #44890: [git@2015_04_10] find's -maxdepth option is not portable

Submitted by:  Peter Bray <illumino>
Submitted on:  Tue 21 Apr 2015 06:47:00 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Incorrect behaviourStatus: None
Privacy: PublicAssigned to: Deri James <deri>
Open/Closed: ClosedPlanned Release: 1.22.4

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 23 Apr 2015 02:08:42 AM UTC, comment #3:

Deri,

Built against updated git repo as at 2015/04/23 - fonts are now installed in the share/groff/<version>/font/devpdf tree on Solaris 10 and Solaris 11.

Many Thanks,
Peter

Peter Bray <illumino>
Tue 21 Apr 2015 08:24:29 PM UTC, comment #2:

Patch installed. Many thanks Peter.

Deri James <deri>
Project MemberIn charge of this item.
Tue 21 Apr 2015 07:13:49 AM UTC, comment #1:

Indeed. The `-maxdepth' limitation is also documented in the `autoconf' info manual.

Deri, I'm assigning this to you – feel free to install this very small patch in case you are OK with it.

Werner LEMBERG <wl>
Project Administrator
Tue 21 Apr 2015 06:47:00 AM UTC, original submission:

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

Peter Bray <illumino>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33733:  devpdf.am.diff added by illumino (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by deri (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by illumino (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Apr 2015 08:24:29 PM UTCderiOpen/ClosedOpen=>Closed
      Planned ReleaseNone=>1.22.4
    Tue 21 Apr 2015 07:13:49 AM UTCwlAssigned toNone=>deri
    Tue 21 Apr 2015 06:47:00 AM UTCilluminoAttached File-=>Added devpdf.am.diff, #33733

    Back to the top


    Powered by Savane 3.1-cleanup1