Commit Graph

11 Commits

Author SHA1 Message Date
Trevor Gamblin
1f059e36c0 ab-janitor: only rm trashdir files over 60s old
[YOCTO #14952] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=14952

Help avoid contention by adding a check to ensure files and directories
are at least 60s old when attempting to delete them from the trashdir,
in case bitbake or another process is still actively using them.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15 14:36:11 +01:00
Richard Purdie
8702fdbb72 Clarify license and copyright information
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-17 10:29:45 +01:00
Richard Purdie
285ebc734f clobberdir: Only function if the target trash directory exists
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 10:56:55 +00:00
Michael Halstead
987487fa4c janitor: Add the systemd unit file used on the autobuilder
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-17 12:32:13 +01:00
Richard Purdie
29a1c23b29 janitor: Run under nice +10 as well as ionice
We're seeing issues with the system struggling with resources when
it shouldn't. Ensure the janitor isn't contributing to this by lowering
its priority as well as changing ionice.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22 15:55:35 +01:00
Richard Purdie
dca5a89ca9 janitor/clobberdir: Fix case where clobber directory isn't a local path to the trash directory
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-15 18:00:20 +00:00
Richard Purdie
db7588f5f8 ab-janitor: Ensure configuration variables are expanded
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23 15:58:06 +01:00
Aaron Chan
54f848380f clobberdir: Fix data expansion with utils API
The changes to use variable expansion missed out the clobberdir script. This
patch fixes regressions introduced by that change so data is expanded correctly.

This fix is to move clobberdir from python2 to python3 to resolve unicode data
in python2 and secondly, change the data extraction expansion from
ourconfig["TRASH_DIR"] to utils.getconfig("TRASH_DIR", ourconfig) so that
expansion occurs.

Signed-off-by: Aaron Chan <aaron.chun.yew.chan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-05 10:47:15 +01:00
Richard Purdie
b7cf6d8209 utils: Allow customisation using ABHELPER_JSON from the environment
Usage is documented in README and an example, local-example.json is
included.

Also clean up the parameter to loadconfig() as its actually not needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-20 23:16:10 +01:00
Richard Purdie
54b70f1a52 ab-janitor: Use bare clones for mirroring
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01 23:13:03 +00:00
Richard Purdie
eff0bb78df Add janitor scripts (trashdir clobber and mirroring)
This takes the janitor from the yocto-autobuilder, converts it to python3
and switches it to use the config.json file along with the other code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-28 17:37:02 +00:00