Documentation
¶
Index ¶
- func PrintDependencyGraph(packages []*meta.PackageInfo, order []meta.PackageID)
- func TopologicalSort(packages []*meta.PackageInfo) ([]meta.PackageID, error)
- type BuildNode
- type Client
- func (c *Client) Install(pkgNameOrLocalFileList []string, prefix string, noConfirm bool, noResolve bool) error
- func (c *Client) InstallToSdk(pkgNameOrLocalFileList []string, noConfirm bool, noResolve bool) error
- func (c *Client) ListPackages(arch string) error
- func (c *Client) PatchLibFiles(tgtLibdir, installLibdir, installPrefix string) error
- func (c *Client) ResolveDependencies(requested []string, arch string) (map[string]meta.IndexEntry, error)
- func (c *Client) Uninstall(pkgName, prefix string) error
- func (c *Client) XCompile(packageNames []string, arch string, jobs int, keepGoing bool) error
- type DB
- type Installed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintDependencyGraph ¶
func PrintDependencyGraph(packages []*meta.PackageInfo, order []meta.PackageID)
func TopologicalSort ¶
func TopologicalSort(packages []*meta.PackageInfo) ([]meta.PackageID, error)
TopologicalSort performs topological sort on package dependencies.
Types ¶
type BuildNode ¶
type BuildNode struct {
Info *meta.PackageInfo
Dependencies []meta.PackageID
}
BuildNode represents one concrete package version in the build graph.
type Client ¶
Client holds runtime info.
func (*Client) Install ¶
func (c *Client) Install(pkgNameOrLocalFileList []string, prefix string, noConfirm bool, noResolve bool) error
Install downloads and installs the named package into prefix. @note prefix must be an absolute path
func (*Client) InstallToSdk ¶
func (c *Client) InstallToSdk(pkgNameOrLocalFileList []string, noConfirm bool, noResolve bool) error
Install downloads and installs the named package into OHOS sdk
func (*Client) ListPackages ¶
ListPackages fetches index.json and prints packages for arch.
func (*Client) PatchLibFiles ¶
PatchLibFiles patches .la and .pc files in libdir similarly to the shell snippet. libdir must be an absolute or relative path. tgtLibdir is the directory that libraries actually in. installLibdir & installPrefix is the libdir/prefix in the configuration files. Returns an error if one or more file operations fail. NOTE: libdir and installPrefix must be absolute paths
func (*Client) ResolveDependencies ¶
func (c *Client) ResolveDependencies(requested []string, arch string) (map[string]meta.IndexEntry, error)
ResolveDependencies takes initial requested package names (each string may be a simple name) and returns a map[name]IndexEntry of chosen versions to install (values order not guaranteed). It uses index.json and package manifests for transitive deps.
type DB ¶
DB wrapper