Re: RFC: remove 'oldfind'?

2021-09-29 Thread Bernhard Voelker

On 9/23/21 18:57, James Youngman wrote:

I think this makes sense.


Thanks, pushed at:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=5768a03ddf

Have a nice day,
Berny



Re: RFC: remove 'oldfind'?

2021-09-23 Thread James Youngman
I think this makes sense.   I cannot remember the last time a bug was
identified via a disparity between ftsfind and oldfind.

On Mon, Sep 20, 2021 at 12:33 AM Bernhard Voelker
 wrote:
>
> The FTS-based find is the default for a long time; oldfind has not been
> installed since 4.5.18 (2015), and was only just used in tests.
>
> Any objection to remove 'oldfind'?
>
> Have a nice day,
> Berny



RFC: remove 'oldfind'?

2021-09-19 Thread Bernhard Voelker

The FTS-based find is the default for a long time; oldfind has not been
installed since 4.5.18 (2015), and was only just used in tests.

Any objection to remove 'oldfind'?

Have a nice day,
BernyFrom 5768a03ddfb5e18b1682e339d6cdd24ff721c510 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker 
Date: Sun, 22 Aug 2021 18:41:17 +0200
Subject: [PATCH] oldfind: remove

The FTS-based find is the default for a long time; oldfind has not been
installed since 4.5.18 (2015), and was only just used in tests.

* NEWS: Document the change.
* doc/find-maint.texi (Factor Out Repeated Code): Remove mentioning of
oldfind.
* find/.gitignore (/oldfind): Remove entry.
* find/Makefile.am (check_PROGRAMS): Remove.
(oldfind_SOURCES): Remove.
* find/defs.h (struct dir_id): Remove, it was only used in oldfind.c.
(symlink_handling): Likewise.
Adjust comments wrt oldfind otherwise.
* find/oldfind.c: Remove.
* find/testsuite/config/unix.exp: Remove the code to search for and
to run tests with oldfind.
* find/testsuite/find.posix/dotdotfiles.exp: Adjust comment.
* po/POTFILES.in (find/oldfind.c): Remove entry.
* tests/find/debug-missing-arg.sh: Remove run with oldfind.
* tests/find/exec-plus-last-file.sh: Likewise.
* tests/find/execdir-fd-leak.sh: Likewise.
* tests/find/many-dir-entries-vs-OOM.sh: Likewise.
* tests/find/name-lbracket-literal.sh: Likewise.
* tests/find/printf_escape_c.sh: Likewise.
* tests/find/printf_escapechars.sh: Likewise.
* tests/find/printf_inode.sh: Likewise.
* tests/find/refuse-noop.sh: Likewise.
* tests/find/type_list.sh: Likewise.
* tests/local.mk (built_programs): Remove oldfind from list.
---
 NEWS  |4 +
 doc/find-maint.texi   |5 +-
 find/.gitignore   |1 -
 find/Makefile.am  |7 +-
 find/defs.h   |   14 +-
 find/oldfind.c| 1556 -
 find/testsuite/config/unix.exp|   29 +-
 find/testsuite/find.posix/dotdotfiles.exp |2 +-
 po/POTFILES.in|1 -
 tests/find/debug-missing-arg.sh   |   12 +-
 tests/find/exec-plus-last-file.sh |   10 +-
 tests/find/execdir-fd-leak.sh |   12 +-
 tests/find/many-dir-entries-vs-OOM.sh |   22 +-
 tests/find/name-lbracket-literal.sh   |5 +-
 tests/find/printf_escape_c.sh |   17 +-
 tests/find/printf_escapechars.sh  |   50 +-
 tests/find/printf_inode.sh|   12 +-
 tests/find/refuse-noop.sh |   18 +-
 tests/find/type_list.sh   |  290 ++--
 tests/local.mk|2 +-
 20 files changed, 223 insertions(+), 1846 deletions(-)
 delete mode 100644 find/oldfind.c

diff --git a/NEWS b/NEWS
index 17b08d4a..77bf365c 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,10 @@ GNU findutils NEWS - User visible changes.  -*- outline -*- (allout)
 
   The output of 'find --help' now reads better.
 
+** Changes to the build process
+
+  The find version without FTS, oldfind, has been completely removed.  It has
+  not been installed since 4.5.18 (2015), and was only still used in tests.
 
 * Noteworthy changes in release 4.8.0 (2020-01-09) [stable]
 
diff --git a/doc/find-maint.texi b/doc/find-maint.texi
index 647e6f5d..f033dc72 100644
--- a/doc/find-maint.texi
+++ b/doc/find-maint.texi
@@ -363,10 +363,7 @@ the nature of the input arguments which is in fact not true for the
 context of the now duplicated code.
 
 A good example of the use of refactoring in findutils is the
-@code{collect_arg} function in @file{find/parser.c}.  A less clear-cut
-but larger example is the factoring out of code which would otherwise
-have been duplicated between @file{find/oldfind.c} and
-@code{find/ftsfind.c}.
+@code{collect_arg} function in @file{find/parser.c}.
 
 The findutils test suite is comprehensive enough that refactoring code
 should not generally be a daunting prospect from a testing point of
diff --git a/find/.gitignore b/find/.gitignore
index 2ea5572d..d34536ca 100644
--- a/find/.gitignore
+++ b/find/.gitignore
@@ -4,4 +4,3 @@
 /Makefile.in
 /find
 /libfindtools.a
-/oldfind
diff --git a/find/Makefile.am b/find/Makefile.am
index f8d3bd95..c0779a0f 100644
--- a/find/Makefile.am
+++ b/find/Makefile.am
@@ -20,13 +20,10 @@ localedir = $(datadir)/locale
 noinst_LIBRARIES = libfindtools.a
 libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c
 
-# We always build two versions of find, one with fts (called "find"),
-# one without (called "oldfind").  The oldfind binary is no longer
-# installed.
+# We only build the version of find with fts (called "find"),
+# i.e., no longer the one called "oldfind".
 bin_PROGRAMS = find
-check_PROGRAMS   = oldfind
 find_SOURCES = ftsfind.c
-oldfind_SOURCES  = oldfind.c
 man_MANS = find.1
 
 EXTRA_DIST = defs.h sharefile.h print.h $(man_MANS)
diff --git a/find/defs.h