diff --git a/FileSets/VersionIndependent/PageSettingsPackageEdit.qml b/FileSets/VersionIndependent/PageSettingsPackageEdit.qml index 6d47b2a..fbfd525 100644 --- a/FileSets/VersionIndependent/PageSettingsPackageEdit.qml +++ b/FileSets/VersionIndependent/PageSettingsPackageEdit.qml @@ -42,7 +42,7 @@ MbPage { property bool navigate: ! actionPending && ! waitForAction property bool detailsExist: incompatibleDetails != "" property bool detailsResolvable: incompatibleResolvableItem.valid ? incompatibleResolvableItem.value : "" - property bool showProceed: ( ! detailsExist || detailsResolvable) && ! waitForAction + property bool showProceed: ( ! detailsExist || detailsResolvable || actionPending ) && ! waitForAction property bool showDetails: false property string localError: "" diff --git a/PackageManager.py b/PackageManager.py index 26444b9..8e38765 100755 --- a/PackageManager.py +++ b/PackageManager.py @@ -1493,7 +1493,6 @@ def __init__( self, section, packageName = None ): self.lastConflictCheck = 0 self.lastPatchCheck = 0 - self.lastSetupCheckTime = 0 self.lastGitHubRefresh = 0 @@ -1797,7 +1796,6 @@ def RemovePackage (cls, packageName=None, packageIndex=None, isDuplicate=False ) toPackage.Conflicts = fromPackage.Conflicts toPackage.lastConflictCheck = fromPackage.lastConflictCheck toPackage.lastPatchCheck = fromPackage.lastPatchCheck - toPackage.lastSetupCheckTime = fromPackage.lastSetupCheckTime toPackage.lastGitHubRefresh = fromPackage.lastGitHubRefresh toPackage.ActionNeeded = fromPackage.ActionNeeded @@ -1905,6 +1903,7 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): if Platform[0:4] != 'Rasp': self.SetIncompatible ("incompatible with " + Platform) compatible = False + doConflictChecks = False # update local auto install flag based on DO_NOT_AUTO_INSTALL flagFile = "/data/setupOptions/" + packageName + "/DO_NOT_AUTO_INSTALL" @@ -1933,6 +1932,7 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): if VenusVersionNumber < firstVersionNumber or VenusVersionNumber >= obsoleteVersionNumber: self.SetIncompatible ("incompatible with " + VenusVersion) compatible = False + doConflictChecks = False # check to see if command line is needed for install # the optionsRequired flag in the package directory indicates options must be set before a blind install @@ -1943,6 +1943,7 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): if not os.path.exists ( "/data/setupOptions/" + packageName + "/optionsSet"): self.SetIncompatible ("install from command line" ) compatible = False + doConflictChecks = False # check to see if file set has errors if compatible: @@ -1951,21 +1952,24 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): if os.path.exists (fileSet + "/INCOMPLETE"): self.SetIncompatible ("incomplete file set for " + str (VenusVersion) ) compatible = False + doConflictChecks = False if compatible and os.path.exists (packageDir + "/patchErrors"): - if os.path.getmtime ( packageDir + "/patchErrors" ) > self.lastPatchCheck: - patchFailures = "" - with open ( packageDir + "/patchErrors" ) as file: - for line in file: - logging.warning (packageName + " patch error " + line.strip() + " ") - patchFailures += line - self.SetIncompatible ("patch errors", patchFailures ) - compatible = False - # used to prevent repeaded checks - self.lastPatchCheck = time.time () + patchFailures = "" + logErrors = os.path.getmtime ( packageDir + "/patchErrors" ) > self.lastPatchCheck + with open ( packageDir + "/patchErrors" ) as file: + for line in file: + patchFailures += line + if logErrors: + logging.warning (packageName + " patch error: " + line.strip() + " ") + self.SetIncompatible ("patch errors", patchFailures ) + compatible = False + + # used to prevent repeaded log entries + self.lastPatchCheck = time.time () # check for package conflicts - if compatible and doConflictChecks: + if doConflictChecks: conflicts = [] # skip checks while operations are pending if not self.InstallPending and not self.DownloadPending: @@ -2030,7 +2034,7 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): continue # here if previously updated file was from a different package baseName = os.path.basename (replacementFile) - # log conflict only if this is the first time it was logged + # log conflict only if this is the first time it was discovered if os.path.getmtime ( packageFile ) > self.lastConflictCheck: logging.warning ("package file conflict " + baseName + " " + packageName + " " + previousPackage) @@ -2063,37 +2067,36 @@ def UpdateVersionsAndFlags (self, doConflictChecks=False): else: self.Conflicts = [] - # run setup script to check for errors that can't be checked here - # the packageCheckVersion file is updated by CommonResources during its prechecks - if compatible and doConflictChecks: - doChecks = False - packageCheckFile = "/data/" + packageName + "/packageCheckVersion" - # no checks have been done recently so do them now - if time.time() > self.lastSetupCheckTime + 30: - # no check file exists, do checks - if not os.path.exists ( packageCheckFile ): - doChecks = True - # check file exists - check which firmware version was checked - # and if not the current version, do checks - else: - try: - with open ( packageCheckFile ) as file: - for line in file: - if not VenusVersion in line: - doChecks = True - # couldn't read the file, attempt check again - except: - doChecks = True - if doChecks: - # avoid starting a new check if there is something pending - if not self.InstallPending and not self.DownloadPending \ - and os.path.exists ("/data/" + packageName + "/setup"): - PushAction ( command='check' + ':' + packageName, source='AUTO' ) - # if no incompatibilities found, clear incompatible dbus parameters # so the GUI will allow installs if compatible: self.SetIncompatible ("") + + # run setup script to check for errors that can't be checked here + # the packageCheckVersion file is updated by CommonResources during its prechecks + # only do checks every 30 seconds + doCheck = False + if doConflictChecks: + packageCheckFile = "/data/" + packageName + "/packageCheckVersion" + + # no check file exists, do checks + if not os.path.exists ( packageCheckFile ): + doCheck = True + # check file exists - check which firmware version was checked + # and if not the current version, do checks + else: + try: + with open ( packageCheckFile ) as file: + for line in file: + if not VenusVersion in line: + doCheck = True + # couldn't read the file, attempt check again + except: + doCheck = True + # don't start a new check if there is something pending + if doCheck and not self.InstallPending and not self.DownloadPending \ + and os.path.exists ("/data/" + packageName + "/setup"): + PushAction ( command='check' + ':' + packageName, source='AUTO' ) # end UpdateVersionsAndFlags # end Package @@ -2841,9 +2844,6 @@ def InstallPackage ( self, packageName=None, source=None , action='install' ): if source == 'GUI': DbusIf.AcknowledgeGuiEditAction ( 'ERROR' ) - # conflict report will be generated but setting lastSetupCheckTime - # will prevent setup script checks again since they were just run ! - package.lastSetupCheckTime = time.time () package.UpdateVersionsAndFlags (doConflictChecks=True) DbusIf.UNLOCK ("InstallPackage - update status") diff --git a/blindInstall/SetupHelperVersion b/blindInstall/SetupHelperVersion index 2abf9e2..384334d 100644 --- a/blindInstall/SetupHelperVersion +++ b/blindInstall/SetupHelperVersion @@ -1 +1 @@ -v8.0~15 +v8.0~16 diff --git a/changes b/changes index ca6d7bd..45a779f 100644 --- a/changes +++ b/changes @@ -3,6 +3,7 @@ v8.0: (beta) multiple patch files for each active file are permitted add TailscaleGX to default package list fixed: PackageManager hangs if there is no setup script in package directory + fixed: package conflict message disappears v7.16: fixed: PackageManager hangs with package add diff --git a/venus-data-UninstallPackages.tgz b/venus-data-UninstallPackages.tgz index 507ab0b..5f4c33a 100644 Binary files a/venus-data-UninstallPackages.tgz and b/venus-data-UninstallPackages.tgz differ diff --git a/venus-data.tgz b/venus-data.tgz index ed40639..578209a 100644 Binary files a/venus-data.tgz and b/venus-data.tgz differ diff --git a/version b/version index 2abf9e2..384334d 100644 --- a/version +++ b/version @@ -1 +1 @@ -v8.0~15 +v8.0~16