Commit Graph

55 Commits

Author SHA1 Message Date
Ettore Di Giacinto
0147b2cf99 Don't cleanup the whole cache download dir, just the downloaded artifact
Otherwise whatever we download cannot be consumed (e.g. tree).
Instead whoever is calling the client should care to cleanup the returned artifact
2020-01-30 18:03:25 +01:00
Ettore Di Giacinto
c6fe34b059 Support compression and checksum for trees
Fixes #33 #34 #35
2020-01-28 17:46:32 +01:00
Daniele Rondina
c9b684523f installer: Add support for cached repository 2020-01-12 23:35:58 +01:00
Ettore Di Giacinto
22bc53ba13 Merge branch 'master' into develop 2020-01-06 19:14:17 +01:00
Ettore Di Giacinto
f5e7c2ad92 Allow more matches, we select the best one anyway 2020-01-06 11:33:35 +01:00
Ettore Di Giacinto
d5fd14bceb Merge branch 'build_clean' into develop 2020-01-05 16:27:31 +01:00
Ettore Di Giacinto
02c37c7451 Fix tests after contructor change 2020-01-05 16:08:39 +01:00
Daniele Rondina
9b6f4a094d Use const for repository.yaml and tree.tar 2020-01-05 00:40:28 +01:00
Daniele Rondina
e751b989e0 Fix installer_tests 2020-01-04 16:15:56 +01:00
Daniele Rondina
6012e0081e Add support of incremental revision for repos
* on repository creation now if the repository.yaml
  is already present, the current revision is used.

* add --reset-revision option for force reset revision
  of a specific repository
2020-01-04 00:31:11 +01:00
Daniele Rondina
d3bd78d618 Repository now support Revision and LastUpdate 2020-01-03 20:09:29 +01:00
Daniele Rondina
716d404307 Align logic of cache repositories in all commands 2020-01-02 18:31:25 +01:00
Daniele Rondina
ce888a2f40 Fix marshal of repository and use of cache repos 2020-01-01 13:44:39 +01:00
Daniele Rondina
01e66ee0b4 Review install phase 2020-01-01 13:44:39 +01:00
Daniele Rondina
a71e1a6f1d Integrate config.LuetRepository with installer
* installer.LuetRepository is now installer.LuetSystemRepository,
  a struct that extend config.LuetRepository

* config: system_repositories option is now "repositories".
  This resolve viper issue.

* config: cache_repositories option is now "repetitors"
  This resolve viper issue.

* cmd/*: Now use new config.LuetRepository

* cmd/search: now create local luet repository if database_engine
  is equal to "boltdb"
2020-01-01 13:43:23 +01:00
Daniele Rondina
3b266fd600 installer: Repositoris now support multiple uris 2020-01-01 13:43:23 +01:00
Daniele Rondina
0d02eccc6c installer: Fix tests 2020-01-01 13:43:23 +01:00
Daniele Rondina
da11a84d23 Rename repository type local to "disk"
See reference #4
2020-01-01 13:43:22 +01:00
Daniele Rondina
0cb49a40c0 Support logging level and spinner customization 2020-01-01 13:43:22 +01:00
Daniele Rondina
bbc9574745 Review luet configuration file 2020-01-01 13:43:22 +01:00
Ettore Di Giacinto
5e8a29caf5 Detect already installed packages when calling install
We wasn't checking this previously, which was drawing weird errors on the CLI
2020-01-01 11:58:33 +01:00
Ettore Di Giacinto
c193e4d320 Enhance output 2019-12-30 16:35:38 +01:00
Ettore Di Giacinto
3d5b723668 Add compression tests
Refers to #33
2019-12-30 16:35:35 +01:00
Ettore Di Giacinto
58eb483e32 Do not create new artifact on client
Otherwise we loose artifact metadata - as checksum and compressiontype

Refers to #33
2019-12-30 16:35:33 +01:00
Ettore Di Giacinto
475b63be95 Consume concurrency from compiler
Refers to #33
2019-12-30 16:35:18 +01:00
Ettore Di Giacinto
2693ec2f8c Consume artifact verify mechanism
Refers to #28
2019-12-29 14:00:03 +01:00
Ettore Di Giacinto
2fa9c754ae Move archive helpers to artifact
This allow in the future to swap and provide archive/compression methods without hijacking the code.

Refers to #33
2019-12-28 16:48:05 +01:00
Ettore Di Giacinto
926f636dff Revert "Do not allow multiple versions in the results"
This reverts commit 15534ce253.
2019-12-13 23:05:09 +01:00
Ettore Di Giacinto
15534ce253 Do not allow multiple versions in the results
This happens because we select the best instead of selecting the best match in Package BuildFormula()

- Extend the selection test
- Select from databases when ordering
- Relax assertions search
- Split compile step in test
- Adapt tests

Note: This is temporarly until we treat this case in BuildFormula() inside Package
we need to build the constraints between all the requires when expanding
and then create a new constraint that selects the best match
2019-12-13 22:10:12 +01:00
Ettore Di Giacinto
1f60d591d5 Stringify finalizers output 2019-12-12 23:48:29 +01:00
Ettore Di Giacinto
c7e1803540 Fix path deletion on artifacts 2019-11-29 19:01:59 +01:00
Ettore Di Giacinto
30a7312911 Compute upgrades
Make solver compute simply upgrades and the installer execute them.

Add simple upgrade test
2019-11-29 19:01:56 +01:00
Ettore Di Giacinto
2c7391fcc9 Adapt installer to new changes 2019-11-29 19:01:52 +01:00
Ettore Di Giacinto
fa46601638 Adapt compiler and installer to Tree removal 2019-11-29 19:01:49 +01:00
Ettore Di Giacinto
5915688830 Add client tests 2019-11-26 18:06:23 +01:00
Ettore Di Giacinto
a54040dcd3 Add http client for installer #3 2019-11-26 18:05:48 +01:00
Ettore Di Giacinto
08897b5105 Allow one instance of the application to run 2019-11-25 20:28:08 +01:00
Ettore Di Giacinto
7bbd6d5e68 Add Search() in Repositories 2019-11-25 20:03:17 +01:00
Ettore Di Giacinto
820a157698 Add SetUri to Repository 2019-11-25 20:02:59 +01:00
Ettore Di Giacinto
f3ba014593 Add test for persistent database with bolt 2019-11-25 20:02:43 +01:00
Ettore Di Giacinto
c9c803a819 Return errors more consistently 2019-11-25 20:02:18 +01:00
Ettore Di Giacinto
b751b02830 Do not register viper bindings in init
Otherwise they get overlapped. Use PreRun instead
2019-11-25 19:55:30 +01:00
Ettore Di Giacinto
a8b350fd8e Implement uninstall
Also add RemovePackage in database implementation (boltdb is not tested yet)

Add test case for uninstall
2019-11-24 00:16:12 +01:00
Ettore Di Giacinto
0d7b2cf448 Track installed files 2019-11-23 22:41:51 +01:00
Ettore Di Giacinto
7d99d57ad5 Check if package was inserted in systemdb in tests 2019-11-23 18:58:34 +01:00
Ettore Di Giacinto
d4bb0e346e Execute finalizers if present 2019-11-23 18:58:09 +01:00
Ettore Di Giacinto
3b9337a03b Keep the path around after writing the yaml, otherwise compile specs couldn't be found 2019-11-23 18:41:15 +01:00
Ettore Di Giacinto
8f6393e157 Add repository test file 2019-11-23 15:43:14 +01:00
Ettore Di Giacinto
e9c01b46a7 Use well defined structure for serializing, fixups to make test green 2019-11-23 15:42:53 +01:00
Ettore Di Giacinto
a879411c54 Add test case 2019-11-23 12:19:05 +01:00