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

Re: [Libguestfs] [PATCH] build: remove unused gnulib modules



On Wednesday, 18 September 2019 19:24:54 CEST Richard W.M. Jones wrote:
> On Wed, Sep 18, 2019 at 06:51:15PM +0200, Pino Toscano wrote:
> > Remove gnulib modules that provide stuff clearly not used within
> > libguestfs (library, daemon, and C tools).  Among directly and
> > indirectly modules used previous (and now no more), they are:
> > 
> >   cycle-check
> >   dev-ino
> >   dup3
> >   dup3-tests
> >   fcntl-safer
> >   fcntl-safer-tests
> >   filevercmp
> >   filevercmp-tests
> >   fts
> >   getaddrinfo
> >   getaddrinfo-tests
> >   hostent
> >   i-ring
> >   i-ring-tests
> >   inet_ntop
> >   inet_ntop-tests
> >   isatty
> >   isatty-tests
> >   openat-safer
> >   openat-safer-tests
> >   opendirat
> >   ptsname_r
> >   ptsname_r-tests
> >   servent
> >   ttyname_r
> >   ttyname_r-tests
> > 
> > Some of the removed modules are still used pulled indirectly as
> > dependency of other modules.  There should be no behaviour change on
> > recent Linux distros, although older distros were not tested (adding
> > a module back is easy, anyway).
> > 
> > Remove accordingly unused automake variables, and ignored files.
> 
> ACK
> 
> Out of interest how did you determine this?

Sadly it was a manual process.

For each module, I inspected its definition (see .gnulib/modules/), and
checked what the module provides:
- if it overlays existing functions to fix them (e.g. sleep, setenv),
  I skipped checking the module, since it might be still needed in
  older Linux distros, or on non-Linux OSes (e.g. FreeBSD or macOS)
- if just adds new functions: check whether they are used, and if not
  drop the module from the list

For example: dup3 is not used anywhere, so I removed the dup3 module;
OTOH, accept4 is used, so its module stays.

I also checked the history to see why a module was added.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.


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