Compare commits

...

7 Commits

Author SHA1 Message Date
Jakub Klinkovský
4da854c526 Merge branch 'version-full-progress' into 'master'
feat(version): enhance version check spinner to progressively update the full pretty output

See merge request archlinux/devtools!313
2025-08-09 02:05:56 +00:00
Jakub Klinkovský
fc56ebedf3 fix(completion): fix bash completion for the license subcommand
Signed-off-by: Jakub Klinkovský <lahwaacz@archlinux.org>
2025-08-05 17:48:12 +02:00
Christian Heusel
01757e6904 fix(commitpkg): Quiet git ls-files output
So far all files in `needsversioning=(...)` have been printed to the
command line if they were found, which is not useful, especially now
that we have more files present there.

It makes sense however to keep the standard error output, as this gives
a actionable suggestion what one should to to fix the issue:

    > error: pathspec 'PKGBUILD' did not match any file(s) known to git
    > Did you forget to 'git add'?

Fixes #281

Signed-off-by: Christian Heusel <christian@heusel.eu>
2025-08-01 11:26:57 +02:00
Daniel M. Capella
c5fe8ff3e6 feat(license): Extend matches for sysusers/tmpfiles configs
Eg. to match:
- sysusers.conf
- $pkgname.sysusers
- $pkgname.sysusers.conf
2025-07-28 23:38:32 -04:00
Christian Heusel
ad7dd50bf3 chore(release): version v1.4.0 2025-07-25 09:04:45 +02:00
Jakub Klinkovský
5a381835e8 feat(config): set default build flags for Fortran
This implements RFC 54: https://rfc.archlinux.page/0054-fortran-flags/
2025-07-25 08:54:49 +02:00
Jakub Klinkovský
753d2daf65 feat(version): enhance version check spinner to progressively update the full pretty output
This way the spinner updates not only the Summary section, but also
Failure and Out-of-date which would otherwise be shown only at the end.

The implementation is kind of gross, but bash can't pass arrays to a
function 🤷
2025-04-26 22:53:53 +02:00
6 changed files with 42 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
SHELL=/bin/bash -o pipefail
V=1.3.2
V=1.4.0
BUILDTOOLVER ?= $(V)
PREFIX = /usr/local

View File

@@ -1,4 +1,6 @@
#!/hint/bash
# shellcheck disable=2034
#
# /etc/makepkg.conf.d/fortran.conf
#
@@ -9,10 +11,12 @@
# Flags used for the Fortran compiler, similar in spirit to CFLAGS. Read
# linkman:gfortran[1] for more details on the available flags.
#FFLAGS="-O2 -pipe"
#FCFLAGS="$FFLAGS"
FFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt \
-Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection \
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
FCFLAGS="$FFLAGS"
# Additional compiler flags appended to `FFLAGS` and `FCFLAGS` for use in debugging. Usually
# this would include: ``-g''. Read linkman:gfortran[1] for more details on the wide
# variety of compiler flags available.
#DEBUG_FFLAGS="-g"
DEBUG_FFLAGS="-g"

View File

@@ -150,6 +150,7 @@ _pkgctl_cmds=(
db
diff
issue
license
release
repo
search

View File

@@ -155,7 +155,7 @@ if (( ${#needsversioning[*]} )); then
if [[ ! -f "${file}" ]]; then
continue
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"
fi
done

View File

@@ -191,7 +191,9 @@ path = [
".nvchecker.toml",
"*.install",
"*.sysusers",
"*sysusers.conf",
"*.tmpfiles",
"*tmpfiles.conf",
"*.logrotate",
"*.pam",
"*.service",

View File

@@ -140,6 +140,32 @@ 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 \
@@ -217,6 +243,9 @@ 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'
@@ -408,7 +437,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%%" \