From kde-commits Thu May 31 23:20:56 2018 From: Aleix Pol Date: Thu, 31 May 2018 23:20:56 +0000 To: kde-commits Subject: [sysadmin/binary-factory-tooling] android: FDroid: Only do what we know it works Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=152780886817463 Git commit be84fa78527e3a7bd7282773a822a643134965fc by Aleix Pol. Committed on 31/05/2018 at 23:19. Pushed by apol into branch 'master'. FDroid: Only do what we know it works M +6 -14 android/generaterepo.py https://commits.kde.org/sysadmin/binary-factory-tooling/be84fa78527e3a7bd72= 82773a822a643134965fc diff --git a/android/generaterepo.py b/android/generaterepo.py index e2d29a1..d112d82 100644 --- a/android/generaterepo.py +++ b/android/generaterepo.py @@ -6,14 +6,8 @@ import multiprocessing import subprocess = dest =3D "repo" -try: - os.mkdir(dest) - isNewRepository =3D True -except FileExistsError: - isNewRepository =3D False - -#fdroid =3D "docker run --rm -u $(id -u):$(id -g) -v $(pwd):/repo registry= .gitlab.com/fdroid/docker-executable-fdroidserver:latest" -fdroid =3D "fdroid" +# if dest directory doesn't exist, run fdroid init +# https://f-droid.org/en/docs/Setup_an_F-Droid_App_Repo/ = def process(job): name =3D job['name'] @@ -44,11 +38,9 @@ with open("current-jobs.json") as f: pool =3D multiprocessing.Pool(8) pool.map(process, jobs) = -if isNewRepository: - subprocess.check_call(fdroid + " init", shell=3DTrue, cwd=3Ddest) - subprocess.check_call(fdroid + " update -c", shell=3DTrue, cwd=3Ddest) - +#fdroid =3D "docker run --rm -u $(id -u):$(id -g) -v $(pwd):/repo registry= .gitlab.com/fdroid/docker-executable-fdroidserver:latest" +fdroid =3D "fdroid" subprocess.check_call(fdroid + " update", shell=3DTrue, cwd=3Ddest) +subprocess.check_call(fdroid + " server update -v", shell=3DTrue, cwd=3Dde= st) + = -remote =3D "android@racnoss.kde.org:/srv/archives/files/android/" -rsyncProcess =3D subprocess.check_call("rsync -v -a %s %s" % (dest, remote= ), shell=3DTrue)