Find a file
morganamilo 19efb1f121
Foundation for re writing the argument parsing system
Currently the foundation for a new fuller argument parsing has been implemented in
parser.go. Most of the parsing is now done through the argParser object
instead of seperate arrays for options and packages. The rest of the
code still expects the old system so I have left most of the operations
unimplemented for now until I redo it with the new system. Currently
only '-S' and number menu have any functionality for testing purposes.

This new system parses arguments fully instead of just looking for
predefined strings such as:
	'-Sqi' '-Siq'.
This allows:
	'-Syu', '-S -y -u', '--sync -y -u'
to all be parsed as the same.

This system tries to be as similar to pacman as possible, eventually
aming to fully wrap pacman, allowing yay to be used instead of pacman in
all instances.

The current implementation is not as strict as pacman when checking
arguments.  If you pass
--someinvalidflag to yay then yay will simply ignore it. The flag should
still be passed to pacman which should then cause an error.

Although operations '-S' '-R' '-U' ect. are checked to make sure you can not
try to use two operations at once.

conflicting flags such as:
	'--quiet' and '--info'
will not raise an error and which options gains precedence is depend on
the implementation.

Another minor issue which is worth noting is. Due to the way double
arguments are parsed:
	'-dd' '-cc' '--deps --deps'
if you pass the long version and the short version:
	'-d --deps'
yay will not realize its a double argument. Meanwhile pacman will
reconise it when yay calls pacman.

Currently there are a few things that need to be done before this new
system can be fuly released:
	Reimplement all operations to use to new parsing system so that
		the new system is at least as functional as the old one
	Strip yay specific flags before passing them to pacman
	Move parts of config into the argument system and only use
		config for options that are meant to be saved to disk
	Move yay specific operations into its own operator '-Y'
	Update documentation to show the altered syntax
2018-01-04 01:14:25 +00:00
vendor/github.com References #61 2017-10-30 21:19:05 +09:00
.gitignore Minor polishing using gometalinter. 2017-12-04 15:24:20 +09:00
bash-completion Bruteforce fish completions into submission. 2017-04-10 01:38:58 +01:00
clean.go Minor polishing using gometalinter. 2017-12-04 15:24:20 +09:00
cmd.go Foundation for re writing the argument parsing system 2018-01-04 01:14:25 +00:00
completions.go git devel package support restored, house keeping, fixes related to config files. 2017-10-19 11:30:37 +09:00
config.go Minor polishing using gometalinter. 2017-12-04 15:24:20 +09:00
dependencies.go Resolves #57. Added Package ignoring to AUR. Handles made private. 2017-10-18 11:38:19 +09:00
download.go Resolves #57. Added Package ignoring to AUR. Handles made private. 2017-10-18 11:38:19 +09:00
Gopkg.lock References #61 2017-10-30 21:19:05 +09:00
Gopkg.toml Refactoring 2017-08-01 17:43:20 +01:00
install.go References #64. Added optional afterclean. Updates man page. Adds entries to --help 2017-12-04 11:39:23 +09:00
LICENSE Create LICENSE 2016-09-05 03:43:29 +01:00
Makefile Minor polishing using gometalinter. 2017-12-04 15:24:20 +09:00
parser.go Foundation for re writing the argument parsing system 2018-01-04 01:14:25 +00:00
print.go File closure fixed on init 2017-10-19 14:59:26 +09:00
print_test.go Fixed tests for unified structure 2017-08-07 10:53:20 +01:00
query.go File closure fixed on init 2017-10-19 14:59:26 +09:00
query_test.go Fixed tests for unified structure 2017-08-07 10:53:20 +01:00
README.md Updated Pictures and Changelog 2017-12-06 10:11:03 +09:00
upgrade.go Merge branch 'updateIgnore' 2017-10-30 21:41:50 +09:00
vcs.go Merge pull request #67 from maximbaz/print_vcs_error_details 2017-11-21 13:41:04 +09:00
vcs_test.go Fixed tests for unified structure 2017-08-07 10:53:20 +01:00
yay.8 Fixed man page indenting. 2017-12-04 12:03:10 +09:00
yay.fish Bruteforce fish completions into submission. 2017-04-10 01:38:58 +01:00
zsh-completion Bruteforce fish completions into submission. 2017-04-10 01:38:58 +01:00

yay

Yet another Yogurt - An AUR Helper written in Go

Packages

yay yay-bin GitHub license

There's a point in everyone's life when you feel the need to write an AUR helper because there are only about 20 of them. So say hi to 20+1.

Yay was created with a few objectives in mind and based on the design of yaourt and apacman:

  • Have almost no dependencies.
  • Provide an interface for pacman.
  • Have yaourt like search.
  • Minimize user input
  • Know when git packages are due for an upgrade.

Features

  • AUR Tab completion
  • Search narrowing (yay linux header will first search linux and then narrow on header)
  • No sourcing of PKGBUILD is done
  • The binary has no dependencies that pacman doesn't already have.
  • Sources build dependencies
  • Removes make dependencies at the end of build process

Custom Operations

  • yay <Search Term> presents package selection menu
  • yay -Qstats delivers system statistics
  • yay -Cd cleans unneeded dependencies
  • yay -G downloads PKGBuild from ABS or AUR
  • yay --gendb generates development package DB used for devel updates.

Changelog

2.219

  • Updated manpage
  • Updated --help
  • Fixed AUR update fails with large number of packages #59
  • Check if package is already in upgrade list and skip it. #60
  • Add -V and -h for flag parsing @AnthonyLam
  • Prevent file corruption by truncating the files @maximbaz
  • Print VCS error details @maximbaz
  • Using '-' doesn't raise an error @PietroCarrara
  • use Command.Dir in aur.PkgInstall; Fixes #32 #47 @afg984
  • Suffix YayConf.BuildDir with uid to avoid permission issues @afg984 (Not included in last changelog)

2.200

  • Development github package support readded

2.196

  • XDG_CONFIG_HOME support
  • XDG_CACHE_HOME support

2.165

  • Upgrade list now allows skipping upgrade install

2.159

  • Qstats now warns about packages not available in AUR

2.152

  • Fetching backend changed to Mikkel Oscar's Aur
  • Added support for development packages from github.
  • Pacman backend rewritten and simplified
  • Added config framework.

1.115

  • Added AUR completions (updates on first completion every 48h)

1.101

  • Search speed and quality improved #3

1.100

  • Added manpage
  • Improved search #3
  • Added -G to get pkgbuild from the AUR or ABS. #6
  • Fixed #8
  • Completed and decluttered zsh completions
  • If $EDITOR or $VISUAL is not set yay will prompt you for an editor #7

1.91

  • --downtop has been replaced with --bottomup (as is logical)
  • yay -Ssq and yay -Sqs now displays AUR packages with less information
  • Repository search now uses the same criteria as pacman

1.85

  • yay now does -Si for AUR packages
  • Fixed package install bugs

1.83

  • Added new dependency resolver for future features
  • Sort package statistics

1.80

  • yay now warns when installing orphan packages
  • Added orphan status to number menu
  • Qstats now checks if system has orphan packages installed

1.78

  • Added foreign package statistics to Qstats
  • Group installing is now possible
  • Better handling of package dependency installing

1.76

  • Fixed critical bug that prevented AUR dependencies from being installed.

1.70

  • Stable for everyday use
  • Bottom up package display
  • Number menu like yaourt/apacman
  • System package statistics