mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
checkupdates: fix --auto build copy
Also, remove origlines which hasn't been used in some time.
This commit is contained in:
parent
02c59a327b
commit
5541cb83ac
2 changed files with 2 additions and 4 deletions
|
|
@ -29,6 +29,7 @@ import traceback
|
||||||
import HTMLParser
|
import HTMLParser
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
import logging
|
import logging
|
||||||
|
import copy
|
||||||
|
|
||||||
import common
|
import common
|
||||||
import metadata
|
import metadata
|
||||||
|
|
@ -468,9 +469,7 @@ def checkupdates_app(app, first=True):
|
||||||
logging.info("Refusing to auto update, since the latest build is newer")
|
logging.info("Refusing to auto update, since the latest build is newer")
|
||||||
|
|
||||||
if not gotcur:
|
if not gotcur:
|
||||||
newbuild = latest.copy()
|
newbuild = copy.deepcopy(latest)
|
||||||
if newbuild.origlines:
|
|
||||||
del newbuild.origlines[:]
|
|
||||||
newbuild.disable = False
|
newbuild.disable = False
|
||||||
newbuild.vercode = app.CurrentVersionCode
|
newbuild.vercode = app.CurrentVersionCode
|
||||||
newbuild.version = app.CurrentVersion + suffix
|
newbuild.version = app.CurrentVersion + suffix
|
||||||
|
|
|
||||||
|
|
@ -1066,7 +1066,6 @@ def parse_txt_metadata(metadatapath):
|
||||||
if len(parts) < 3:
|
if len(parts) < 3:
|
||||||
raise MetaDataException("Invalid build format: " + v + " in " + metafile.name)
|
raise MetaDataException("Invalid build format: " + v + " in " + metafile.name)
|
||||||
build = Build()
|
build = Build()
|
||||||
build.origlines = lines
|
|
||||||
build.version = parts[0]
|
build.version = parts[0]
|
||||||
build.vercode = parts[1]
|
build.vercode = parts[1]
|
||||||
if parts[2].startswith('!'):
|
if parts[2].startswith('!'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue