USM manages dependencies through resource references organized by lifecycle phase. Dependencies are specified in the depends section of MANIFEST.usm and validated before package operations.
Resources required for the package to function when installed.
Used for: Shared libraries, runtime binaries, data files Checked during: Installation, dependency resolution Example:
"runtime": [
"lib:libc.so.6",
"lib:libglib-2.0.so",
"lib:libgio-2.0.so",
"res:common-themes"
]
Resources required to compile the package from source.
Used for: Compilers, build tools, development libraries Checked during: Build operations Example:
"build": [
"bin:gcc",
"bin:make",
"pc:glib-2.0.pc",
"inc:glib-2.0",
"vapi:gio-2.0.vapi"
]
Resources required to run management scripts (build, install, remove).
Used for: Shell interpreters, system utilities Checked during: All script executions Example:
"manage": [
"bin:bash",
"bin:ls",
"bin:find"
]
Resources required to download and extract source code.
Used for: Download tools, archive utilities
Checked during: Source acquisition
Optional: Only required when execs.acquire is specified
Example:
"acquire": [
"bin:bash",
"bin:wget",
"bin:tar",
"bin:gzip"
]
All dependencies use the format [resource-type]:[resource-name] where the resource name refers to an actual installed file on the filesystem, NOT a package name.
Important: Dependencies must reference specific files, not package names. For example:
bin:find to reference the find utility executable, NOT bin:findutilsbin:ls to reference the ls executable, NOT bin:coreutilslib:libssl.so to reference the SSL library, NOT bin:opensslResource references are resolved by checking for the existence of the specified file in the appropriate system directories.
{
"runtime": [
"lib:libssl.so.1.1",
"lib:libcrypto.so.1.1",
"lib:libz.so.1",
"cfg:ssl/certs/ca-certificates.crt"
]
}
{
"build": [
"bin:gcc",
"bin:pkg-config",
"pc:openssl.pc",
"pc:zlib.pc",
"inc:openssl.h",
"inc:zlib.h"
]
}
{
"build": [
"pc:glib-2.0.pc",
"pc:gtk-4.pc",
"inc:glib-2.0.h",
"inc:gtk-4.h",
"vapi:gtk-4.vapi"
],
"runtime": [
"lib:libglib-2.0.so",
"lib:libgtk-4.so"
]
}
USM validates dependencies by:
Dependencies are resolved in this priority:
When dependencies are missing:
{
"build": [
"bin:gcc",
"bin:make",
"pc:libname.pc"
],
"runtime": [
"lib:libname.so"
]
}
{
"build": [
"bin:valac",
"pc:glib-2.0.pc",
"pc:gobject-2.0.pc",
"vapi:glib-2.0.vapi"
],
"runtime": [
"lib:libglib-2.0.so",
"lib:libgobject-2.0.so"
]
}
{
"build": [
"bin:meson",
"bin:ninja",
"bin:pkg-config"
],
"manage": [
"bin:bash"
]
}
{
"build": [
"bin:cmake",
"bin:make",
"bin:pkg-config"
],
"manage": [
"bin:bash"
]
}
USM can integrate with system package managers for dependency resolution:
USM handles different system layouts:
Some resource types provide virtual dependencies:
bin:sh - Any POSIX shellbin:cc - Any C compilerlib:libc.so.6 - Standard C library{
"runtime": [
"lib:libgtk-4.so",
"lib:libgdk_pixbuf-2.0.so",
"lib:libpango-1.0.so",
"res:shared-mime-info",
"res:hicolor-icon-theme"
],
"build": [
"bin:gcc",
"pc:gtk-4.pc",
"bin:pkg-config"
]
}
{
"runtime": [
"lib:libreadline.so",
"lib:libncurses.so"
],
"build": [
"bin:gcc",
"inc:readline",
"inc:ncurses"
],
"manage": [
"bin:bash"
]
}
{
"build": [
"bin:gcc",
"bin:pkg-config",
"pc:glib-2.0.pc"
],
"runtime": [
"lib:libglib-2.0.so"
],
"provides": [
"lib:libmylib.so",
"inc:mylib.h",
"pc:mylib.pc"
]
}
Common causes and solutions:
When multiple packages provide same resource:
Avoid circular dependency chains:
This guide provides comprehensive information for managing USM package dependencies effectively.