Ettore Di Giacinto
55ab1894e9
Add unit test for Uninstall in Installer
2020-12-29 22:58:03 +01:00
Ettore Di Giacinto
b81ce66914
Reduce download verbosity
2020-12-27 20:21:05 +01:00
Ettore Di Giacinto
f871111e50
Collect errors from finalizer runs
...
Instead of failing and depend on the --force flag, always execute
finalizer and collect errors to determine if install was successfull or
not
2020-12-25 10:35:09 +01:00
Ettore Di Giacinto
736c9470cf
Add db copy and clone
2020-12-19 17:45:50 +01:00
Ettore Di Giacinto
96e877fc0b
Allow uninstall to take multiple packages
...
And treat those as a list, instead of each single of them
2020-12-19 17:16:58 +01:00
Ettore Di Giacinto
525bfb5ebf
Respect --nodeps when calling Swap from the public interface
2020-12-19 15:26:18 +01:00
Ettore Di Giacinto
f4e2f32aff
Return candidate not found when appropriate
2020-12-19 14:57:42 +01:00
Ettore Di Giacinto
7cf650a8f6
Break Swap in computeSwap() and display uninstall dialog only when asked
2020-12-19 14:55:59 +01:00
Ettore Di Giacinto
1c9b821058
Drop unneeded if
2020-12-18 00:50:20 +01:00
Ettore Di Giacinto
0e21548bc0
Lookup uninstall and Install in installer.Swap
...
In this way we resolve selectors from user inputs
2020-12-18 00:49:51 +01:00
Ettore Di Giacinto
d97e606a31
Adapt fixtures and tests
2020-12-12 12:10:24 +01:00
Ettore Di Giacinto
9eef7e5c6d
Clean up if condition
2020-12-09 22:58:33 +01:00
Ettore Di Giacinto
332824fd42
Fail in the downloader goroutine and don't skip errors with force
2020-12-09 22:56:55 +01:00
Ettore Di Giacinto
737fbdbdc1
Don't make artifact checksum skippable
2020-12-09 21:31:07 +01:00
Ettore Di Giacinto
59d78c3f5c
While upgrading always use nodeps while computing uninstall
2020-12-07 17:20:55 +01:00
Ettore Di Giacinto
d479ada402
Don't consider deps while uninstalling during package Swap
...
Beside being forced, it also doesn't need to look deep into the deps, as
we already have precalculated those
2020-12-06 22:48:48 +01:00
Ettore Di Giacinto
7b800c9a20
Pre-compute swap step
...
Otherwise, while upgrading, it could happen that package dependencies
aren't downloaded before, and they would just be installed in the middle
of installation, after removal already happened.
2020-12-06 22:11:17 +01:00
Ettore Di Giacinto
67c43eb936
Don't bail out if package is installed and we have a list
2020-12-03 20:03:37 +01:00
Ettore Di Giacinto
cf80e5fc09
Resolvers might omit packages
2020-12-03 18:53:57 +01:00
Ettore Di Giacinto
d668d8344b
Accept selectors on uninstall and fixup failure logic
2020-12-03 18:32:24 +01:00
Ettore Di Giacinto
b17ac447f1
Display matched packages only, and check if they are available
2020-12-03 17:25:29 +01:00
Ettore Di Giacinto
9423b7c1e3
Add image build events, and add luet replace
...
Enhance also some commands descriptions
2020-12-02 18:24:35 +01:00
Ettore Di Giacinto
0fe30ddcfd
Add ability to interpolate during build
...
Now build takes a --values argument, which is a yaml file that can be
used to interpolate the specs that are going to be compiled.
2020-11-28 15:47:29 +01:00
Ettore Di Giacinto
18d9366bca
Minor fixes
2020-11-24 18:27:49 +01:00
Ettore Di Giacinto
db1b190fb5
Minor fixup and cleanups around the new prompt feature
2020-11-23 18:20:30 +01:00
Ettore Di Giacinto
b349665ff2
Add user prompts
...
Fixes #106
2020-11-22 23:43:29 +01:00
Ettore Di Giacinto
53ab0e0dd2
Merge pull request #151 from mudler/download-progress-bar
...
Download progress bar
2020-11-20 19:00:25 +01:00
Daniele Rondina
60d5c9dfd5
Add download progress bar
2020-11-20 18:12:23 +01:00
Ettore Di Giacinto
f2df3faee5
Now Uninstall takes multiple packages
2020-11-19 18:05:27 +01:00
Daniele Rondina
f9a7113ab9
client/http: Add experimental download info
2020-11-19 00:56:28 +01:00
Ettore Di Giacinto
0e46e763d5
Move bus implementation to a separate repo, hook to events in luet
2020-11-13 18:25:44 +01:00
Ettore Di Giacinto
a765147c1d
Add templated finalizers
2020-11-08 21:14:19 +01:00
Ettore Di Giacinto
cead09fb9f
Merge pull request #148 from mudler/respect_rootfs4conf
...
Respect rootfs path for configs and url
2020-11-08 18:25:29 +01:00
Daniele Rondina
9a1787ddaf
client/local: Handle config_from_host on DownloadFile
2020-11-08 17:06:05 +01:00
Ettore Di Giacinto
6a1b64acea
Order files before uninstall
...
Fixes #149
2020-11-08 12:36:41 +01:00
Ettore Di Giacinto
459eb01a59
Don't write err to stdout if not present
2020-11-08 10:02:00 +01:00
Daniele Rondina
e70cdbaaf7
Respect rootfs on repositories urls
2020-11-08 00:00:15 +01:00
Daniele Rondina
513f441bb3
Add option config_from_host
2020-11-07 18:56:25 +01:00
Daniele Rondina
ebe7466fdc
Respect rootfs path for load config
2020-11-07 18:28:23 +01:00
Ettore Di Giacinto
46ed6423ad
Merge pull request #147 from mudler/fix-protect-uninstall
...
Fix protect uninstall
2020-11-07 12:28:24 +01:00
Daniele Rondina
d5df40512b
installer: Improve message for protected files
2020-11-07 12:27:18 +01:00
Ettore Di Giacinto
99bf9e291d
Use LStat and attempt removing before bailing out on first failure
2020-11-06 21:34:56 +01:00
Daniele Rondina
130eb8de1a
Integrate config protection on uninstall too
2020-11-06 20:14:25 +01:00
Ettore Di Giacinto
c3ef549673
Warn user only when required when uninstalling directories
2020-10-31 11:56:03 +01:00
Ettore Di Giacinto
0e764e525e
Filter packages to install instead of looping solver result
2020-10-31 01:25:18 +01:00
Ettore Di Giacinto
91dfb8ce3a
Enhance CLI output
2020-10-30 19:15:04 +01:00
Ettore Di Giacinto
eb2c240e84
Adapt installer tests
2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
95e640c9d0
Make solver type switchable
2020-10-29 16:32:13 +01:00
Daniele Rondina
6806103b3e
installer: Start spinner of upgrade calculation
2020-10-25 14:01:45 +01:00
Daniele Rondina
07dff7f197
installer: log packages ignored on create-repo
2020-10-12 08:42:19 +02:00
Ettore Di Giacinto
5dcf77c987
Add package buildtimestamp and luet upgrade --sync
...
Annotate the package build time when compiling, and use that from the
client to force upgrade of packages that changed the artifact, but
didn't changed any version.
The client can trigger this behavior with `luet upgrade --sync`
2020-07-12 15:29:38 +02:00
Daniele Rondina
8f0c528c08
Create helpers.UntarProtect for handle protected files
...
Currently, it's used the archive.ReplaceFileTarWrapper
that requite a []byte of the files replaced. This is not
a good idea if files are big and instead could be better
in the near future reimplement ReplaceFileTarWrapper with
a callback that return io.Reader instead of []byte.
If a protected file is already present on target rootfs
it is created a file with the same prefix used in Gentoo:
._cfgXXXX_<filename>
2020-06-02 11:08:37 +02:00
Ettore Di Giacinto
cc21e6fa5e
Respect user-defined repository naming
2020-05-24 12:16:02 +02:00
Ettore Di Giacinto
4197d7af61
Add upgrade by using only the SAT core
...
- Adds upgrade --universe and upgrade --universe --clean. It will
attempt to bring the system as much close as the content available in
the repositories. It differs from a standard upgrade which checks
directly that what is pulled in doesn't conflict with the system. In
this new way, we just query the SAT solver to decide that on our
behalf.
- Add uninstall --full-clean. It uses only the SAT solver to uninstall
the package and it will drop as many packages as required (including
revdeps of packages too.
2020-05-22 21:20:58 +02:00
Ettore Di Giacinto
bfde9afc7f
Add Nodeps and Full options to upgrade
2020-05-22 21:20:57 +02:00
Ettore Di Giacinto
3237423dde
Enhance upgrade output
2020-05-22 21:20:57 +02:00
Daniele Rondina
a7d1381cb5
cmd/create-repo: Add support for multiple trees
2020-05-10 20:18:10 +02:00
Daniele Rondina
13df161fc6
logging: permit to disable color and emoji
...
Now it's possible disable color and emoji on standard
output with:
$> luet <cmd> --color=false --emoji=false
Hereinafter, the list of changes:
* Added logging option logging.color (default true)
* Added logging option logging.enable_emoji (default true)
* Added persistent flag --color
* Added persistent flag --emoji
2020-05-09 10:08:21 +02:00
Ettore Di Giacinto
46014fb9c1
Enhance install output
2020-05-03 13:22:06 +02:00
Ettore Di Giacinto
ada9d886fa
Enhance uninstall output
2020-05-03 13:22:00 +02:00
Ettore Di Giacinto
a1d8ef1422
Allow to partially uninstall a package graph, make uninstall --full optional
2020-05-03 13:04:34 +02:00
Ettore Di Giacinto
3befbfa915
Optimize uninstall computation
2020-05-02 15:43:57 +02:00
Ettore Di Giacinto
d4c25d74f5
Remove focus from test
2020-05-02 13:27:15 +02:00
Ettore Di Giacinto
2ed9781c88
Don't try to match against repo already installed packages
2020-05-02 13:24:46 +02:00
Ettore Di Giacinto
9d6d6bc0c8
Add more upgrade and reclaim tests scenarios
2020-05-02 12:18:19 +02:00
Ettore Di Giacinto
f8b2837741
Enhance reclaim output
2020-05-02 12:17:54 +02:00
geaaru
878e6d7b9c
Merge pull request #103 from mudler/tmpdir-cleanup
...
Tmpdir cleanup
2020-05-02 09:20:01 +02:00
Ettore Di Giacinto
4b63c9eaf9
Add test to be sure we don't index packages not in the tree
2020-05-01 11:48:05 +02:00
Ettore Di Giacinto
286d0fba2c
Fix typo
2020-05-01 11:07:14 +02:00
Ettore Di Giacinto
624518bf77
Don't add package to the repository which aren't referenced by the tree
2020-05-01 10:52:40 +02:00
Daniele Rondina
11944873ea
Integrate tmpdir_base params and tmpdirs cleanup
2020-04-30 20:29:28 +02:00
Ettore Di Giacinto
322ac99f17
Annotate package runtime definition when reclaiming
...
This was an issue as we were copying the buildspec instead
2020-04-30 18:56:50 +02:00
Ettore Di Giacinto
4cee27da7f
Fixup box CLI params and consume new box options
2020-04-20 23:03:03 +02:00
Ettore Di Giacinto
4d466d0330
Sync the repository data with user configured data
...
Fixup a regression, in this way we respect the user configuration in
regards to a repository to be consumed (priority and repository type)
regardless of the one advertized remotely.
Also add informative message about prio and type.
2020-04-18 17:33:46 +02:00
Ettore Di Giacinto
84407e5ae7
Add SetPriority to repository
2020-04-18 17:33:34 +02:00
Ettore Di Giacinto
ee0fe1a86a
Allow to finalizer to specify entrypoint command
...
In this way, finalizer in strict environment can override the default
shell used to run commands.
The shell keyword is a list, as it needs to contain the full command +
args.
2020-04-14 17:46:39 +02:00
Ettore Di Giacinto
538ba8f5df
Add luet reclaim
...
Reclaim allows to migrate between different system layouts. This
is a experimental feature (yet) and might be revisited in the future.
This change:
- Adds Reclaim(system) to Installer
- Adds unit tests
Relates to #86
2020-04-13 19:32:51 +02:00
Ettore Di Giacinto
4e2d42e397
Drop downloadOnly bool from installer.Install
2020-04-13 19:32:50 +02:00
Daniele Rondina
c2e9176ab2
solver.Order now return error
2020-04-09 17:07:57 +02:00
Ettore Di Giacinto
5e31d940f0
Introduce Packages for []Package
2020-04-04 14:29:08 +02:00
Ettore Di Giacinto
a0113dcd13
Drop verbose output
2020-03-28 17:05:23 +01:00
Ettore Di Giacinto
f15ed3fda1
Move finalizer in its own struct
...
Also distinguish when we run in a root target dir ("/") or when we want
to run the commands in a separate folder
2020-03-28 16:57:40 +01:00
Ettore Di Giacinto
416be23a46
Don't always remove unpacked repository content
2020-03-28 12:07:40 +01:00
Daniele Rondina
50091b2a4b
pkg/installer: Add test for uncompress tree and minor cleanup
2020-03-25 00:19:52 +01:00
Ettore Di Giacinto
117554792d
Don't attempt to upgrade packages already in system
2020-03-24 20:30:59 +01:00
Daniele Rondina
454e9d934e
Use filename instead of name on repo specs
2020-03-24 19:40:11 +01:00
Ettore Di Giacinto
af7f1de9f1
Split download and installer worker
...
Also, drop downloadOnly from install
2020-03-24 18:19:09 +01:00
Daniele Rondina
a0f9222068
Add check of repository metafile archive in tests
2020-03-24 14:01:22 +01:00
Daniele Rondina
520768d0ca
pkg/installer: Align tests with new default
2020-03-24 12:52:45 +01:00
Daniele Rondina
4f002ab40f
pkg/installer/repository: The check for repo_files is not needed for parsing normal repo
2020-03-24 12:52:24 +01:00
Daniele Rondina
60635a03eb
Fix propagation of repo file name and add test for meta compressed
2020-03-24 00:31:41 +01:00
Daniele Rondina
202ed2651a
💥 Refactor and split repository.yaml file
2020-03-24 00:05:16 +01:00
Daniele Rondina
40830ecf42
installer/repository.go: Use switch with search options
2020-03-22 10:46:51 +01:00
Daniele Rondina
c7652c8a70
Added labels
to package definition
...
* cmd/search: Add support for search of the packages
with a specific label.
* review Search method of Repositories for permit
different search modes.
* labels are k/v attributes and could be matched
through label key (with HasLabel method) or through
regex that use "$key" + "=" + "$value"
2020-03-21 19:24:27 +01:00
Ettore Di Giacinto
dc64dbff75
Don't try to solve finalizers with --nodeps
2020-03-13 19:32:00 +01:00
Ettore Di Giacinto
765261f233
Add Swap() to Installer. Refactor code in Upgrade() to consume it
2020-02-27 23:48:14 +01:00
Ettore Di Giacinto
6c7e24fadf
Sync repositories once (and at beginning) during upgrade
2020-02-27 23:25:29 +01:00
Ettore Di Giacinto
de23e0d5b1
Download dependencies before installing
...
This enables smoother upgrades, and uses cache to pre-download
packages before uninstall/install
Allows also from cli to download deps only
2020-02-27 23:15:31 +01:00
Ettore Di Giacinto
8572aa5222
Preserve cache data from deletion during uninstall
2020-02-27 23:14:36 +01:00
Ettore Di Giacinto
5bcc8d112a
Enforce solver constraints
...
- Don't sign installed packages during finalizer execution
- Enforce solver constraints: build ALO and AMO rules taking into account
that the current package might not be selected at all.
- Force uninstalls on upgrade
- Enable option to tell uninstall to ignore conflict with the analized system state,
as we don't want any conflict with the installed to raise during the upgrade.
In this way we both force uninstalls and we avoid to check with conflicts
against the current system state which is pending to deletion.
This is due to the fact that now the solver enforces the constraints
and explictly denies two packages of the same version installed.
- Adapt test as now we generate more constraints, which makes the solver more
noisy on the package that are explictly selected or not
2020-02-27 18:38:31 +01:00