chiark / gitweb /
checkupdates: fix --auto build copy
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 7 Dec 2015 11:39:04 +0000 (12:39 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 7 Dec 2015 11:39:04 +0000 (12:39 +0100)
Also, remove origlines which hasn't been used in some time.

fdroidserver/checkupdates.py
fdroidserver/metadata.py

index b7aaae5c5473c97872226bd48aad838556173916..d1dfc8ff5f6e37588a6750acde2c7936030e2cfd 100644 (file)
@@ -29,6 +29,7 @@ import traceback
 import HTMLParser
 from distutils.version import LooseVersion
 import logging
+import copy
 
 import common
 import metadata
@@ -468,9 +469,7 @@ def checkupdates_app(app, first=True):
                 logging.info("Refusing to auto update, since the latest build is newer")
 
             if not gotcur:
-                newbuild = latest.copy()
-                if newbuild.origlines:
-                    del newbuild.origlines[:]
+                newbuild = copy.deepcopy(latest)
                 newbuild.disable = False
                 newbuild.vercode = app.CurrentVersionCode
                 newbuild.version = app.CurrentVersion + suffix
index 9a82cc595e9b5151f669c29cf24dd715aa8501ea..18f913104d626b0b6ce083831d25069ee0a073c8 100644 (file)
@@ -1066,7 +1066,6 @@ def parse_txt_metadata(metadatapath):
         if len(parts) < 3:
             raise MetaDataException("Invalid build format: " + v + " in " + metafile.name)
         build = Build()
-        build.origlines = lines
         build.version = parts[0]
         build.vercode = parts[1]
         if parts[2].startswith('!'):