Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alad Wenter
aurutils
Commits
00600458
Commit
00600458
authored
Dec 02, 2020
by
Alad Wenter
Browse files
aur-build: add diag_moved_packages()
based on a snippet by @Earnestly
parent
e0232783
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/aur-build
View file @
00600458
...
...
@@ -25,6 +25,21 @@ db_replaces() {
}'
}
diag_moved_packages
()
{
# Print diagnostic on non-moved packages (#794)
cat
<<
EOF
>&2
Note:
aur-build encountered an error before moving packages to the local repository.
This may happen when signing built packages with gpg (aur build --sign),
or with certain makepkg errors.
The following files were preserved:
EOF
realpath
-z
--
"
$@
"
|
while
read
-rd
''
;
do
printf
'%8s%s\n'
' '
"
$REPLY
"
done
}
run_msg
()
{
printf
>
&2
'Running %s\n'
"
$*
"
"
$@
"
...
...
@@ -33,8 +48,11 @@ run_msg() {
trap_exit
()
{
if
[[
!
-v
AUR_DEBUG
]]
;
then
rm
-rf
--
"
$tmp
"
# Only remove package directory if all files were moved (#593)
rm
-df
--
"
$var_tmp
"
if
!
rm
-df
--
"
$var_tmp
"
;
then
diag_moved_packages
"
$var_tmp
"
/
*
fi
else
printf
>
&2
'AUR_DEBUG: %s: temporary files at %s\n'
"
$argv0
"
"
$tmp
"
printf
>
&2
'AUR_DEBUG: %s: temporary files at %s\n'
"
$argv0
"
"
$var_tmp
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment