The databases/sqlports port
sqlports-7.27 – sqlite database of ports
Description
SQLite database of every port in the system. This can be queried through
e.g., sqlitebrowser, or any kind of programming interface.
This schema is mostly optimized for tools, and cumbersome to query by
hand.
Human users are strongly advised to mostly use views on those tables.
The default flavor only looks in PORTSDIR, use nonstrict to heed
PORTSDIR_PATH fully.
Database Schema:
- _Paths (ID, FULLPKGPATH, PKGPATH, CANONICAL)
PKGPATH points to a PATHS entry corresponding to the stripped down version of
FULLPKGPATH, without flavors or subpackage markers, or is null if FULLPKGPATH
is already stripped. Every other FULLPKGPATH, PKGPATH, DEPENDSPATH entry
in the database points to this table.
The FULLPKGPATH is complete, including flavors and pseudo flavors markers.
For every port with MULTI_PACKAGES settings, one entry is written
for each SUBPACKAGE.
CANONICAL points to the actual ID to use as an entry in other tables, for
FULLPKGPATH which don't have their own entry.
- _Ports(FULLPKGPATH, ...)
holds all the information retrieved through various variables that is not
stored in specialized tables, e.g.,:
AUTOCONF_VERSION
AUTOMAKE_VERSION
COMES_WITH
COMMENT
COMPILER
COMPILER_LANGS
DISTFILES
DISTNAME
DIST_SUBDIR
EPOCH
FIX_EXTRACT_PERMISSIONS
FULLPKGNAME
GH_*
HOMEPAGE
IGNORE
IS_INTERACTIVE
MAINTAINER
NO_*
PATCHFILES
PERMIT_*
PKGNAME
PKGSPEC
PKGSTEM
PKG_ARCH
PORTROACH
PORTROACH_COMMENT
PREFIX
PSEUDO_FLAVOR
REVISION
SEPARATE_BUILD
STATIC_PLIST
SUBPACKAGE
SUPDISTFILES
TEST_IS_INTERACTIVE
UPDATE_PLIST_ARGS
USE_*
Some of this information is stored as indexes in keyword tables.
and Yes/No variables have been replaced with 1/0.
Variables not present in a given port are left undefined.
Note that USE_LIBTOOL is 3-valued: 2 is gnu, 1 is yes, undef is no.
Note that USE_WXNEEDED is 3-valued: 2 is special, 1 is yes, undef is no.
MULTI_PACKAGES ports hold several entries with corresponding FULLPKGPATH
- _Flavors(FULLPKGPATH, VALUE, N)
- _PseudoFlavors(FULLPKGPATH, VALUE, N)
- _Categories(FULLPKGPATH, VALUE, N)
- _Multi(FULLPKGPATH, VALUE, SUBPKGPATH, N) ('-' values are not stored)
- _Modules(FULLPKGPATH, VALUE, N)
- _Configure(FULLPKGPATH, VALUE, N) (corresponds to CONFIGURE_STYLE)
- _ConfigureArgs(FULLPKGPATH, VALUE, N, QUOTETYPE)
- _MasterSites(FULLPKGPATH, N, VALUE)
- _Makefiles(FULLPKGPATH, VALUE, N)
- _NotForArch(FULLPKGPATH, VALUE, N)
- _OnlyForArch(FULLPKGPATH, VALUE, N)
All of these variable values are actually lists. These lists are taken apart
and result in many entries in these secondary tables (or none if the list
is completely empty)
The Makefiles table contains only Makefiles from MAKEFILE_LIST that are not
"default values" (always included makefiles).
Each keyword table follows the same scheme
TABLENAME(KEYREF, VALUE)
- _Depends(FULLPKGPATH, FULLDEPENDS, PKGSPEC, REST, DEPENDSPATH, TYPE, N)
All depends are stored in a single table, including the type:
0 -> library
1 -> run
2 -> build
3 -> test
with FULLDEPENDS the full text of the dependency, DEPENDSPATH the PKGPATH
we depend upon, PKGSPEC the spec we depend upon (if explicit), and REST
the rest.
- _Distfiles(FULLPKGPATH, VALUE, N, Type)
All distfiles/supdistfiles are stored in a single table, with Type
0 -> distfiles
1 -> supdistfiles
2 -> patchfiles
N is :N from mastersites
- _DPBProperties (FULLPKGPATH, VALUE, N)
- _Wantlib(FULLPKGPATH, VALUE, EXTRA)
All the libraries the FULLPKGPATH depends upon, with optional version
number specification stored in EXTRA
coming from either the WANTLIB variable or various LIB_DEPENDS.
- _Multi(FULLPKGPATH, VALUE, SUBPKGPATH, N)
also contains the normalized pkgpath for the corresponding subpackage.
- _PkgPaths(FULLPKGPATH, Value, N)
all build_packages associated to a fullpkgpath.
- _Broken(FULLPKGPATH, ARCH, TEXT)
- _Shared_Libs(FULLPKGPATH, LIBNAME, VERSION)
- _SubstVars(FULLPKGPATH, VALUE, N)
- _TARGETS(FULLPKGPATH, VALUE)
Some information, both in the main table and in secondary tables
is stored as keyword references to other tables:
AUTOCONF_VERSION, AUTOMAKE_VERSION -> _AUTOVERSION
_DPBProperties.value -> _DPBKeys
MAINTAINER -> _EMAIL
CATEGORIES -> _CATEGORYKEYS
CONFIGURE -> _CONFIGURE_KEYS
MAKEFILES -> _FILENAMES
MODULES -> _MODULEKEYS
PREFIX -> _PREFIX
_WANTLIB.VALUE, _SHARED_LIBS.LIBNAME -> _LIBRARY
PERMIT_*, SEPARATE_BUILD -> _KEYWORDS2
FLAVORS, PSEUDO_FLAVORS -> _KEYWORDS
NOT_FOR_ARCHS, ONLY_FOR_ARCHS, PKG_ARCH -> _ARCH
_SubstVars.value -> _substvarskey
TARGETS -> _TARGETKEYS
_Distfiles.value = _Fetchfiles
Views are still evolving. Useful views:
* Ports: contains all info from _ports and from secondary tables with indices
replaces.
* Depends_ordered, Categories_ordered, CompilerLinks_Ordered,
Configureargs_ordered, Configure_ordered, DPBProperties_ordered,
Flavors_ordered, Makefiles_ordered, Modules_ordered, NotForArch_ordered,
OnlyforArch_ordered, PkgPaths_ordered, PseudoFlavors_ordered,
SubstVars_ordered, Targets_ordered, distfiles_ordered, wantlib_ordered:
reconstituted lists of text values as
a single string from the corresponding table.
* each "keyword" list also has a corresponding view, e.g.,
_BROKEN -> BROKEN (PathId, FULLPKGPATH, Arch, Value)
with text fields, and PathId still the index entry for the fullpkgpath,
suitable for further joins.
* canonical_depends: fullpkgpath/dependspath/dependstype from _depends but
normalized as canonical paths.
No homepage
- Multi-packages
-
sqlports-7.27
portslist-7.27
- Categories:
-
databases
Library dependencies
Build dependencies
Run dependencies