Commit Graph

25 Commits

Author SHA1 Message Date
Peter Dyer
c0402e61a6
Spellchecked comments and formatted to commenting standards.
Reformatted comments to have a space between // and the start of the
comment.
Added capital letters and punctuation.
Fixed most grammar and spelling mistakes.
Fixed date to yyyy/mm/dd.
2018-03-03 02:57:30 +00:00
morganamilo
cfd391b423
Add comments to describe certain functions
Comments have been added to a couple of functions here and there
where I feel warrent some explanation. Hopefully this makes it a little
easier for people to contribute.

I commented on a couple of functions but my main focus is:
	DepTree
	DepCatagories
	StringSet
	Arguments

These are parts that have been mostly written by me and might seem
confusing without taking a while to study the code. Especially the first
two mentioned. They're a little complex, I'm not sure if they need to be
This is just how I came up with them. Hopefully helping other people
understand them will let them come up with improvments I did not see.
I'm not the best at explaining things but I did try my best here.
2018-03-03 01:34:39 +00:00
Jguer
76a766c840 Small lint of project
Signed-off-by: Jguer <me@jguer.space>
2018-03-02 11:32:35 +00:00
Morgana
3109ae759e
Merge pull request #195 from Morganamilo/fixprovides
Fix duplicate packages when printing dependencies
2018-03-01 22:01:38 +00:00
morganamilo
2fbfbc4de1
Fix duplicate packages when printing dependencies
e01c4b3969 made some bad assumptions.
Removing the aliases caused packages to not installed when required only
through provides and not their package name. This fixes that by
re enabling the aliases and simply removing duplicates at the end.
2018-03-01 21:57:52 +00:00
morganamilo
4934d24643
Revert "Fix duplicate packages when printing dependencies"
This reverts commit e01c4b3969.
2018-03-01 14:30:16 +00:00
morganamilo
8e7af3e186
Update manpage and usage
Reword a lot of manpage and usage options.

Remove the `-Yg` and `-Y --getpkgbuild` options from documentation and
code as they have moved to `-G` and `--getpgkbuild`.

Update the version in the man page. Because our version is based on our
commit number added a `+` after the version number to indicated that
this is the version the manpage was written at but it also applies to
newer versions.

Added missing `-c --complete` and `-f --fish` options to the manpage.
But left them out of usage.

Added myself to the authors section. I do feel a bit bad about adding
myself and only myself but I thought it was not a good idea to add 20
names and fill up the page. There's currently no rules on who should be
added and not really a huge need for them right now. I guess we can just
add more people when we deem they belong there whatever that criteria
is.
2018-03-01 02:09:24 +00:00
Morgana
238d3a0b6c
Merge pull request #187 from Morganamilo/fix#10
Better dep checking on split packages
2018-02-28 11:15:59 +00:00
morganamilo
d14654a141
Better dep checking on split packages
Split packages are built at the same time so make sure the dependancies
for all packages in the base are installed before building.
2018-02-28 03:55:23 +00:00
morganamilo
d75bb2bafb
Check for groups when creating the depTree
And if we do find a group just ignore it completley and pass it to
pacman.

Because it's ignored by the depTree it fails to show up when printing
whats to be installed under [Repo]. This is a minor visual thing for now
so I think it's probably best to figure that out at another point.
2018-02-27 20:48:25 +00:00
morganamilo
e01c4b3969
Fix duplicate packages when printing dependencies
The depTree holds info on all packages by name ready for the
depCatagories to catagorize and order them. To make things easier when
a repo package was added to the deptree it was also aliased to all of
its provides. So to find a package in the deptree you could search for
its provides instead of it's name and still find it.

The depCatagories is meant to filter out unneeded packages such as the
aliases but as it turns out if a package depends on a package and
something it provides then that alias is no longer unneeded and will end
up in the depCatagories.

Because these are just alias provieds still points to the original
package so you end up with the package name displaed to the user twice
when printing dependencies.

This commit just comments out the aliasing. It should have no effect
on package finding because where it used to seach by alias to find the
package it should instead fail then try to preform a lookup itself using
findSatisfyer and find the package.

This is probably a little less efficient than before but the database is
already on disk so there should be no real perfomance difference.
2018-02-27 19:03:52 +00:00
morganamilo
4ef282c54e
go fmt 2018-02-27 02:02:33 +00:00
morganamilo
4a142425ec
Add support fot CheckDepends
Note when installing CheckDepends are still refered to as MakeDepends.
They are both only needed during build time so technically that is
correct. I don't see much of a use creating a third field so I'm leaving
it as is for now.
2018-02-27 02:02:33 +00:00
morganamilo
7558f8fcf8
Use aurInfo for -S and -Su
This also improves the dependency by switching to stringSets for some
structures that previously contained duplicates.
2018-02-27 02:02:33 +00:00
morganamilo
b8f2ac0ab3
No longer split on space in getNameFromDep()
This should not make any real difference as pkgnames and pkgvers
should not contain whitespace. But there was a problem where a packagepkg
connected two deps by quoting them.

depends=('make qt5-tools')

Because we split on spaces this caused yay to generate an error saying
it couldn't find 'make' when instead it should say it cant find
'make qt5tools' which was a little confusing.

This commit should fix the misleading error.
2018-02-22 21:17:47 +00:00
Jguer
433f5b6ce1
Apply linting to patch 2018-02-16 17:18:59 +00:00
morganamilo
3c7118e9de
Have MakeOnly live up to it's name
Fix for packages which are makedeps to one package but runtime deps to
another showing up in MakeOnly
2018-02-16 16:27:53 +00:00
morganamilo
cdaee7d1d4
Improve support for split packages
Split packages are now grouped together when printing displaying the
package base and the packages inside of the base to beinstalled. If only
one packge is to be installed from a base and the package name matches
the base name print normally

Only build and install once per package base

Only ask questions once per package base for editing pkgbuils and clean
build
2018-02-16 15:49:18 +00:00
Jguer
41c37153e5
remove unneeded struct entries. Minor linting fix 2018-02-13 17:52:33 +00:00
Simon Legner
750ae0254c Fix typos in code/comments 2018-01-31 22:07:02 +01:00
morganamilo
5100fea56a
Fix install not listing all dependencies
Sometimes yay will not list all of the dependancies it needs when
installing packages. I mostly noticed this on libjpeg-turbo and the
issue was that the packages requring libjpeg-turbo were only requesting
libjpeg which was provided by libjpeg-turbo.

Now when we cache package info from the syncdb also alias the package name
to all of it's provides.
2018-01-22 12:46:30 +00:00
Jguer
3c9a31994c
Linted using Neoformat, all linters enabled 2018-01-21 07:37:10 +09:00
morganamilo
3275f8d8ac
New install algorithm
I have replaced the old install and dependancy algorithms with a new
design that attemps to be more pacaur like. Mostly in minimizing user
input. Ask every thing first then do everything with no need for more
user input.

It is not yet fully complete but is finished enough so that it works,
should not fail in most cases and provides a base for more contributors
to help address the existing problems.

The new install chain is as follows:
	Source info about the provided targets
	Fetch a list of all dependancies needed to install targets
		I put alot of effort into fetching the dependancy tree
		while making the least amount of aur requests as
		possible. I'm actually very happy with how it turned out
		and yay wil now resolve dependancies noticably faster
		than pacaur when there are many aur dependancies.
	Install repo targets by passing to pacman
	Print dependancy tree and ask to confirm
	Ask to clean build if directory already exists
	Download all pkgbuilds
	Ask to edit all pkgbuilds
	Ask to continue with the install
	Download the sources for each packagebuild
	Build and install every package
		using -s to get repo deps and -i to install
	Ask to remove make dependancies

There are still a lot of things that need to be done for a fully working
system. Here are the problems I found with this system, either new or
existing:
	Formating
		I am not so good at formatting myself, I thought best to
		leave it until last so I could get feedback on how it
		should look and help implementing it.
	Dependancy tree
		The dependancy tree is usually correct although I have
		noticed times where it doesnt detect all the
		dependancies that it should. I have only noticed this
		when there are circular dependancies so i think this
		might be the cause. It's not a big deal currently
		because makepkg -i installed repo deps for us which
		handles the repo deps for us and will get the correct
		ones. So yay might not list all the dependancies. but
		they will get installed so I consider this a visual bug.
		I have yet to see any circular dependancies in the AUR
		so I can not say what will happend but I#m guessing that
		it will break.
	Versioned packages/dependencies
		Targets and dependancies with version constriants such
		as 'linux>=4.1' will not be checked on the aur side of
		things but will be checked on the repo side.
	Ignorepkg/Ignoregroup
		Currently I do not handle this in any way but it
		shouldn't be too hard to implement.
	Conflict checking
		This is not currently implemented either
	Split Paclages
		Split packages are not Handles properly. If we only
		specify one package so install from a split package
		makepkg -i ends up installing them all anyway. If we
		specify more than one (n) package it will actually build the
		package base n times and reinstall every split package
		n times.
	Makepkg
		To get things working I decided to keep using the
		makepkg -i method. I plan to eventually replace this
		with a pacman -U based method. This should allow passing
		args such as --dbpath and --config to aur packages
		aswell as help solve some problems such as the split
		packages.
	Clean build
		I plan to improve the clean build choice to be a little
		more smart and instead of check if the directory exists,
		check if the package is already build and if so skip the
		build all together.
2018-01-20 10:00:12 +00:00
Jguer
8fa7c4069e Resolves #57. Added Package ignoring to AUR. Handles made private. 2017-10-18 11:38:19 +09:00
jguer
9afd66109a FilterPackages replaces ForeignPackages 2017-08-07 14:43:25 +01:00