Skip to content

Commit

Permalink
[merge] from unstable into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
OneCDOnly committed Sep 28, 2024
2 parents f84382b + 25c9148 commit 5200632
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 264 deletions.
Binary file modified objects.tar.gz
Binary file not shown.
Binary file modified sherpa-manager.tar.gz
Binary file not shown.
99 changes: 58 additions & 41 deletions support/sherpa-manager.source
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ ShowResults()
elif [[ $useropt_show_backups = true ]]; then
ReleaseLockfile
ShowReportBackups
elif [[ $useropt_show_versions = true ]]; then
ReleaseLockfile
ShowReportVersions
elif [[ $useropt_show_dependencies = true ]]; then
ShowReportDependencies
elif [[ $useropt_show_features = true ]]; then
Expand All @@ -106,7 +103,12 @@ ShowResults()
fi

if [[ $generate_list_report = true ]]; then
ShowQPKGLists
if [[ $useropt_list_versions = true ]]; then
ReleaseLockfile
ShowVersionsList
else
ShowQPKGLists
fi
fi

if [[ $useropt_paste_log_last = true ]]; then
Expand Down Expand Up @@ -342,6 +344,7 @@ LoadVars()
useropt_help_show=false
useropt_help_tips=false
useropt_help_upgrades=false
useropt_list_versions=false
useropt_paste_log_last=false
useropt_paste_log_tail=false
useropt_report_footer=$(LoadSetting ReportFooter true)
Expand All @@ -354,7 +357,6 @@ LoadVars()
useropt_show_repos=false
useropt_show_all_results=false
useropt_show_status=false
useropt_show_versions=false
useropt_terse=$(LoadSetting Terse true)
useropt_verbose=false

Expand Down Expand Up @@ -2462,7 +2464,7 @@ ParseListArgs()
# Include action assignment when action hasn't been previously specified.

case $group in
abs)
versions)
[[ -z $action ]] && action=list
esac

Expand All @@ -2472,14 +2474,6 @@ ParseListArgs()
case $action in
list)
case $group in
abs)
action=''
awaiting_group=false
generate_help_report=true
get_qpkg_states=true
run_package_actions=false
useropt_help_abbreviations=true
;;
all|?(in)dependent)
LoadObjects
QPKGs.AClist.GR${group}:Set
Expand Down Expand Up @@ -2513,11 +2507,12 @@ ParseListArgs()
show_title=false
;;
versions)
LoadPackages
action=''
awaiting_group=false
generate_list_report=true
show_title=false
useropt_show_versions=true
useropt_list_versions=true
;;
*)
args_remaining+=("$action")
Expand Down Expand Up @@ -2641,14 +2636,14 @@ ParseActionArgs()
generate_action_results_report=true
get_qpkg_states=true
run_package_actions=true
;;
*)
LoadObjects
QPKGs-AC${action}-to:Add "$group"
awaiting_group=false
generate_action_results_report=true
get_qpkg_states=true
run_package_actions=true
# ;;
# *)
# LoadObjects
# QPKGs-AC${action}-to:Add "$group"
# awaiting_group=false
# generate_action_results_report=true
# get_qpkg_states=true
# run_package_actions=true
esac
else
args_remaining+=("$arg")
Expand Down Expand Up @@ -8115,22 +8110,6 @@ ShowReportStatuses()

}

ShowReportVersions()
{

DisableDebugToArchiveAndFile
EraseThisLine

Display "QPKG: ${r_this_package_ver:-undefined}"
Display "manager: ${r_this_script_ver:-undefined}"
Display "loader: ${LOADER_SCRIPT_VERSION:-undefined}"
Display "objects: ${r_objects_version:-undefined}"
Display "packages: ${r_packages_epoch}$([[ $r_packages_epoch != undefined ]] && printf '%s' " ($(ConvertSecondsToFullDate "$r_packages_epoch"))")"

return 0

}

ShowReportAllActionResults()
{

Expand Down Expand Up @@ -8446,6 +8425,22 @@ GenerateReportHeadingsFooter()

}

ShowVersionsList()
{

DisableDebugToArchiveAndFile
EraseThisLine

Display "QPKG: ${r_this_package_ver:-undefined}$([[ $r_this_package_ver != undefined ]] && printf '%s' " ($(ConvertDateCodeToExtendedDate "$r_this_package_ver"))")"
Display "manager: ${r_this_script_ver:-undefined}$([[ $r_this_script_ver != undefined ]] && printf '%s' " ($(ConvertDateCodeToExtendedDate "$r_this_script_ver"))")"
Display "loader: ${LOADER_SCRIPT_VERSION:=undefined}$([[ $LOADER_SCRIPT_VERSION != undefined ]] && printf '%s' " ($(ConvertDateCodeToExtendedDate "$LOADER_SCRIPT_VERSION"))")"
Display "objects: ${r_objects_version:-undefined}$([[ $r_objects_version != undefined ]] && printf '%s' " ($(ConvertDateCodeToExtendedDate "$r_objects_version"))")"
Display "packages: ${r_packages_epoch:-undefined}$([[ $r_packages_epoch != undefined ]] && printf '%s' " ($(ConvertSecondsToFullDate "$r_packages_epoch"))")"

return 0

}

ShowQPKGLists()
{

Expand Down Expand Up @@ -13337,6 +13332,28 @@ ConvertNanosecondsToMilliseconds()

} 2> /dev/null

ConvertDateCodeToExtendedDate()
{

# Inputs: (local)
# $1 = datecode in the format 'YYMMDD'. Example: '240928'

# Outputs: (local)
# stdout = extended date format without time. Example: 'Sun 28 Sep 2024'

[[ -n ${1:-} ]] || return

local a=$($SED_CMD 's/[^0-9]*//g' <<< "${1:-}") # Strip everything not a numeral.

if [[ ${#a} -ne 6 ]]; then
printf 'unable to interpret datecode'
return 1
fi

/bin/date -d ${a::2}-${a:2:2}-${a:4:2} '+%a %d %b %Y'

} 2> /dev/null

ConvertNowToFullDate()
{

Expand Down Expand Up @@ -13383,11 +13400,11 @@ FormatAsLongMinutesSecs()
# Inputs: (local)
# $1 = a time in long minutes and seconds to convert to 'MMMm:SSs'.

# separate minutes from seconds
# Separate minutes from seconds
local m=${1%%:*}
local s=${1#*:}

# remove leading whitespace
# Remove leading whitespace
m=${m##* }
s=${s##* }

Expand Down
4 changes: 3 additions & 1 deletion workshop/ideas.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* update sherpa service control script terminal output so it matches QPKG library functions.
* Update sherpa service control script terminal output so it matches QPKG library functions.

* Check OOM killed pids against inactive daemons and report as-such on status report.

Expand Down Expand Up @@ -45,6 +45,8 @@
* Include QPKG version numbers in live progress messages?

* Allow QPKGs to follow source git branch, release or tag.
# [[ $(git branch) =~ '(no branch)' ]] && echo none || echo one
# git describe --tags

* Add new arg to reshow the previously generated report.
- 'sherpa show report'.
Expand Down
31 changes: 0 additions & 31 deletions workshop/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,6 @@ Observed issues:
* Near the end of installing IPKs, monitored download path can remain at non-zero size while packages complete installation.
- Include a separate progress message when dir size shrinks? Maybe force increase to "100%" and stop monitoring?

* When attempting to view file versions with-and-without correct syntax fails in several ways:
-------------------------------------------------------------------------------------------------------------------------
[~] # sherpa list versions
proc: env ...
proc: args ...
-------------------------------------------------------------------------------------------------------------------------
[~] # sherpa versions
proc: env ...
proc: args ...
proc: objects ...
proc: QPKGs ...
sherpa v240529-unstable

derp: unknown argument "versions". Please check the arguments again.

-------------------------------------------------------------------------------------------------------------------------
[~] # sherpa show versions
proc: env ...
proc: args ...
proc: objects ...
proc: QPKGs ...
/share/CACHEDEV1_DATA/.qpkg/sherpa/cache/sherpa-manager.sh: line 1882: QPKGs-ACshow-to:Add: command not found
sherpa v240529-unstable

• Please provide a valid source after 'show' like:
# sherpa show abs
# sherpa show log
# sherpa show packages
# sherpa show results
-------------------------------------------------------------------------------------------------------------------------

* 'sherpa' and 'opkg' were not available after installing Entware.
- Entware installation may be corrupt.
- But this shouldn't affect the sherpa command `/usr/sbin/sherpa`.
Expand Down
58 changes: 0 additions & 58 deletions workshop/kapowarr.source

This file was deleted.

38 changes: 0 additions & 38 deletions workshop/report.ansi

This file was deleted.

1 change: 0 additions & 1 deletion workshop/sherpa QPKGs without function library support.txt

This file was deleted.

Loading

0 comments on commit 5200632

Please sign in to comment.