Add system modification tracking for reversible installs
This commit is contained in:
@@ -312,7 +312,7 @@ fn cmd_integrate(db: &Database, path: &str) -> ExitCode {
|
||||
return ExitCode::SUCCESS;
|
||||
}
|
||||
|
||||
match integrator::integrate(&record) {
|
||||
match integrator::integrate_tracked(&record, &db) {
|
||||
Ok(result) => {
|
||||
db.set_integrated(
|
||||
record.id,
|
||||
@@ -351,6 +351,7 @@ fn cmd_remove(db: &Database, path: &str) -> ExitCode {
|
||||
return ExitCode::SUCCESS;
|
||||
}
|
||||
|
||||
integrator::undo_all_modifications(&db, record.id).ok();
|
||||
match integrator::remove_integration(&record) {
|
||||
Ok(()) => {
|
||||
db.set_integrated(record.id, false, None).ok();
|
||||
@@ -858,7 +859,7 @@ fn cmd_import(db: &Database, file: &str) -> ExitCode {
|
||||
// Need the full record to integrate
|
||||
if let Ok(Some(record)) = db.get_appimage_by_id(id) {
|
||||
if !record.integrated {
|
||||
match integrator::integrate(&record) {
|
||||
match integrator::integrate_tracked(&record, &db) {
|
||||
Ok(result) => {
|
||||
db.set_integrated(
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user