Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Document autoclean and release log features
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Bonnans <[email protected]>
  • Loading branch information
lbonn committed Sep 6, 2019
1 parent 2a4b51c commit 3267861
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Our versioning scheme is `YEAR.N` where `N` is incremented whenever a new releas

## [??? (unreleased)]

### Added

- `GetInstallationLog` API method: [PR](https://github.com/advancedtelematic/aktualizr/pull/1318)
- The aktualizr daemon will now automatically remove old downloaded targets to free up disk space: [PR](https://github.com/advancedtelematic/aktualizr/pull/1318)

## [2019.6] - 2019-08-21

### Added
Expand Down
1 change: 1 addition & 0 deletions actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ These are the primary actions that a user of libaktualizr can perform through th
- [x] Store negative device installation result when an ECU installation failed (aktualizr_test.cc)
- [x] Update is not in pending state anymore after failed installation (aktualizr_test.cc)
- [x] Send AllInstallsComplete event after all installations are finished (aktualizr_test.cc)
- [x] Automatically remove old targets during installation cycles (aktualizr_test.cc)
- [x] Send installation report
- [x] Generate and send manifest (see below)
- [x] Send PutManifestComplete event if send is successful (aktualizr_test.cc)
Expand Down
4 changes: 3 additions & 1 deletion src/libaktualizr/primary/aktualizr.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ class Aktualizr {
std::future<result::Download> Download(const std::vector<Uptane::Target>& updates);

/**
* Get log of installations
* Get log of installations. The log is indexed for every ECU and contains
* every change of versions ordered by time. It may contain duplicates in
* case of rollbacks.
* @return installation log
*/
struct InstallationLogEntry {
Expand Down
7 changes: 5 additions & 2 deletions src/libaktualizr/primary/aktualizr_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
#include <memory>
#include "aktualizr.h"

// add as a signal handler to remove old targets just after an installation
// completes
/*
* Signal handler to remove old targets just after an installation completes
*
* To be attached with Aktualizr::SetSignalHandler
*/
void targets_autoclean_cb(Aktualizr &aktualizr, const std::shared_ptr<event::BaseEvent> &event);

#endif // AKTUALIZR_HELPERS_H_
4 changes: 4 additions & 0 deletions src/libaktualizr/primary/aktualizr_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,10 @@ TEST(Aktualizr, DownloadListRemove) {
EXPECT_EQ(targets.size(), 0);
}

/*
* Automatically remove old targets during installation cycles.
* Get log of installation.
*/
TEST(Aktualizr, TargetAutoremove) {
TemporaryDirectory temp_dir;
const boost::filesystem::path local_metadir = temp_dir / "metadir";
Expand Down

0 comments on commit 3267861

Please sign in to comment.