Changes between Version 3 and Version 4 of Registry2Notes


Ignore:
Timestamp:
Apr 5, 2009, 7:04:25 AM (16 years ago)
Author:
blb@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Registry2Notes

    v3 v4  
    99  - Run a command against registry entries (implemented in entry.c)
    1010  - Commands are:
    11    - create - entry_create()
    12    - delete - entry_delete()
    13    - open - entry_open()
    14    - close - entry_close()
    15    - search - entry_search()
    16    - exists - entry_exists()
    17    - imaged - entry_imaged()
    18    - intalled - entry_installed()
    19    - owner - entry_owner()
     11   - '''create''' - '''''entry_create'''''()
     12   - '''delete''' - '''''entry_delete'''''()
     13   - '''open''' - '''''entry_open'''''()
     14   - '''close''' - '''''entry_close'''''()
     15   - '''search''' - '''''entry_search'''''()
     16   - '''exists''' - '''''entry_exists'''''()
     17   - '''imaged''' - '''''entry_imaged'''''()
     18   - '''intalled''' - '''''entry_installed'''''()
     19   - '''owner''' - '''''entry_owner'''''()
    2020
    2121 - `${entry} cmd ?arg ...?`
    2222  - Commands specific to just one registry entry (usually gained from `registry::entry`) (implemented in entryobj.c)
    2323  - Commands are:
    24    - name - entry_obj_prop()
    25    -  portfile - entry_obj_prop()
    26    -  url - entry_obj_prop()
    27    -  location - entry_obj_prop()
    28    -  epoch - entry_obj_prop()
    29    -  version - entry_obj_prop()
    30    -  revision - entry_obj_prop()
    31    -  variants - entry_obj_prop()
    32    -  default_variants - entry_obj_prop()
    33    -  date - entry_obj_prop()
    34    -  state - entry_obj_prop()
    35    -  installtype - entry_obj_prop()
    36    -  map - entry_obj_filemap()
    37    -  unmap - entry_obj_filemap()
    38    -  files - entry_obj_files()
    39    -  imagefiles - entry_obj_imagefiles()
    40    -  activate - entry_obj_activate()
    41    -  deactivate - entry_obj_filemap()
    42    -  dependents - entry_obj_dependents()
    43    -  dependencies - entry_obj_dependencies()
    44    -  depends - entry_obj_depends()
     24   - '''name''' - '''''entry_obj_prop'''''()
     25   - '''portfile''' - '''''entry_obj_prop'''''()
     26   - '''url''' - '''''entry_obj_prop'''''()
     27   - '''location''' - '''''entry_obj_prop'''''()
     28   - '''epoch''' - '''''entry_obj_prop'''''()
     29   - '''version''' - '''''entry_obj_prop'''''()
     30   - '''revision''' - '''''entry_obj_prop'''''()
     31   - '''variants''' - '''''entry_obj_prop'''''()
     32   - '''default_variants''' - '''''entry_obj_prop'''''()
     33   - '''date''' - '''''entry_obj_prop'''''()
     34   - '''state''' - '''''entry_obj_prop'''''()
     35   - '''installtype''' - '''''entry_obj_prop'''''()
     36   - '''map''' - '''''entry_obj_filemap'''''()
     37   - '''unmap''' - '''''entry_obj_filemap'''''()
     38   - '''files''' - '''''entry_obj_files'''''()
     39   - '''imagefiles''' - '''''entry_obj_imagefiles'''''()
     40   - '''activate''' - '''''entry_obj_activate'''''()
     41   - '''deactivate''' - '''''entry_obj_filemap'''''()
     42   - '''dependents''' - '''''entry_obj_dependents'''''()
     43   - '''dependencies''' - '''''entry_obj_dependencies'''''()
     44   - '''depends''' - '''''entry_obj_depends'''''()
    4545
    4646 - `item cmd ?arg ...?`
    4747  - Implemented in item.c
    4848  - Commands are:
    49    - create - item_create()
    50    -  search - item_search()
    51    -  exists - item_exists()
    52    -  others are commented-out (retain, release, name, url, path, worker, options, and variants)
     49   - '''create''' - '''''item_create'''''()
     50   - '''search''' - '''''item_search'''''()
     51   - '''exists''' - '''''item_exists'''''()
     52   - others are commented-out (retain, release, name, url, path, worker, options, and variants)
    5353
    5454 - `${item} cmd ?arg ...?`
    5555  - Implemented in itemobj.c
    5656  - Commands are:
    57    - retain - item_obj_retain()
    58    - release - item_obj_release()
    59    - key - item_obj_key()
     57   - '''retain''' - '''''item_obj_retain'''''()
     58   - '''release''' - '''''item_obj_release'''''()
     59   - '''key''' - '''''item_obj_key'''''()
    6060
    6161 - Top-level registry commands (implemented in registry.c):
    62    - registry::open - registry_open()
    63    - registry::close - registry_close()
    64    - registry::read - registry_read()
    65    - registry::write - registry_write()
    66    - registry::entry - entry_cmd()
     62   - '''registry::open''' - '''''registry_open'''''()
     63   - '''registry::close''' - '''''registry_close'''''()
     64   - '''registry::read''' - '''''registry_read'''''()
     65   - '''registry::write''' - '''''registry_write'''''()
     66   - '''registry::entry''' - '''''entry_cmd'''''()
    6767
    6868=== C code files === #reg20_c_code
    6969==== entry.[ch] ==== #reg20_entry_c
    70  - void delete_entry(ClientData clientData)
     70 - void '''''delete_entry'''''(ClientData clientData)
    7171  - to be used as the 'Tcl_CmdDeleteProc' for an entry object
    72  - int entry_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     72 - int '''''entry_cmd'''''(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
    7373  - implements "registry::entry cmd ?arg ...?"
    7474
    7575==== entryobj.[ch] ==== #reg20_entryobj_c
    76  - int entry_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     76 - int '''''entry_obj_cmd'''''(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
    7777  - implements "${entry} cmd ?arg ...?" (procs for entry objects from "registry::entry")
    7878
     
    8282
    8383==== item.[ch] ==== #reg20_item_c
    84  - int item_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     84 - int '''''item_cmd'''''(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
    8585  - implements "item cmd ?arg ...?"
    8686
    8787==== itemobj.[ch] ==== #reg20_itemobj_c
    88  - int item_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     88 - int '''''item_obj_cmd'''''(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
    8989  - implements "${item} cmd ?arg ...?" (procs for item objects from "item"
    9090
    9191==== registry.[ch] ==== #reg20_registry_c
    92  - reg_registry* registry_for(Tcl_Interp* interp, int status)
     92 - reg_registry* '''''registry_for'''''(Tcl_Interp* interp, int status)
    9393  - Get the appropriate registry for the given Tcl interpreter
    94  - int registry_failed(Tcl_Interp* interp, reg_error* errPtr)
     94 - int '''''registry_failed'''''(Tcl_Interp* interp, reg_error* errPtr)
    9595  - Sets a Tcl object result based on errPtr
    96  - int Registry_Init(Tcl_Interp* interp)
     96 - int '''''Registry_Init'''''(Tcl_Interp* interp)
    9797
    9898==== util.[ch] ==== #reg20_util_c
    99  - char* unique_name(Tcl_Interp* interp, char* prefix)
     99 - char* '''''unique_name'''''(Tcl_Interp* interp, char* prefix)
    100100  - Generate a unique proc name starting with the given prefix (eg, ''<prefix>123'', ''<prefix>124'', etc)
    101  - int parse_flags(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[], int* start, option_spec options[], int* flags)
     101 - int '''''parse_flags'''''(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[], int* start, option_spec options[], int* flags)
    102102  - Handle flags ('''-flag''') in Tcl command strings
    103  - void* get_object(Tcl_Interp* interp, char* name, char* type, Tcl_ObjCmdProc* proc, reg_error* errPtr)
     103 - void* '''''get_object'''''(Tcl_Interp* interp, char* name, char* type, Tcl_ObjCmdProc* proc, reg_error* errPtr)
    104104  - Retrieves the object whose proc is named by the given name
    105  - int set_object(Tcl_Interp* interp, char* name, void* value, char* type, Tcl_ObjCmdProc* proc, Tcl_CmdDeleteProc* deleteProc, reg_error* errPtr)
     105 - int '''''set_object'''''(Tcl_Interp* interp, char* name, void* value, char* type, Tcl_ObjCmdProc* proc, Tcl_CmdDeleteProc* deleteProc, reg_error* errPtr)
    106106  - Sets the object whose proc is named by the given name
    107  - int set_entry(Tcl_Interp* interp, char* name, reg_entry* entry, reg_error* errPtr)
     107 - int '''''set_entry'''''(Tcl_Interp* interp, char* name, reg_entry* entry, reg_error* errPtr)
    108108  - Sets a given name to be an entry object
    109  - void set_sqlite_result(Tcl_Interp* interp, sqlite3* db, const char* query)
     109 - void '''''set_sqlite_result'''''(Tcl_Interp* interp, sqlite3* db, const char* query)
    110110  - Reports a sqlite3 error to Tcl
    111  - int all_objects(Tcl_Interp* interp, sqlite3* db, char* query, char* prefix, set_object_function* setter)
     111 - int '''''all_objects'''''(Tcl_Interp* interp, sqlite3* db, char* query, char* prefix, set_object_function* setter)
    112112  - Sets the result of the Tcl interpreter to all objects returned by a query
    113  - const char* string_or_null(Tcl_Obj* obj)
     113 - const char* '''''string_or_null'''''(Tcl_Obj* obj)
    114114  - Return the `char *` for a Tcl object, or if it is a string with only NULL, return NULL
    115  - int recast(void* userdata, cast_function* fn, free_function* del, void*** outv, void** inv, int inc, reg_error* errPtr)
     115 - int '''''recast'''''(void* userdata, cast_function* fn, free_function* del, void*** outv, void** inv, int inc, reg_error* errPtr)
    116116  -
    117  - int entry_to_obj(Tcl_Interp* interp, Tcl_Obj** obj, reg_entry* entry, reg_error* errPtr)
     117 - int '''''entry_to_obj'''''(Tcl_Interp* interp, Tcl_Obj** obj, reg_entry* entry, reg_error* errPtr)
    118118  - Return Tcl string for a given entry object
    119  - int list_entry_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs, reg_entry** entries, int entry_count, reg_error* errPtr)
     119 - int '''''list_entry_to_obj'''''(Tcl_Interp* interp, Tcl_Obj*** objs, reg_entry** entries, int entry_count, reg_error* errPtr)
    120120  - Call entry_to_obj() for an array of entries
    121  - void free_strings(void* userdata UNUSED, char** strings, int count)
     121 - void '''''free_strings'''''(void* userdata UNUSED, char** strings, int count)
    122122  - Defined in util.h but doesn't actually exist
    123  - int list_obj_to_string(char*** strings, Tcl_Obj** objv, int objc, reg_error* errPtr)
     123 - int '''''list_obj_to_string'''''(char*** strings, Tcl_Obj** objv, int objc, reg_error* errPtr)
    124124  - Convert an array of Tcl objects to `char *` array
    125  - int list_string_to_obj(Tcl_Obj*** objv, char** strings, int objc, reg_error* errPtr)
     125 - int '''''list_string_to_obj'''''(Tcl_Obj*** objv, char** strings, int objc, reg_error* errPtr)
    126126  - Convert an array of `char *` to Tcl object array
    127127
     
    133133=== C code files === #creg_c_code
    134134==== entry.[ch] ==== #creg_entry_c
     135 - reg_entry* '''''reg_entry_create'''''(reg_registry* reg, char* name, char* version, char* revision, char* variants, char* epoch, reg_error* errPtr)
     136  - Creates a new entry in the ports registry
     137 - reg_entry* '''''reg_entry_open'''''(reg_registry* reg, char* name, char* version, char* revision, char* variants, char* epoch, reg_error* errPtr)
     138  - Opens an existing entry in the registry
     139 - int '''''reg_entry_delete'''''(reg_entry* entry, reg_error* errPtr)
     140  - Deletes an entry. After calling this, `reg_entry_free` needs to be called manually on the entry. Care should be taken to not free the entry if this deletion is rolled back
     141 - void '''''reg_entry_free'''''(reg_entry* entry)
     142  - Frees an entry
     143 - int '''''reg_entry_search'''''(reg_registry* reg, char** keys, char** vals, int key_count, int strategy, reg_entry*** entries, reg_error* errPtr)
     144  - Searches the registry for ports for which each key's value is equal to the given value. To find all ports, pass a key_count of 0
     145 - int '''''reg_entry_imaged'''''(reg_registry* reg, const char* name, const char* version, const char* revision, const char* variants, reg_entry*** entries, reg_error* errPtr)
     146  - Finds ports which are installed as an image, and/or those which are active in the filesystem. When the install mode is 'direct', this will be equivalent to `reg_entry_installed`
     147 - int '''''reg_entry_installed'''''(reg_registry* reg, char* name, reg_entry*** entries, reg_error* errPtr)
     148  - Finds ports which are active in the filesystem. These ports are able to meet dependencies, and properly own the files they map.
     149 - int '''''reg_entry_owner'''''(reg_registry* reg, char* path, reg_entry** entry, reg_error* errPtr)
     150  - Finds the owner of a given file. Only ports active in the filesystem will be returned
     151 - int '''''reg_entry_propget'''''(reg_entry* entry, char* key, char** value, reg_error* errPtr)
     152  - Gets a named property of an entry
     153 - int '''''reg_entry_propset'''''(reg_entry* entry, char* key, char* value, reg_error* errPtr)
     154  - Sets a named property of an entry
     155 - int '''''reg_entry_map'''''(reg_entry* entry, char** files, int file_count, reg_error* errPtr)
     156  - Maps files to the given port in the filemap. The list of files must not contain files that are already mapped to the given port
     157 - int '''''reg_entry_unmap'''''(reg_entry* entry, char** files, int file_count, reg_error* errPtr)
     158  - Unaps files from the given port in the filemap. The files must be owned by the given entry
     159 - int '''''reg_entry_files'''''(reg_entry* entry, char*** files, reg_error* errPtr)
     160  - Gets a list of files owned by the given port. These files are active in the filesystem and could be different from the port's imagefiles
     161 - int '''''reg_entry_imagefiles'''''(reg_entry* entry, char*** files, reg_error* errPtr)
     162  - Gets a list of files provided by the given port. These files are in the port image and do not necessarily correspond to active files on the filesystem
     163 - int '''''reg_entry_activate'''''(reg_entry* entry, char** files, char** as_files, int file_count, reg_error* errPtr)
     164  - Sets an entry's files as being active in the filesystem
     165 - int '''''reg_entry_deactivate'''''(reg_entry* entry, char** files, int file_count, reg_error* errPtr)
     166  - Deactivates files owned by a given entry
     167 - int '''''reg_entry_dependents'''''(reg_entry* entry, reg_entry*** dependents, reg_error* errPtr)
     168  - Gets a list of ports that depend on this one
     169 - int '''''reg_entry_dependencies'''''(reg_entry* entry, reg_entry*** dependencies, reg_error* errPtr)
     170  - Gets a list of ports that this one depends on
     171 - int '''''reg_entry_depends'''''(reg_entry* entry, char* name, reg_error* errPtr)
     172  - Sets the given port to depend on the named port
     173 - int '''''reg_all_open_entries'''''(reg_registry* reg, reg_entry*** entries)
     174  - Fetches a list of all open entries
    135175
    136176==== registry.[ch] ==== #creg_registry_c