Check-in [355ee88ec8]
Overview
Comment:Fixed bug in resetting latest value
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:355ee88ec8170892bc0a1ae31e45a9fb9389be37
User & Date: rkeene on 2015-05-26 15:44:57
Other Links: manifest | tags
Context
2015-05-26
15:45
AppFS 1.8 check-in: 1a0a82c686 user: rkeene tags: trunk, 1.8
15:44
Fixed bug in resetting latest value check-in: 355ee88ec8 user: rkeene tags: trunk
2015-05-12
13:30
Updated to be more subtle with differing inodes, only differ them if the files are different check-in: 3021e03379 user: rkeene tags: trunk
Changes

Modified appfsd.tcl from [9d766a9055] to [a394650d8e].

   381    381   			# Do not do any additional work if we already have this package
   382    382   			set existing_packages [db eval {SELECT package FROM packages WHERE hostname = $hostname AND sha1 = $pkgInfo(hash);}]
   383    383   			if {[lsearch -exact $existing_packages $pkgInfo(package)] != -1} {
   384    384   				continue
   385    385   			}
   386    386   
   387    387   			if {$pkgInfo(isLatest)} {
   388         -				db eval {UPDATE packages SET isLatest = 0 WHERE hostname = $hostname AND package = $pkgInfo($package) AND os = $pkgInfo($package) AND cpuArch = $pkgInfo(cpuArch);}
          388  +				db eval {UPDATE packages SET isLatest = 0 WHERE hostname = $hostname AND package = $pkgInfo(package) AND os = $pkgInfo(os) AND cpuArch = $pkgInfo(cpuArch);}
   389    389   			}
   390    390   
   391    391   			db eval {INSERT INTO packages (hostname, sha1, package, version, os, cpuArch, isLatest, haveManifest) VALUES ($hostname, $pkgInfo(hash), $pkgInfo(package), $pkgInfo(version), $pkgInfo(os), $pkgInfo(cpuArch), $pkgInfo(isLatest), 0);}
   392         -
   393    392   		}
   394    393   
   395    394   		# Look for packages that have been deleted
   396    395   		set found_packages [db eval {SELECT sha1 FROM packages WHERE hostname = $hostname;}]
   397    396   		foreach package $found_packages {
   398    397   			set found_packages_arr($package) 1
   399    398   		}