dpkg 1.21.11
Data Structures | Enumerations | Functions
Architecture database
Collaboration diagram for Architecture database:

Data Structures

struct  dpkg_arch
 

Enumerations

enum  dpkg_arch_type {
  DPKG_ARCH_NONE , DPKG_ARCH_EMPTY , DPKG_ARCH_ILLEGAL , DPKG_ARCH_WILDCARD ,
  DPKG_ARCH_ALL , DPKG_ARCH_NATIVE , DPKG_ARCH_FOREIGN , DPKG_ARCH_UNKNOWN
}
 

Functions

const char * dpkg_arch_name_is_illegal (const char *name) DPKG_ATTR_NONNULL(1)
 Verify if the architecture name is valid. More...
 
struct dpkg_archdpkg_arch_find (const char *name)
 Retrieve the struct dpkg_arch for the given architecture. More...
 
struct dpkg_archdpkg_arch_get (enum dpkg_arch_type type)
 Return the struct dpkg_arch corresponding to the architecture type. More...
 
struct dpkg_archdpkg_arch_get_list (void)
 Return the complete list of architectures. More...
 
void dpkg_arch_reset_list (void)
 Reset the list of architectures. More...
 
const char * dpkg_arch_describe (const struct dpkg_arch *arch)
 Return a descriptive architecture name. More...
 
struct dpkg_archdpkg_arch_add (const char *name)
 Add a new foreign dpkg_arch architecture. More...
 
void dpkg_arch_unmark (const struct dpkg_arch *arch)
 Unmark a foreign dpkg_arch architecture. More...
 
void dpkg_arch_load_list (void)
 Load the architecture database. More...
 
void dpkg_arch_save_list (void)
 Save the architecture database. More...
 
void varbuf_add_archqual (struct varbuf *vb, const struct dpkg_arch *arch)
 

Detailed Description

Enumeration Type Documentation

◆ dpkg_arch_type

Enumerator
DPKG_ARCH_NONE 
DPKG_ARCH_EMPTY 
DPKG_ARCH_ILLEGAL 
DPKG_ARCH_WILDCARD 
DPKG_ARCH_ALL 
DPKG_ARCH_NATIVE 
DPKG_ARCH_FOREIGN 
DPKG_ARCH_UNKNOWN 

Function Documentation

◆ dpkg_arch_add()

struct dpkg_arch * dpkg_arch_add ( const char *  name)

Add a new foreign dpkg_arch architecture.

References dpkg_arch_find(), DPKG_ARCH_FOREIGN, DPKG_ARCH_UNKNOWN, dpkg_arch::name, and dpkg_arch::type.

Here is the call graph for this function:

◆ dpkg_arch_describe()

const char * dpkg_arch_describe ( const struct dpkg_arch arch)

Return a descriptive architecture name.

References C_, DPKG_ARCH_EMPTY, DPKG_ARCH_NONE, dpkg_arch::name, and dpkg_arch::type.

◆ dpkg_arch_find()

struct dpkg_arch * dpkg_arch_find ( const char *  name)

Retrieve the struct dpkg_arch for the given architecture.

Create a new structure for the architecture if it is not yet known from the system, in that case it will have type == DPKG_ARCH_UNKNOWN, if the architecture is illegal it will have type == DPKG_ARCH_ILLEGAL, if name is an empty string it will have type == DPKG_ARCH_EMPTY, and if it is NULL then it will have type == DPKG_ARCH_NONE.

Parameters
nameThe architecture name.

References dpkg_arch::name, and dpkg_arch::type.

Referenced by dpkg_arch_add(), and f_architecture().

Here is the caller graph for this function:

◆ dpkg_arch_get()

struct dpkg_arch * dpkg_arch_get ( enum dpkg_arch_type  type)

Return the struct dpkg_arch corresponding to the architecture type.

The function only returns instances for types which are unique. For forward-compatibility any unknown type will return NULL.

References DPKG_ARCH_NONE, and dpkg_arch::type.

Referenced by deparchsatisfied(), pkg_blank(), and printarch().

Here is the caller graph for this function:

◆ dpkg_arch_get_list()

struct dpkg_arch * dpkg_arch_get_list ( void  )

Return the complete list of architectures.

In fact it returns the first item of the linked list and you can traverse the list by following arch->next until it's NULL.

Referenced by print_foreign_arches().

Here is the caller graph for this function:

◆ dpkg_arch_load_list()

void dpkg_arch_load_list ( void  )

Load the architecture database.

References DPKG_DB_ARCH_FILE, and dpkg_db_get_path().

Referenced by print_foreign_arches().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dpkg_arch_name_is_illegal()

const char * dpkg_arch_name_is_illegal ( const char *  name)

Verify if the architecture name is valid.

Returns NULL if the architecture name is valid. Otherwise it returns a string describing why it's not valid. Currently it ensures the name starts with an alphanumeric and is then composed of a combinations of hyphens and alphanumerics.

The function will abort if you pass it a NULL pointer.

Parameters
nameThe architecture name to verify.

References _, and internerr.

Referenced by f_architecture(), pkg_spec_is_illegal(), and validate_archname().

Here is the caller graph for this function:

◆ dpkg_arch_reset_list()

void dpkg_arch_reset_list ( void  )

Reset the list of architectures.

Must be called before nffreeall() to ensure we don't point to unallocated memory.

Referenced by pkg_hash_reset().

Here is the caller graph for this function:

◆ dpkg_arch_save_list()

void dpkg_arch_save_list ( void  )

Save the architecture database.

◆ dpkg_arch_unmark()

void dpkg_arch_unmark ( const struct dpkg_arch arch)

Unmark a foreign dpkg_arch architecture.

◆ varbuf_add_archqual()

void varbuf_add_archqual ( struct varbuf vb,
const struct dpkg_arch arch 
)

References DPKG_ARCH_EMPTY, DPKG_ARCH_NONE, dpkg_arch::name, dpkg_arch::type, varbuf_add_char(), and varbuf_add_str.

Referenced by pkg_infodb_get_file(), and varbufdependency().

Here is the call graph for this function:
Here is the caller graph for this function: