planet: fix the script dynamically generating the planet's config

Fixes https://pagure.io/fedora-infrastructure/issue/9799

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2021-03-30 16:29:15 +02:00
parent 18ad21119b
commit 5637d91feb

View file

@ -150,14 +150,14 @@ def main(config_file='/etc/planetbuilder.conf'):
if pb.conf.group: if pb.conf.group:
fn = '.planet.%s' % pb.conf.group fn = '.planet.%s' % pb.conf.group
for (n, p, u, g, c, h, s) in pwd.getpwall(): rootpath = "/home/fedora"
if u < 500: for folder in sorted(os.listdir(rootpath)):
continue if folder in pb.conf.ignore_users:
if n in pb.conf.ignore_users:
continue continue
if os.path.exists(h + '/' + fn): filename = os.path.join(rootpath, folder, fn)
for entry in PlanetFile(h + '/' + fn, n): if os.path.exists(filename):
for entry in PlanetFile(filename, folder):
pb.add(entry) pb.add(entry)
pb.compile() pb.compile()