mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
5 Commits
make-warni
...
4da854c526
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4da854c526 | ||
![]() |
fc56ebedf3 | ||
![]() |
01757e6904 | ||
![]() |
c5fe8ff3e6 | ||
![]() |
753d2daf65 |
@@ -150,6 +150,7 @@ _pkgctl_cmds=(
|
|||||||
db
|
db
|
||||||
diff
|
diff
|
||||||
issue
|
issue
|
||||||
|
license
|
||||||
release
|
release
|
||||||
repo
|
repo
|
||||||
search
|
search
|
||||||
|
@@ -123,9 +123,10 @@ fi
|
|||||||
needsversioning=()
|
needsversioning=()
|
||||||
|
|
||||||
if [[ ! -e REUSE.toml || ! -e LICENSE || ! -d LICENSES ]]; then
|
if [[ ! -e REUSE.toml || ! -e LICENSE || ! -d LICENSES ]]; then
|
||||||
error "package doesn't have proper licensing information, set it up using:"
|
# TODO: Make this a hard failure in the future after packagers have had
|
||||||
|
# some time to add licenses to all packages.
|
||||||
|
warning "package doesn't have proper licensing information, set it up using:"
|
||||||
msg2 'pkgctl license setup'
|
msg2 'pkgctl license setup'
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
pkgctl license check
|
pkgctl license check
|
||||||
needsversioning+=(REUSE.toml LICENSE LICENSES/*)
|
needsversioning+=(REUSE.toml LICENSE LICENSES/*)
|
||||||
@@ -154,7 +155,7 @@ if (( ${#needsversioning[*]} )); then
|
|||||||
if [[ ! -f "${file}" ]]; then
|
if [[ ! -f "${file}" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if ! git ls-files --error-unmatch "$file"; then
|
if ! git ls-files --error-unmatch "$file" >/dev/null; then
|
||||||
die "%s is not under version control" "$file"
|
die "%s is not under version control" "$file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@@ -191,7 +191,9 @@ path = [
|
|||||||
".nvchecker.toml",
|
".nvchecker.toml",
|
||||||
"*.install",
|
"*.install",
|
||||||
"*.sysusers",
|
"*.sysusers",
|
||||||
|
"*sysusers.conf",
|
||||||
"*.tmpfiles",
|
"*.tmpfiles",
|
||||||
|
"*tmpfiles.conf",
|
||||||
"*.logrotate",
|
"*.logrotate",
|
||||||
"*.pam",
|
"*.pam",
|
||||||
"*.service",
|
"*.service",
|
||||||
|
@@ -140,6 +140,32 @@ pkgctl_version_check() {
|
|||||||
pushd "${path}" >/dev/null
|
pushd "${path}" >/dev/null
|
||||||
|
|
||||||
if [[ ${output_format} == pretty ]]; then
|
if [[ ${output_format} == pretty ]]; then
|
||||||
|
# initialize the tmp file for status output
|
||||||
|
section_separator=''
|
||||||
|
printf "" > "${status_dir}/tmp"
|
||||||
|
|
||||||
|
# update the current list of failed packages
|
||||||
|
if (( ${#failure[@]} > 0 )); then
|
||||||
|
exit_code=${PKGCTL_VERSION_CHECK_EXIT_FAILURE}
|
||||||
|
printf "%sFailure%s\n" "${section_separator}${BOLD}${UNDERLINE}" "${ALL_OFF}" >> "${status_dir}/tmp" 2>&1
|
||||||
|
section_separator=$'\n'
|
||||||
|
for result in "${failure[@]}"; do
|
||||||
|
msg_error " ${result}" >> "${status_dir}/tmp" 2>&1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# update the current list of out-of-date packages
|
||||||
|
if (( ${#out_of_date[@]} > 0 )); then
|
||||||
|
exit_code=${PKGCTL_VERSION_CHECK_EXIT_OUT_OF_DATE}
|
||||||
|
printf "%sOut-of-date%s\n" "${section_separator}${BOLD}${UNDERLINE}" "${ALL_OFF}" >> "${status_dir}/tmp" 2>&1
|
||||||
|
section_separator=$'\n'
|
||||||
|
for result in "${out_of_date[@]}"; do
|
||||||
|
msg_warn " ${result}" >> "${status_dir}/tmp" 2>&1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%s" "${section_separator}" >> "${status_dir}/tmp"
|
||||||
|
|
||||||
# update the current terminal spinner status
|
# update the current terminal spinner status
|
||||||
(( ++current_item ))
|
(( ++current_item ))
|
||||||
pkgctl_version_check_spinner \
|
pkgctl_version_check_spinner \
|
||||||
@@ -217,6 +243,9 @@ pkgctl_version_check() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# reset the section separator after loop
|
||||||
|
section_separator=''
|
||||||
|
|
||||||
if (( verbose )) && (( ${#up_to_date[@]} > 0 )); then
|
if (( verbose )) && (( ${#up_to_date[@]} > 0 )); then
|
||||||
printf "%sUp-to-date%s\n" "${section_separator}${BOLD}${UNDERLINE}" "${ALL_OFF}"
|
printf "%sUp-to-date%s\n" "${section_separator}${BOLD}${UNDERLINE}" "${ALL_OFF}"
|
||||||
section_separator=$'\n'
|
section_separator=$'\n'
|
||||||
@@ -408,7 +437,7 @@ pkgctl_version_check_spinner() {
|
|||||||
pkgctl_version_check_summary \
|
pkgctl_version_check_summary \
|
||||||
"${up_to_date_count}" \
|
"${up_to_date_count}" \
|
||||||
"${out_of_date_count}" \
|
"${out_of_date_count}" \
|
||||||
"${failure_count}" > "${tmp_file}"
|
"${failure_count}" >> "${tmp_file}"
|
||||||
|
|
||||||
# print the progress status
|
# print the progress status
|
||||||
printf "📡 Checking: %s/%s [%s] %%spinner%%" \
|
printf "📡 Checking: %s/%s [%s] %%spinner%%" \
|
||||||
|
Reference in New Issue
Block a user