Merge pull request #459 from Morganamilo/doc2

Update docs
This commit is contained in:
Anna authored and GitHub committed 2018-06-04 20:14:30 +01:00
commit ab317e52fe
5 files changed
+106 -39

No files matched your search

+6
View File
@@ -93,6 +93,12 @@ Currently yay Depends on:
* Yay does not display colored output. How do I fix it?
Make sure you have the `Color` option in your `/etc/pacman.conf` [#123](https://github.com/Jguer/yay/issues/123)
* Sometimes diffs are printed to the terminal and other times they are pages
via less. How do I fix this?
Yay uses `git diff` to display diffs, by default git tells less to not page
if the output can fit one terminal length. This can be overridden by
exporting your own flags `export LESS=SRX`.
## Examples of Custom Operations
* `yay <Search Term>` presents package selection menu
+10 -1
View File
@@ -35,6 +35,9 @@ New operations:
yay {-P --print} [options]
yay {-G --getpkgbuild} [package(s)]
New options:
--repo Assume targets are from the repositories
-a --aur Assume targets are from the AUR
Permanent configuration options:
--save Causes the following options to be saved back to the
config file when used
@@ -53,7 +56,7 @@ Permanent configuration options:
--config <file> pacman.conf file to use
--requestsplitn <n> Max amount of packages to query per AUR request
--sortby <field> Sort AUR results by a specific field during search
--sortby <field> Sort AUR results by a specific field during search
--answerclean <a> Set a predetermined answer for the clean build menu
--answeredit <a> Set a predetermined answer for the edit pkgbuild menu
--answerupgrade <a> Set a predetermined answer for the upgrade menu
@@ -70,6 +73,8 @@ Permanent configuration options:
--nodevel Do not check development packages
--gitclone Use git clone for PKGBUILD retrieval
--nogitclone Never use git clone for PKGBUILD retrieval
--showdiffs Show diffs for build files
--noshowdiffs Always show the entire PKGBUILD
--rebuild Always build target packages
--rebuildall Always build all AUR packages
--norebuild Skip package build if in cache and up to date
@@ -77,6 +82,10 @@ Permanent configuration options:
--redownload Always download pkgbuilds of targets
--noredownload Skip pkgbuild download if in cache and up to date
--redownloadall Always download pkgbuilds of all AUR packages
--provides Look for matching provders when searching for packages
--noprovides Just look for packages by pkgname
--pgpfetch Prompt to import PGP keys from PKGBUILDs
--nopgpfetch Don't prompt to import PGP keys
--sudoloop Loop sudo calls in the background to avoid timeout
--nosudoloop Do not loop sudo calls in the background
+9 -9
View File
@@ -92,7 +92,7 @@ func (dp *depPool) ResolveTargets(pkgs []string) error {
// skip targets already satisfied
// even if the user enters db/pkg and aur/pkg the latter will
// still get skiped even if it's from a different database to
// still get skipped even if it's from a different database to
// the one specified
// this is how pacman behaves
if dp.hasPackage(target.DepString()) {
@@ -109,7 +109,7 @@ func (dp *depPool) ResolveTargets(pkgs []string) error {
continue
}
// if theres a different priefix only look in that repo
// If there'ss a different priefix only look in that repo
if target.Db != "" {
singleDb, err = alpmHandle.SyncDbByName(target.Db)
if err != nil {
@@ -128,11 +128,11 @@ func (dp *depPool) ResolveTargets(pkgs []string) error {
continue
} else {
//check for groups
//currently we dont resolve the packages in a group
//currently we don't resolve the packages in a group
//only check if the group exists
//would be better to check the groups from singleDb if
//the user specified a db but theres no easy way to do
//it without making alpm_lists so dont bother for now
//the user specified a db but there's no easy way to do
//it without making alpm_lists so don't bother for now
//db/group is probably a rare use case
group, err := dp.SyncDb.PkgCachebyGroup(target.Name)
if err == nil {
@@ -167,7 +167,7 @@ func (dp *depPool) ResolveTargets(pkgs []string) error {
//
// For example if you were to -S yay then yay -Ss would give:
// yay-git yay-bin yay realyog pacui pacui-git ruby-yard
// These packages will all be added to the cache incase they are needed later
// These packages will all be added to the cache in case they are needed later
// Ofcouse only the first three packages provide yay, the rest are just false
// positives.
//
@@ -315,7 +315,7 @@ func (dp *depPool) resolveAURPackages(pkgs stringSet, explicit bool) error {
}
//assume it's in the aur
//ditch the versioning because the RPC cant handle it
//ditch the versioning because the RPC can't handle it
newAURPackages.set(dep)
}
@@ -376,8 +376,8 @@ func (dp *depPool) findSatisfierAur(dep string) *rpc.Pkg {
// This is mostly used to promote packages from the cache
// to the Install list
// Provide a pacman style provider menu if theres more than one candidate
// This acts slightly differenly from Pacman, It will give
// Provide a pacman style provider menu if there's more than one candidate
// This acts slightly differently from Pacman, It will give
// a menu even if a package with a matching name exists. I believe this
// method is better because most of the time you are choosing between
// foo and foo-git.
+79 -27
View File
@@ -1,5 +1,5 @@
'\" t
.TH "YAY" "8" "2018-02-29" "Yay v3\&.460+" "Yay Manual"
.TH "YAY" "8" "2018\-06\-04" "Yay v6\&.784+" "Yay Manual"
.nh
.ad l
.SH "NAME"
@@ -20,29 +20,29 @@ This manpage only covers options unique to Yay\&. For other options see
\fBpacman(8)\fR\&.
.SH "YAY OPERATIONS"
.PP
\fB\-Y, --yay\fR
\fB\-Y, \-\-yay\fR
.RS 4
Perform yay specific operations\&. This is the default if no other operation is
selected\&.
.RE
.PP
\fB\-P, --print\fR
\fB\-P, \-\-print\fR
.RS 4
Perform yay specific print operations\&.
.RE
.PP
\fB\-G, --getpkgbuild\fR
\fB\-G, \-\-getpkgbuild\fR
.RS 4
Downloads PKGBUILD from ABS or AUR\&.
.RE
.PP
If no arguments are provided 'yay -Syu' will be performed\&.
If no arguments are provided 'yay \-Syu' will be performed\&.
.RE
.PP
If no operation is selected -Y will be assumed\&.
If no operation is selected \-Y will be assumed\&.
.SH "EXTENDED PACMAN OPERATIONS"
.PP
\fB\-S, -Si, -Ss, -Su, -Sc, -Qu\fR
\fB\-S, \-Si, \-Ss, \-Su, \-Sc, \-Qu\fR
.RS 4
These operations are extended to support both AUR and repo packages\&.
.RE
@@ -58,9 +58,23 @@ sources or built packages but will keep already downloaded vcs sources\&.
\fB\-R\fR
.RS 4
Yay will also remove cached data about devel packages\&.
.RE
.SH "YAY OPTIONS (APPLY TO -Y AND --YAY)"
.SH "NEW OPTIONS"
.PP
\fB \-\-repo\fR
.RS 4
Assume all targets are from the repositories\&. Additionally Actions such as
sysupgrade will only act on repository packages\&.
.RE
\fB\-a \-\-aur\fR
.RS 4
Assume all targets are from the AUR\&. Additionally Actions such as
sysupgrade will only act on AUR packages\&.
Note that dependency resolving will still act as normal and include repository
packages\&.
.RE
.SH "YAY OPTIONS (APPLY TO \-Y AND \-\-YAY)"
.PP
\fB<NO OPTION>\fR
.RS 4
@@ -80,7 +94,7 @@ used when migrating to Yay from another AUR helper.
.RS 4
Remove unneeded dependencies\&.
.RE
.SH "PRINT OPTIONS (APPLY TO -P AND --PRINT)"
.SH "PRINT OPTIONS (APPLY TO \-P AND \-\-PRINT)"
\fB\-c \-\-complete\fR
.RS 4
Print a list of all AUR and repo packages\&. This is to allow shell completion
@@ -105,30 +119,30 @@ Print current yay configuration\&.
\fB\-n \-\-numberupgrades\fR
.RS 4
Print number of packages that need to be updated\&. Note this does not perform
a database refresh\&. Run \fByay -Sy\fR Before this for an up to date result\&.
a database refresh\&. Run \fByay \-Sy\fR Before this for an up to date result\&.
.RE
.PP
\fB\-s \-\-stats\fR
.RS 4
Displays information about installed packages and system health\&. If there are
orphaned, out-of-date or packages that no longer exist on the AUR warnings will
orphaned, out\-of\-date or packages that no longer exist on the AUR warnings will
be displayed\&.
.RE
.PP
\fB\-u \-\-upgrades\fR
.RS 4
Print Names of packages that need to be updated\&. Note this does not perform
a database refresh\&. Run \fByay -Sy\fR Before this for an up to date result\&.
a database refresh\&. Run \fByay \-Sy\fR Before this for an up to date result\&.
.RE
.PP
\fB\-w --news\fR
\fB\-w \-\-news\fR
.RS 4
Print new news from the Archlinux homepage\&. News is considered new if it is
newer than the build date of all native packages\&. Pass this twice to show all
avaliable news\&.
available news\&.
.RE
.PP
\fB\-q --quiet\fR
\fB\-q \-\-quiet\fR
.RS 4
Only show titles when printing news\&.
.RE
@@ -271,9 +285,9 @@ Do not check for development packages updates during sysupgrade\&.
\fB\-\-gitclone\fR
.RS 4
Use git to download and update PKGBUILDs\&. PKGBUILDs previously downloaded
using tarball will continue to use tarballs until the package is clean built\&.
Similarly, PKGBUILDs managed with git will continue to use git until the package
is clean built.\&.
using tarball will continue to use tarballs until the package is clean
built\&. Similarly, PKGBUILDs managed with git will continue to use git until
the package is clean built.\&.
.RE
.PP
\fB\-\-nogitclone\fR
@@ -282,6 +296,18 @@ Download and update PKGBUILDs using tarballs\&. The above conditions about
previously installed packages still apply\&.
.RE
.PP
\fB\-\-showdiffs\fR
.RS 4
Show diffs for build files\&. Diffs are shown via \fBgit diff\fR which uses
less by default\&. This behaviour can be changed via git's config, the
\fB$GIT_PAGER\fR or \fB$PAGER\fR environment variables\&.
.RE
.PP
\fB\-\-noshowdiffs\fR
.RS 4
Show diffs for build files\&. Files will be opened by the editor\%.
.RE
.PP
\fB\-\-afterclean\fR
.RS 4
Remove package sources after successful Install\&.
@@ -320,6 +346,32 @@ When downloading pkgbuilds if the pkgbuild is found in cache and is equal or
newer than the AUR's version use that instead of downloading a new one\&.
.RE
.PP
\fB\-\-provides\fR
.RS 4
Look for matching providers when searching for AUR packages\&. When multiple
providers are found a menu will appear prompting you to pick one\&. This
increases dependency resolve time although this should not be noticeable\&.
.RE
.PP
\fB\-\-noprovides\fR
.RS 4
Do not look for matching providers when searching for AUR packages\&. If
multiple providers happen to be found the menu will still appear\&.
.RE
.PP
\fB\-\-pgpfetch\fR
.RS 4
Prompt to import unknown PGP keys from the \fBvalidpgpkeys\fR field of each
PKGBUILD.
.RE
.PP
\fB\-\-pgpfetch\fR
.RS 4
Do not prompt to import unknown PGP keys\&. This is likley to cause a build
failiure unless using options such as \fB\-\-skippgpcheck\fR or a customized
gpg config\%.
.RE
.PP
\fB\-\-rebuild\fR
.RS 4
Always build target packages even when a copy is available in cache\&.
@@ -378,37 +430,37 @@ yay \fIfoo\fR
Search and install from the repos and the \fBAUR\fR\ using yogurt mode\&.
.RE
.PP
yay -Syu
yay \-Syu
.RS 4
Update package list and upgrade all currently installed repo and \fBAUR\fR\&.
.RE
.PP
yay -S \fIfoo\fR
yay \-S \fIfoo\fR
.RS 4
Installs package \fIfoo\fR from the repos or the \fBAUR\fR\&.
.RE
.PP
yay -Ss \fIfoo\fR
yay \-Ss \fIfoo\fR
.RS 4
Searches for package \fIfoo\fR on the repos or the \fBAUR\fR\&.
.RE
.PP
yay -Si \fIfoo\fR
yay \-Si \fIfoo\fR
.RS 4
Gets information about package \fIfoo\fR from the repos or the \fBAUR\fR\&.
.RE
.PP
yay -S \fIfoo\fR --mflags "--skipchecksums --skippgpcheck"
yay \-S \fIfoo\fR \-\-mflags "\-\-skipchecksums \-\-skippgpcheck"
.RS 4
Installs \fIfoo\fR while skipping checksums and pgp checks\&.
.RE
.PP
yay --devel --save
yay \-\-devel \-\-save
.RS 4
Sets devel to true in the config\&.
.RE
.PP
yay -P --stats
yay \-P \-\-stats
.RS 4
Shows statistics for installed packages and system health\&.
.RE
@@ -448,7 +500,7 @@ and built packages from those packages\&.
\fBPACMAN.CONF\fR
.RS 4
Yay uses Pacman's config file to set certain pacman options either through
go-alpm or Yay itself. Options inherited include most libalpm options and
go\-alpm or Yay itself. Options inherited include most libalpm options and
pacman options\&.
.PP
Notably \fBDatabases\fR, \fBColor\fR and \fB*Path/*Dir\fR options are used\&.
+2 -2
View File
@@ -18,7 +18,7 @@ type vcsInfo map[string]shaInfos
type shaInfos map[string]shaInfo
type shaInfo struct {
Protocols []string `json:"protocols"`
Brach string `json:"branch"`
Branch string `json:"branch"`
SHA string `json:"sha"`
}
@@ -180,7 +180,7 @@ func (infos shaInfos) needsUpdate() bool {
hasUpdate := make(chan struct{})
checkHash := func(url string, info shaInfo) {
hash := getCommit(url, info.Brach, info.Protocols)
hash := getCommit(url, info.Branch, info.Protocols)
if hash != "" && hash != info.SHA {
hasUpdate <- struct{}{}
} else {