From f2b48575e6a949e35e856534c6ff4c6a86b8f010 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 6 Nov 2019 09:02:53 +0100 Subject: [PATCH] deploy: github/gitlab use bare git repos, only size the .git/ dir needs test: generate giant APKs by including AndroidManifest.xml and and large file from /dev/urandom, then sign it. Then add those to the git repo. --- fdroidserver/server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fdroidserver/server.py b/fdroidserver/server.py index 964edc3b..229aa13f 100644 --- a/fdroidserver/server.py +++ b/fdroidserver/server.py @@ -352,10 +352,13 @@ def update_servergitmirrors(servergitmirrors, repo_section): git_repodir = os.path.join(git_mirror_path, 'fdroid', repo_section) if not os.path.isdir(git_repodir): os.makedirs(git_repodir) - if os.path.isdir(dotgit) and _get_size(git_mirror_path) > 1000000000: + # github/gitlab use bare git repos, so only count the .git folder + # test: generate giant APKs by including AndroidManifest.xml and and large + # file from /dev/urandom, then sign it. Then add those to the git repo. + if os.path.isdir(dotgit) and _get_size(dotgit) > 1000000000: logging.warning('Deleting git-mirror history, repo is too big (1 gig max)') shutil.rmtree(dotgit) - if options.no_keep_git_mirror_archive and _get_size(git_mirror_path) > 1000000000: + if options.no_keep_git_mirror_archive and _get_size(dotgit) > 1000000000: logging.warning('Deleting archive, repo is too big (1 gig max)') archive_path = os.path.join(git_mirror_path, 'fdroid', 'archive') shutil.rmtree(archive_path, ignore_errors=True)