]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rootfspostcommands.py: Restructure sort_passwd and related functions
authorAndrei Gherzan <andrei.gherzan@huawei.com>
Tue, 23 Aug 2022 23:55:26 +0000 (01:55 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Aug 2022 10:07:33 +0000 (11:07 +0100)
commit81a0a4dbfb0313b967a7a98eb7fd1e13edb1a9be
tree79a8cdb08ad4371e11e1c73bd52f11d2a8dd43fd
parent364a6f408c9feb5b9472ddabbc352d8b432bfffd
rootfspostcommands.py: Restructure sort_passwd and related functions

This change proposes a restructure of the functions in
rootfspostcommandstests.py to clarify the purpose of each function and
also, make it scalable for other use cases (for example adding support
for removing subid backup files).

The main function of interest here is 'tidy_shadowutils_files' which
brings in the functionality of the old 'sort_passwd' making it clear
that it doesn't only sort the passwd file:
- delete backup files
- it sorts passwd, group and the associated shadow files

The other functions are also renamed for consistency and clarity and
more documentation was added.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/rootfspostcommands.py