authselect-1.1-6: cli: fix auto backup when --force is set

This commit is contained in:
Pavel Březina 2020-01-29 13:23:12 +01:00
parent 5124866810
commit fa2bd693b3
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From fbbe095c15233f0411fdd7218e9021125c93a807 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Wed, 15 Jan 2020 14:00:20 +0100
Subject: [PATCH] cli: fix auto backup when --force is set
3e2e51df4d145daed2ed9b57ebec468cde2ddd52 adds backup ability to
multiple functions, unfortunately it introduced a regression
that backup is not performed automatically when --force is set.
Resolves:
https://github.com/pbrezina/authselect/issues/192
---
src/cli/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cli/main.c b/src/cli/main.c
index 6caa0435de5dd1b61284dc973042bddc77d82d64..a5e9c877755763285c53570c8f540255c3c82489 100644
--- a/src/cli/main.c
+++ b/src/cli/main.c
@@ -189,7 +189,7 @@ static errno_t activate(struct cli_cmdline *cmdline)
}
if (backup || backup_name != NULL || (enforce && !nobackup)) {
- ret = perform_backup(quiet, backup, backup_name);
+ ret = perform_backup(quiet, 1, backup_name);
if (ret != EOK) {
goto done;
}
--
2.20.1

View File

@ -3,7 +3,7 @@
Name: authselect
Version: 1.1
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Configures authentication and identity sources from supported profiles
URL: https://github.com/pbrezina/authselect
@ -13,6 +13,8 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: translations.tar.gz
%endif
Patch0001: 0001-cli-fix-auto-backup-when-force-is-set.patch
%global makedir %{_builddir}/%{name}-%{version}
BuildRequires: autoconf
@ -265,6 +267,9 @@ exit 0
exit 0
%changelog
* Wed Jan 29 2020 Pavel Březina <pbrezina@redhat.com> - 1.1-6
- cli: fix auto backup when --force is set
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild