utils/checkpackagelib: CommentsMenusPackagesOrder: use regex for source
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 1 Aug 2019 08:02:37 +0000 (10:02 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 1 Aug 2019 20:48:59 +0000 (22:48 +0200)
commit0a4e1fc054d47ae523027897319f14f739d9e697
tree7807c54e8f7daefbb09f738380c85d4c30098909
parent83a34f77051db6980aea277a8ab8e467f68f495a
utils/checkpackagelib: CommentsMenusPackagesOrder: use regex for source

The 'source' strings identify which package is incorrectly ordered. We
need to extract the actual package name from that string, which is
currently done with constants that assume the file is package/Config.in.

In addition, only 'source' lines that are indented with a tab are
checked. This kind of indentation is done in package/Config.in, but not
e.g. boot/Config.in.

Therefore, use a regular expression to match the 'source' lines, and to
extract the directory part from it.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
utils/checkpackagelib/lib_config.py