Documentation
¶
Index ¶
- func Makepkg(opts ...MakepkgParameters) error
- func Query(pkgs []string, opts ...QueryParameters) error
- func RawFileInfo(filepath string) (string, error)
- func Remove(pkgs string, opts ...RemoveParameters) error
- func RemoveList(pkgs []string, opts ...RemoveParameters) error
- func RepoAdd(dbfile, pkgfile string, opts ...RepoAddParameters) error
- func Sync(pkgs string, opts ...SyncParameters) error
- func SyncList(pkgs []string, opts ...SyncParameters) error
- func Upgrade(files string, opts ...UpgradeParameters) error
- func UpgradeList(files []string, opts ...UpgradeParameters) error
- type MakepkgParameters
- type OutdatedPackage
- type PackageInfo
- type PackageInfoFull
- type QueryParameters
- type RemoveParameters
- type RepoAddParameters
- type SearchOptions
- type SearchResult
- type SyncParameters
- type UpgradeParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Makepkg ¶
func Makepkg(opts ...MakepkgParameters) error
This command will build a package in directory provided in options. Function is safe for concurrent usage. Can be called from multiple goruotines, when options Install or SyncDeps are false.
func Query ¶
func Query(pkgs []string, opts ...QueryParameters) error
Get information about installed packages.
func RawFileInfo ¶
Get raw file infor for provided package using `pacman -Qp`.
func RemoveList ¶
func RemoveList(pkgs []string, opts ...RemoveParameters) error
Remove packages from system.
func RepoAdd ¶
func RepoAdd(dbfile, pkgfile string, opts ...RepoAddParameters) error
This function will add new packages to database. You should provide valid path for database file and path to package you want to add.
func Sync ¶
func Sync(pkgs string, opts ...SyncParameters) error
Executes pacman sync command. This command will read sync options and form command based on first elements from the array.
func SyncList ¶
func SyncList(pkgs []string, opts ...SyncParameters) error
Sync command for package string list.
func Upgrade ¶
func Upgrade(files string, opts ...UpgradeParameters) error
Install packages from files.
func UpgradeList ¶
func UpgradeList(files []string, opts ...UpgradeParameters) error
Install packages from files.
Types ¶
type MakepkgParameters ¶
type MakepkgParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // Additional parameters, that will be appended to command as arguements. AdditionalParams []string // Directory where process will be executed. Dir string // Specify a key to use for gpg signing instead of the default. [--key <key>] GpgKey string // Use an alternate build script (not 'PKGBUILD'). [-p <file>] File string // Ignore incomplete arch field in PKGBUILD. [--ignorearch] IgnoreEach bool // Clean up work files after build. [--clean] Clean bool // Remove $srcdir/ dir before building the package. [--cleanbuild] CleanBuild bool // Skip all dependency checks. [--nodeps] NoDeps bool // Do not extract source files (use existing $srcdir/ dir). [--noextract] NoExtract bool // Overwrite existing package. [--force] Force bool // Generate integrity checks for source files. [--geninteg] Geinteg bool // Install package after successful build. [--install] Install bool // Log package build process. [--log] Log bool // Disable colorized output messages. [--nocolor] NoColor bool // Download and extract files only. [--nobuild] NpBuild bool // Remove installed dependencies after a successful build. [--rmdeps] RmDeps bool // Repackage contents of the package without rebuilding. [--repackage] Repackage bool // Install missing dependencies with pacman. [--syncdeps] SyncDeps bool // Use an alternate config file (not '/etc/makepkg.conf'). [--config <file>] Config string // Do not update VCS sources. [--holdver] HoldVer bool // Do not create package archive. [--noarchive] NoArchive bool // Do not run the check() function in the PKGBUILD. [--nocheck] NoCheck bool // Do not run the prepare() function in the PKGBUILD. [--noprepare] NoPrepare bool // Do not create a signature for the package. [--nosign] NoSign bool // Sign the resulting package with gpg. [--sign] Sign bool // Do not verify checksums of the source files. [--skipchecksums] SkipCheckSums bool // Do not perform any verification checks on source files. [--skipinteg] SkipIntegrityChecks bool // Do not verify source files with GPG signatures. [--skippgpcheck] SkipPgpCheck bool // Do not reinstall up to date packages. [--needed] Needed bool // Do not ask for any confirmation. [--noconfirm] NoConfirm bool // Do not show a progress bar when downloading files. [--noprogressbar] NoProgressBar bool // Install packages as non-explicitly installed. [--asdeps] AsDeps bool }
Options for building packages.
type OutdatedPackage ¶
Outdated package.
type PackageInfo ¶
type PackageInfoFull ¶
type PackageInfoFull struct { Name string Version string Description string Architecture string URL string Licenses string Groups string Provides string DependsOn string OptionalDeps string RequiredBy string OptionalFor string ConflictsWith string Replaces string InstalledSize string Packager string BuildDate string InstallDate string InstallReason string InstallScript string ValidatedBy string }
type QueryParameters ¶
type QueryParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // List packages explicitly installed. Explicit bool // List packages installed as dependencies. Deps bool // Query only for packages installed from official repositories. Native bool // Query for packages installed from other sources. Foreign bool // Unrequired packages (not a dependency for other one). Unrequired bool // View all members of a package group. Groups bool // View package information (-ii for backup files). Info []bool // Check that package files exist (-kk for file properties). Check []bool // List the files owned by the queried package. List []bool // Query a package file instead of the database. File string // List packages to upgrade. [-u] Upgrade bool // Additional queue parameters. AdditionalParams []string }
Query parameters for pacman packages.
func QueryDefault ¶
func QueryDefault() *QueryParameters
type RemoveParameters ¶
type RemoveParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // Run with sudo priveleges. [sudo] Sudo bool // Do not ask for any confirmation. [--noconfirm] NoConfirm bool // Remove with all unnecessary packages. [--recursive] Recursive bool // Remove with all explicitly installed deps. [-ss] ForceRecursive bool // Use cascade when removing packages. [--cascade] Cascade bool // Remove configuration files aswell. [--nosave] WithConfigs bool // Additional parameters, that will be appended to command as arguements. AdditionalParams []string }
Optional parameters for pacman remove command.
func RemoveDefault ¶
func RemoveDefault() *RemoveParameters
type RepoAddParameters ¶
type RepoAddParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // Additional parameters, that will be appended to command as arguements. AdditionalParams []string // Run with sudo priveleges. [sudo] Dir string // Use the specified key to sign the database. [--key <file>] Key string // Skip existing and add only new packages. [--new] Sudo bool // Directory where process will be executed. New bool // Remove old package file from disk after updating database. [--remove] Remove bool // Do not add package if newer version exists. [--prevent-downgrade] PreventDowngrade bool // Turn off color in output. [--nocolor] NoColor bool // Sign database with GnuPG after update. [--sign] Sign bool // Verify database signature before update. [--verify] Verify bool }
Parameters for adding packages to pacman repo.
func RepoAddDefaultOptions ¶
func RepoAddDefaultOptions() *RepoAddParameters
type SearchOptions ¶
type SearchOptions struct { // Run with sudo priveleges. [sudo] Sudo bool // Download fresh package databases from the server. [--refresh] Refresh bool // Stdin from user is command will ask for something. Stdin io.Reader }
Options to apply when searching for some package.
func SearchDefault ¶
func SearchDefault() *SearchOptions
type SearchResult ¶
Structure to recieve from search result
func Search ¶
func Search(re string, opts ...SearchOptions) ([]SearchResult, error)
Search for packages.
type SyncParameters ¶
type SyncParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // Run with sudo priveleges. [sudo] Sudo bool // Do not reinstall up to date packages. [--needed] Needed bool // Do not ask for any confirmation. [--noconfirm] NoConfirm bool // Do not show a progress bar when downloading files. [--noprogressbar] NoProgressBar bool // Do not execute the install scriptlet if one exists. [--noscriptlet] NoScriptlet bool // Use relaxed timout when loading packages. [--disable-download-timeout] NoTimeout bool // Install packages as non-explicitly installed. [--asdeps] AsDeps bool // Install packages as explictly installed. [--asexplict] AsExplict bool // Download fresh package databases from the server. [--refresh] Refresh []bool // Upgrade programms that are outdated. [--sysupgrade] Upgrade []bool // View a list of packages in a repo. [--list] List []bool // Only download, but do not install package. [--downloadonly] DownloadOnly bool // Clean old packages from cache directory. [--clean] Clean bool // Clean all packages from cache directory. [-cc] CleanAll bool // Additional parameters, that will be appended to command as arguements. AdditionalParams []string }
Optional parameters for pacman sync command.
func SyncDefault ¶
func SyncDefault() *SyncParameters
type UpgradeParameters ¶
type UpgradeParameters struct { Stdout io.Writer Stderr io.Writer Stdin io.Reader // Run with sudo priveleges. [sudo] Sudo bool // Do not reinstall up to date packages. [--needed] Needed bool // Do not ask for any confirmation. [--noconfirm] NoConfirm bool // Do not show a progress bar when downloading files. [--noprogressbar] NoProgressBar bool // Do not execute the install scriptlet if one exists. [--noscriptlet] NoScriptlet bool // Install packages as non-explicitly installed. [--asdeps] AsDeps bool // Install packages as explictly installed. [--asexplict] AsExplict bool // Additional parameters, that will be appended to command as arguements. AdditionalParams []string }
Options to apply when searching for some package.
func UpgradeDefault ¶
func UpgradeDefault() *UpgradeParameters