chiark / gitweb /
Fix project.properties dependency issue
authormicu <micuintus@gmx.de>
Thu, 16 Apr 2015 22:58:20 +0000 (00:58 +0200)
committermicu <micuintus@gmx.de>
Thu, 16 Apr 2015 23:10:23 +0000 (01:10 +0200)
Correctly place scrlib references also
in the case there is no project.properties file
present in the original repository.

This commit fixes a problem, which was introduced with
021df3c42420de542bf11f22948831023b47ebf3: If no
project.properties file exists in the original
project's source repo, place_srclib will not place
a dependency --- even if there should be one:

>    if not os.path.isfile(proppath):
>        return

Example app: fdroiddata/metadata/org.berlin_vegan.bvapp.txt

fdroidserver/common.py

index 810cf729798b48582a0273e148c66784834de576..a5a3e70f5088579c12e2e205cce03345228f38dc 100644 (file)
@@ -1886,11 +1886,9 @@ def place_srclib(root_dir, number, libpath):
     proppath = os.path.join(root_dir, 'project.properties')
 
     lines = []
-    if not os.path.isfile(proppath):
-        return
-
-    with open(proppath, "r") as o:
-        lines = o.readlines()
+    if os.path.isfile(proppath):
+        with open(proppath, "r") as o:
+            lines = o.readlines()
 
     with open(proppath, "w") as o:
         placed = False