Check-in [a706ef58b8]
Overview
Comment:Updated to correctly deal with the "latest" symlink
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a706ef58b8591c42f2adbc6badf1b1365051c2d0
User & Date: rkeene on 2014-11-10 19:19:54
Other Links: manifest | tags
Context
2014-11-10
20:09
Updated to include attribute caching since we now disable all FUSE attribute caching check-in: 89eabdaec1 user: rkeene tags: trunk
19:19
Updated to correctly deal with the "latest" symlink check-in: a706ef58b8 user: rkeene tags: trunk
07:17
Updated to not attempt to drop the reference count on the last home directory object until we're about to actually give up the reference check-in: f6ecb0ed91 user: rkeene tags: trunk
Changes

Modified appfsd.tcl from [2a6db15ed4] to [bfe8021807].

   473    473   				return $retval
   474    474   			}
   475    475   			"versions" {
   476    476   				set retval [::appfs::db eval {
   477    477   					SELECT DISTINCT version FROM packages WHERE hostname = $pathinfo(hostname) AND package = $pathinfo(package) AND os = $pathinfo(os) AND cpuArch = $pathinfo(cpu);
   478    478   				}]
   479    479   
   480         -				lappend retval "latest"
          480  +				::appfs::db eval {SELECT version FROM packages WHERE isLatest = 1 AND hostname = $pathinfo(hostname) AND package = $pathinfo(package) AND os = $pathinfo(os) AND cpuArch = $pathinfo(cpu) LIMIT 1;} latest_info {}
          481  +
          482  +				if {[info exists latest_info(version)]} {
          483  +					lappend retval "latest"
          484  +				}
   481    485   
   482    486   				return $retval
   483    487   			}
   484    488   			"files" {
   485    489   				catch {
   486    490   					::appfs::getpkgmanifest $pathinfo(hostname) $pathinfo(package_sha1)
   487    491   				}
................................................................................
   570    574   						set retval(type) directory
   571    575   						set retval(childcount) [llength [getchildren $path]]
   572    576   					}
   573    577   				}
   574    578   			}
   575    579   			"versions" {
   576    580   				if {$pathinfo(version) == "latest"} {
   577         -					set retval(type) symlink
   578         -					set retval(source) "1.0"
          581  +					::appfs::db eval {SELECT version FROM packages WHERE isLatest = 1 AND hostname = $pathinfo(hostname) AND package = $pathinfo(package) AND os = $pathinfo(os) AND cpuArch = $pathinfo(cpu) LIMIT 1;} latest_info {}
          582  +
          583  +					if {[info exists latest_info(version)]} {
          584  +						set retval(type) symlink
          585  +						set retval(source) $latest_info(version)
          586  +					}
   579    587   				} else {
   580    588   					if {[info exists pathinfo(package_sha1)] && $pathinfo(package_sha1) != ""} {
   581    589   						set retval(type) directory
   582    590   						set retval(childcount) [llength [getchildren $path]]
   583    591   					}
   584    592   				}
   585    593   			}