Overview
Comment: | datashare list-areas, list-versions working, publish partially working |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
0805063fb3a390999d6d2c238ee19089 |
User & Date: | matt on 2014-09-16 23:17:33 |
Other Links: | branch diff | manifest | tags |
Context
2014-09-17
| ||
01:00 | datashare - get implemented, ref count records now updated check-in: bd5633a585 user: matt tags: v1.60 | |
2014-09-16
| ||
23:17 | datashare list-areas, list-versions working, publish partially working check-in: 0805063fb3 user: matt tags: v1.60 | |
18:09 | First pass at publish via command line check-in: 9f5bfafa07 user: mrwellan tags: v1.60 | |
Changes
Modified datashare.scm from [187c333057] to [4a97ac5e61].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - - + + + + + | (import canvas-draw-iup) (use sqlite3 srfi-1 posix regex regex-case srfi-69) (import (prefix sqlite3 sqlite3:)) (declare (uses configf)) (declare (uses tree)) |
︙ | |||
257 258 259 260 261 262 263 264 265 266 267 268 269 270 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | + + + + + + + + + + + + | (set! res (cons (list->vector (cons a b)) res))) db (conc "SELECT id,area,version_name,store_type,copied,source_path,iteration,submitter,datetime,storegrp,datavol,quality,disk_id,comment,stored_path " " FROM pkgs WHERE area like ? AND version_name LIKE ? AND iteration " iter-filter ";") area-filter version-filter) (reverse res))) (define (datashare:get-versions-for-area db area-name #!key (version-patt "%")) (let ((res '()) (data (make-hash-table))) (sqlite3:for-each-row (lambda (version-name submitter iteration submitted-time comment) ;; 0 1 2 3 4 (hash-table-set! data version-name (vector version-name submitter iteration submitted-time comment))) db "SELECT version_name,submitter,iteration,datetime,comment FROM pkgs WHERE area='megatest' AND version_name != 'latest' AND version_name LIKE ? ORDER BY datetime asc;" version-patt) (map (lambda (x)(hash-table-ref data x))(sort (hash-table-keys data) string-ci>=)))) ;;====================================================================== ;; DATA IMPORT/EXPORT ;;====================================================================== (define (datashare:import-data configdat source-path dest-path area version iteration) (let* ((space-avail (car dest-path)) (disk-path (cdr dest-path)) |
︙ | |||
286 287 288 289 290 291 292 | 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 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | + + + + + - + + + + + + - + + | #t) (begin (print "ERROR: Not enough space in storage area " dest-path) (datashare:set-copied db id "no") (sqlite3:finalize! db) #f)))) (define (datashare:get-areas configdat) (let* ((areadat (configf:get-section configdat "areas")) (areas (if areadat (map car areadat) '()))) areas)) |
︙ | |||
399 400 401 402 403 404 405 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | - + | (area-path (cadr area-dat)) (area-name (car area-dat)) (version (iup:attribute version-tb "VALUE")) (comment (iup:attribute comment-tb "VALUE")) (spath (iup:attribute source-tb "VALUE")) (submitter (current-user-name)) (quality 2)) |
︙ | |||
598 599 600 601 602 603 604 605 606 607 608 609 610 611 | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | + + + + + + + + + + + | tabs))) (iup:main-loop)) ;;====================================================================== ;; MISC ;;====================================================================== (define (datashare:do-as-calling-user proc) (let ((eid (current-effective-user-id)) (cid (current-user-id))) (if (not (eq? eid cid)) ;; running suid (set! (current-effective-user-id) cid)) ;; (print "running as " (current-effective-user-id)) (proc) (if (not (eq? eid cid)) (set! (current-effective-user-id) eid)))) (define (datashare:find name paths) (if (null? paths) #f (let loop ((hed (car paths)) (tal (cdr paths))) (if (file-exists? (conc hed "/" name)) hed |
︙ | |||
622 623 624 625 626 627 628 | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (ini:property-separator-patt " * *") (ini:property-separator #\space) (if (file-exists? fname) ;; (ini:read-ini fname) (read-config fname #f #t) (make-hash-table)))) |
tests/installall/config/megatest.config.dat became a regular file with contents [736a5da885].
whitespace changes only
tests/installall/config/runconfigs.config.dat became a regular file with contents [3b8f260acb].
whitespace changes only