Re: [PATCH 32/32] ver_linux: 'printversion()' function definition

From: Valdis . Kletnieks
Date: Tue Jun 28 2016 - 08:49:42 EST


On Tue, 28 Jun 2016 13:19:06 +0300, Alexander Kapshuk said:
> Definition of the 'printversion()' function. The function tests whether
> the variable that contains the version number is empty, and prints
> the name of the utility and its version number as a formatted string,
> if the version number is not an empty value.

This needs to be the first patch in the series, not the last, so that if
you're applying the patches one by one, the result still works, which allows
incremental testing after each patch.

Putting it last means you have to apply all 32 patches before you get
something you can test.

The idea is good, however.

One thing that might be good now that it's only one chunk of code, is to add
some code to check between the following cases: it's something like isdnctrl or
cardmgr that's not installed because it's truly optional in today's world where
ISDN or PCMCIA slots have become rare, or if the regexp doing the matching
failed because the utility is present but produced unexpected output.

Another useful thing would be distinguishing between must-have things
like the toolchain where the build *will* fail, and optionals that
are only used in some configurations. This will probably require reordering
the output (and corresponding changes to Documentation/Changes)



Attachment: pgpkfpCmMVRx6.pgp
Description: PGP signature