[parted-devel] gnulibify, and auto-modernize (partially), etc.

Otavio Salvador otavio at debian.org
Wed Feb 21 13:39:54 CET 2007


Jim Meyering <jim at meyering.net> writes:

> Please don't apply the following patch directly.  It's just the
> meat of the change, but incomplete.  E.g., it doesn't include
> the po/*.po deletions, nor the **/.gitignore additions.
> *that* patch weighs in at nearly 2MB:

While I ack the patch and changes I think those would be better if
done in a small set of patches. This would also make David life easier
to port some of changes to stable tree.

For example:

* configure.ac: Modernize.
Require the latest stable releases: autoconf-2.61, automake-1.10.
Require gettext-0.15.
Use more modern form of AC_INIT, etc.
Now that the version string must be hard-coded in the AC_INIT line,
add code to ensure it agrees with the PED_* and LT_* variables.
Use AM_CPPFLAGS, not CFLAGS
Remove obsolete setting of ALL_LINGUAS.
Don't set CFLAGS=-D_GNU_SOURCE=1 explicitly , since that's already
done via AC_GNU_SOURCE, which gnulib pulls in by default,
through gl_EARLY.
Use gl_INIT and gl_EARLY.

Those could be one patch.

* debug/clearfat/clearfat.c (_do_help): Use fputs, not printf.

Another

* parted/parted.c: Include <config.h>, not "../config.h".
Include "closeout.h" for close_stdout.
Include "configmake.h" for LOCALEDIR definition.
Include "version-etc.h" for version_etc prototype.
Declare global, program_name.
(PROGRAM_NAME, AUTHORS): Define.
(_version): Use gnulib's version_etc.
(main): Set program_name.
Use atexit to close stdout carefully upon exit.

Another

Include <config.h> from every .c file:
* libparted/unit.c, libparted/timer.c:
* libparted/cs/natmath.c, libparted/cs/constraint.c:
* libparted/tests/label.c, libparted/tests/common.c:
* libparted/fs/fat/count.c, libparted/fs/fat/bootsector.c:
* libparted/fs/fat/context.c, libparted/fs/fat/fatio.c:
* libparted/fs/fat/fat.c, libparted/fs/fat/clstdup.c:
* libparted/fs/fat/resize.c, libparted/fs/fat/traverse.c:
* libparted/fs/fat/table.c, libparted/fs/fat/calc.c:
* libparted/fs/amiga/amiga.c, libparted/labels/fdasd.c:
* libparted/labels/dvh.c, libparted/labels/efi_crc32.c:
* libparted/labels/vtoc.c, parted/command.c:

* libparted/tests/label.c: Include <config.h>.

Another

and so on.

Doing that would make the maintainence life easier.

Jim, have you already tried stgit? Would be nice if you try it since
it would help you a lot keeping those patchsets easy to handle.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list