]> git.donarmstrong.com Git - cran2deb.git/blob - tags/pre-dual/inst/doc/DB_NOTES
reprepro version before the massacre
[cran2deb.git] / tags / pre-dual / inst / doc / DB_NOTES
1 this file documents some of R/db.R -- the DB interface code.
2
3
4 table: sysreq_override
5 fields: depend_alias TEXT, r_pattern TEXT
6
7 SystemRequirements LIKE r_pattern are mapped onto the dependency alias
8 depend_alias (this is a foreign key in debian_dependency).
9
10 table: debian_dependency
11 fields: id INTEGER PRIMARY KEY AUTOINCREMENT,
12         alias TEXT,
13         build INTEGER NOT NULL,
14         debian_pkg TEXT NOT NULL,
15         UNIQUE (alias,build,debian_pkg)
16
17 sets up a dependency alias. each row is a Debian dependency entry, debian_pkg, which
18 may be added to Depends: (and Build-Depends: if build = 1).
19
20 table: forced_depends
21 fields: r_name TEXT.
22         depend_alias TEXT,
23         PRIMARY KEY (r_name,depend_alias)'
24
25 forces the R package r_name to have the dependencies implied by depend_alias (a foriegn
26 key in debian_dependency).
27
28 table: license_override
29 fields: name TEXT PRIMARY KEY,
30         accept INT NOT NULL
31
32 specifies whether the license, name, is accepted or rejected.
33
34 table: license_hashes
35 fields: name TEXT
36         sha1 TEXT PRIMARY KEY
37
38 matches an SHA1 hash of the LICEN[CS]E file or part of the License: field to
39 a particular license name (a foreign key in license_override).
40
41 table: database_versions
42 fields: version INTEGER PRIMARY KEY AUTOINCREMENT,
43         version_date INTEGER,
44         base_epoch INTEGER
45
46 a version of the database. each time one of the above tables (but not the below
47 tables) is updated, a new record is added to this table, indicating significant
48 changes to the database. version_date indicates when this change occurred
49 (seconds since UNIX epoch) and base_epoch is the Debian version epoch.
50
51 in future, all of the above fields should be versioned and somehow linked to
52 the packages that used them, so we only rebuild what is necessary.
53
54 table: packages
55 fields: package TEXT PRIMARY KEY,
56         latest_r_version TEXT
57
58 a package, and its latest R version. this is a copy of the 'available'
59 structure in the cran2deb R cache, and it is here as it allows queries on the
60 'builds' table to be much simpler (and perhaps faster).
61
62 table: builds
63 fields: id INTEGER PRIMARY KEY AUTOINCREMENT,
64         package TEXT,
65         r_version TEXT,
66         deb_epoch INTEGER,
67         deb_revision INTEGER,
68         db_version INTEGER,
69         date_stamp TEXT,
70         git_revision TEXT,
71         success INTEGER,
72         log TEXT,
73         UNIQUE(package,r_version,deb_epoch,deb_revision,db_version)
74
75 Each time a 'package' is built, its 'success' is logged, along with the
76 particular database, cran2deb, R and Debian version information (db_version,
77 git_revision, r_version, deb_epoch, deb_revision) and the current date
78 (date_stamp). 'log' contains the output of the build process.
79
80 A new 'deb_revision' is assigned to each successful build.
81