Overview
Comment: | Enough of datashare implemented to demo |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
c35d3e849380d2bdee40a60817048ccf |
User & Date: | matt on 2014-08-24 18:19:34 |
Other Links: | branch diff | manifest | tags |
Context
2014-08-24
| ||
20:53 | Fixed storage of links in datastore check-in: ff4b7bc45e user: matt tags: v1.60 | |
18:19 | Enough of datashare implemented to demo check-in: c35d3e8493 user: matt tags: v1.60 | |
17:08 | More datashare hacking done. check-in: 564660d855 user: matt tags: v1.60 | |
Changes
Modified datashare.scm from [38fe06106c] to [afd73c3669].
︙ | |||
274 275 276 277 278 279 280 281 282 283 284 285 286 287 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | + + - - - + + + + + + + + + + + + + + + + + + + + + + + | (define (datastore:get-best-storage configdat) (let* ((storage (configf:lookup configdat "settings" "storage")) (store-areas (if storage (string-split storage) '()))) (print "Looking for available space in " store-areas) (datastore:find-most-space store-areas))) ;; (string->number (list-ref (with-input-from-pipe "df -B1000000 /tmp" (lambda ()(read-line)(string-split (read-line)))) 3)) (define (datastore:find-most-space paths) (fold (lambda (area res) ;; (print "area=" area " res=" res) (let ((maxspace (car res)) (currpath (cdr res))) ;; (print currpath " " maxspace) (if (file-write-access? area) |
︙ | |||
393 394 395 396 397 398 399 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - + | (define (datastore:path->lst path) (string-split path "/")) (define (datastore:pathdat-apply-heuristics configdat path) (cond ((file-exists? path) "found") |
︙ | |||
479 480 481 482 483 484 485 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | - + + - - + + - - + + + + + | ;; (for-each (lambda (area) (let* ((path (conc "/" (cadr area))) (fullpath (conc basepath path))) (if (not (hash-table-ref/default installed-dat path #f)) (tree:add-node tb2 "Installed" (datastore:path->lst path))) |
︙ |