mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 09:56:18 +02:00
Compare commits
1 Commits
88064d03f4
...
mr-origin-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ef6da62956 |
@@ -150,7 +150,6 @@ _pkgctl_cmds=(
|
||||
db
|
||||
diff
|
||||
issue
|
||||
license
|
||||
release
|
||||
repo
|
||||
search
|
||||
|
@@ -155,7 +155,7 @@ if (( ${#needsversioning[*]} )); then
|
||||
if [[ ! -f "${file}" ]]; then
|
||||
continue
|
||||
fi
|
||||
if ! git ls-files --error-unmatch "$file" >/dev/null; then
|
||||
if ! git ls-files --error-unmatch "$file"; then
|
||||
die "%s is not under version control" "$file"
|
||||
fi
|
||||
done
|
||||
|
@@ -94,19 +94,19 @@ pkgctl_license_check() {
|
||||
pushd "${path}" >/dev/null
|
||||
|
||||
if [[ ! -f PKGBUILD ]]; then
|
||||
msg_error "${BOLD}${pkgbase}:${ALL_OFF} no PKGBUILD found"
|
||||
msg_error "${BOLD}${path}:${ALL_OFF} no PKGBUILD found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# reset common PKGBUILD variables
|
||||
unset pkgbase
|
||||
|
||||
# shellcheck source=contrib/makepkg/PKGBUILD.proto
|
||||
if ! . ./PKGBUILD; then
|
||||
msg_error "${BOLD}${pkgbase}:${ALL_OFF} failed to source PKGBUILD"
|
||||
if [[ ! -f .SRCINFO ]]; then
|
||||
msg_error "${BOLD}${path}:${ALL_OFF} no .SRCINFO found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! pkgbase=$(grep --max-count=1 --extended-regexp "pkgbase = (.+)" .SRCINFO | awk '{print $3}'); then
|
||||
msg_error "${BOLD}${path}:${ALL_OFF} pkgbase not found in .SRCINFO"
|
||||
return 1
|
||||
fi
|
||||
pkgbase=${pkgbase:-$pkgname}
|
||||
|
||||
if [[ ! -e LICENSE ]]; then
|
||||
msg_error "${BOLD}${pkgbase}:${ALL_OFF} is missing the LICENSE file"
|
||||
|
@@ -188,13 +188,10 @@ path = [
|
||||
"README.md",
|
||||
"keys/**",
|
||||
".SRCINFO",
|
||||
".gitignore",
|
||||
".nvchecker.toml",
|
||||
"*.install",
|
||||
"*.sysusers",
|
||||
"*sysusers.conf",
|
||||
"*.tmpfiles",
|
||||
"*tmpfiles.conf",
|
||||
"*.logrotate",
|
||||
"*.pam",
|
||||
"*.service",
|
||||
|
@@ -140,32 +140,6 @@ pkgctl_version_check() {
|
||||
pushd "${path}" >/dev/null
|
||||
|
||||
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
|
||||
(( ++current_item ))
|
||||
pkgctl_version_check_spinner \
|
||||
@@ -243,9 +217,6 @@ pkgctl_version_check() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
# reset the section separator after loop
|
||||
section_separator=''
|
||||
|
||||
if (( verbose )) && (( ${#up_to_date[@]} > 0 )); then
|
||||
printf "%sUp-to-date%s\n" "${section_separator}${BOLD}${UNDERLINE}" "${ALL_OFF}"
|
||||
section_separator=$'\n'
|
||||
@@ -437,7 +408,7 @@ pkgctl_version_check_spinner() {
|
||||
pkgctl_version_check_summary \
|
||||
"${up_to_date_count}" \
|
||||
"${out_of_date_count}" \
|
||||
"${failure_count}" >> "${tmp_file}"
|
||||
"${failure_count}" > "${tmp_file}"
|
||||
|
||||
# print the progress status
|
||||
printf "📡 Checking: %s/%s [%s] %%spinner%%" \
|
||||
|
Reference in New Issue
Block a user