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
474
475
476
477
478
479



480


481
482
483
484
485
486
487
473
474
475
476
477
478
479
480
481
482

483
484
485
486
487
488
489
490
491







+
+
+
-
+
+







				return $retval
			}
			"versions" {
				set retval [::appfs::db eval {
					SELECT DISTINCT version FROM packages WHERE hostname = $pathinfo(hostname) AND package = $pathinfo(package) AND os = $pathinfo(os) AND cpuArch = $pathinfo(cpu);
				}]

				::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 {}

				if {[info exists latest_info(version)]} {
				lappend retval "latest"
					lappend retval "latest"
				}

				return $retval
			}
			"files" {
				catch {
					::appfs::getpkgmanifest $pathinfo(hostname) $pathinfo(package_sha1)
				}
570
571
572
573
574
575
576



577
578



579
580
581
582
583
584
585
574
575
576
577
578
579
580
581
582
583


584
585
586
587
588
589
590
591
592
593







+
+
+
-
-
+
+
+







						set retval(type) directory
						set retval(childcount) [llength [getchildren $path]]
					}
				}
			}
			"versions" {
				if {$pathinfo(version) == "latest"} {
					::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 {}

					if {[info exists latest_info(version)]} {
					set retval(type) symlink
					set retval(source) "1.0"
						set retval(type) symlink
						set retval(source) $latest_info(version)
					}
				} else {
					if {[info exists pathinfo(package_sha1)] && $pathinfo(package_sha1) != ""} {
						set retval(type) directory
						set retval(childcount) [llength [getchildren $path]]
					}
				}
			}