Commit graph

17 commits

Author SHA1 Message Date
morganamilo f2579f26a3
Move stringset to its own module
types is pretty generic as a module name, this should be split into
seperate modules.
2019-10-16 23:18:04 +01:00
Jguer 29b051134a
Add comments to Base type 2019-10-13 20:59:25 +01:00
Jguer a591b33262
Add errguards throughout the code to enable golangci-lint 2019-10-13 20:56:27 +01:00
Jguer b01790f752
Moved StringSet definition to types package 2019-10-05 18:39:31 +01:00
Jguer de95a0e253 Change depsolver to not use a preallocated slice to get make only deps.
Makes it "slower" but fixes issues where cap would return less than 0.

Fixes #857
2019-09-23 01:01:30 +01:00
morganamilo 112046853b
Use correct case on go-alpm import 2019-04-23 16:53:20 +01:00
morganamilo 4ab7814af1
Revert "Merge pull request #767 from Morganamilo/merge-dep-pool-order"
This reverts commit c2aeb4bc4e, reversing
changes made to 1f1cee7023.
2019-01-15 18:43:46 +00:00
morganamilo a83f8fb9e8
Remove depPool and depOrder code 2018-10-13 17:04:21 +01:00
morganamilo 75d01f32b4
Move Base code to dep.go 2018-10-10 22:28:01 +01:00
morganamilo 00b880baf9
Fix depends sometimes being ordered incorrectly 2018-09-04 17:48:59 +01:00
morganamilo 43feb12c85
Merge handles.Aur and depOrder.Bases
depOrder.Aur contains the order in which AUR packages are to be
installed. While depOrder.bases contains the actual package data
organized by pkgbase.

deoOrder.AUR is kind of counterintuitive, as it only contains one
package from each package base.

For example if you were to install libc++{,abi,experimental},
depOrder.Aur would only contain one of those packages, which one
actually being quite random. depOrder.Bases[pkg.Pkgbase] will then be
looked up and everything under that slice would be installed.

This means that the only real use depOrder.Aur has, is to give the
pkgbase. So to cut out the middleman, lets merge .Aur and .Bases into
a single field.

Doing this has also heped to spot som subtle bugs:

Fix subtle split package errors.

The number menus now correctly list and respect (installed) for bases
that have atleast one of their packages installed.

Entering package names in number menus now always expects the pkgbase
name instead of the random package which happened to make it into .Aur.

--rebuild and --redownload correctly handles split packages.

formatPkgbase is also used more.
2018-08-18 17:05:12 +01:00
morganamilo 6423fb55b5
Fix build order being reversed 2018-05-29 13:13:33 +01:00
morganamilo 8c77ad061e
Clean up unused code 2018-05-29 13:13:33 +01:00
morganamilo 671f836ec5
Calculate makeDeps properly
MakeOnly would be set to true when moving from normal deps to make deps
But would incorrectly stay set to true when moving to the deps of the
following packages.

depOrder.Aur now only holds one package from each base like
depCatagories does.
2018-05-29 13:13:33 +01:00
morganamilo 2e7a022b7c
Use new dependency code in install()
The old depTree and depCatagories has been changed to depPool and
depOrder in the install function.
2018-05-29 13:13:33 +01:00
morganamilo b585cec123
Add Basses to depOrder
This should act exaclty like depCatagories.Basses
2018-05-29 13:13:33 +01:00
morganamilo b2d3eb5c49
Add new dependency code to replace the old code
This is a rewrite of the dependency system, It aims to be cleaner
written, with a better idea of what is needed from the start, meaning
less new code being hacked on for things that were not thought about.
This version also aims to use as many small functions as possible, for
cleaner code and better testing.

Added dep.go:
    general dependency functions
Added depPool.go:
    Replacement of depTree, dependencies were never ordered so
    a tree did not really make sense. Instead the term pool
    makes more sense.
Added depOrder.go:
    Replacement of depCatagories, This simply orders the
    dependencies, dependencies are still catagorized as repo and AUR
    but I believe this to be a better name
Added depCheck.go:
    Replaces conflicts.go and also contains the missing dependency
    code

This version is mostly the same as the old version with a few
improvments:
    Missing packages will print the full dependency tree
    Versioned dependency checking errors should be fixed
    Make depends should be calculated properly
    Experimental AUR provide searcher

This code has been added along side the old code for testing and is not
currently used by the install process. Once the install process is moved
to use this code, the old code will be removed.
2018-05-29 13:13:27 +01:00