Commit Graph

4 Commits

Author SHA1 Message Date
Kristyna Streitova 0a3ec9ade8 Update systemd-tmpfiles test to cover more cases 2020-04-22 06:36:19 -04:00
Kristyna Streitova 15cea2c871 _check_tmpfile_in_filelist: Be clear about %ghost
Improve the docstring so it's obvious now that we want
tmpfiles to be marked as %ghost. Also add a test rpm for
a usecase where tmpfiles are packaged correctly and no
rpmlint errors are printed.

fix #326
2020-04-22 06:36:19 -04:00
Kristyna Streitova 080b4ca38e Separate TmpFilesCheck to functions and add a test
Separate the check() method to multiple methods and clean up the code.
Also add a test (systemd-tmpfiles-1.0-0.x86_64.rpm) for an additional
testing.

Add a method that checks that "systemd-tmpfiles --create" call
is not present in the %pre section as it should be in the %post.

Remove "now check remaining ghost files that are not already" part
as the same code is already present in PostCheck.py and it's not related
to tmpfiles anyway. This means that "ghost-files-without-postin" and
"postin-without-ghost-file-creation" checks were removed from
TmpFilesCheck.py.

Rename postin-without-tmpfile-creation to post-without-tmpfile-creation
as we want to address %post section (there is no %postin).
2019-09-16 09:42:35 -04:00
Martin Liska ccb61bf1eb Add TmpFilesCheck from openSUSE/rpmlint-checks (#227). 2019-09-03 09:07:59 -04:00