src/ostree: Don't delete refs having aliases
Deleting a ref with aliases makes them dangling. In such cases, display an error message to the user. Fixes #1597 Signed-off-by: Sinny Kumari <sinny@redhat.com> Closes: #1749 Approved by: cgwalters
This commit is contained in:
1 parent
05e99da7a7
commit
c70526841e
2 files changed
+20
-2
No files matched your search
@@ -192,6 +192,11 @@ done
|
||||
${CMD_PREFIX} ostree --repo=repo refs -A > refs.txt
|
||||
assert_file_has_content_literal refs.txt 'exampleos/x86_64/stable/server -> exampleos/x86_64/27/server'
|
||||
|
||||
# Test that we don't delete a ref having aliases
|
||||
if ${CMD_PREFIX} ostree --repo=repo refs --delete exampleos/x86_64/27/server; then
|
||||
assert_not_reached "refs --delete unexpectedly succeeded in deleting a ref containing alias!"
|
||||
fi
|
||||
|
||||
${CMD_PREFIX} ostree --repo=repo summary -u
|
||||
|
||||
echo "ok ref symlink"
|
||||
|
||||
Reference in new issue
Block a user