@@ -2688,25 +2688,21 @@ function get_first_from_set() {
2688
2688
# 5 - old version
2689
2689
# 6 - new version
2690
2690
function handle_pkg_update() {
2691
- local pkg_to_tags_mvm_var_name old_pkg new_pkg old new
2692
2691
local -n package_output_paths_ref=${1} ; shift
2693
- pkg_to_tags_mvm_var_name=${1} ; shift
2694
- old_pkg=${1} ; shift
2695
- new_pkg=${1} ; shift
2696
- old=${1} ; shift
2697
- new=${1} ; shift
2692
+ local pkg_to_tags_mvm_var_name=${1} ; shift
2693
+ local old_pkg=${1} ; shift
2694
+ local new_pkg=${1} ; shift
2695
+ local old=${1} ; shift
2696
+ local new=${1} ; shift
2698
2697
2699
2698
# shellcheck source=for-shellcheck/globals
2700
2699
source " ${WORKDIR} /globals"
2701
2700
2702
- local old_no_r new_no_r
2703
- old_no_r=${old% -r+([0-9])}
2704
- new_no_r=${new% -r+([0-9])}
2701
+ local old_no_r=${old% -r+([0-9])}
2702
+ local new_no_r=${new% -r+([0-9])}
2705
2703
2706
- local pkg_name
2707
- pkg_name=${new_pkg#*/ }
2708
- local -a lines
2709
- lines=( " 0:from ${old} to ${new} " )
2704
+ local pkg_name=${new_pkg#*/ }
2705
+ local -a lines=( " 0:from ${old} to ${new} " )
2710
2706
if [[ ${old_pkg} != " ${new_pkg} " ]]; then
2711
2707
lines+=( " 0:renamed from ${old_pkg} " )
2712
2708
fi
@@ -2766,24 +2762,20 @@ function handle_pkg_update() {
2766
2762
# has changed (empty means nothing changed, non-empty means
2767
2763
# something has changed)
2768
2764
function handle_pkg_as_is() {
2769
- local pkg_to_tags_mvm_var_name old_pkg new_pkg v
2770
2765
local -n package_output_paths_ref=${1} ; shift
2771
- pkg_to_tags_mvm_var_name=${1} ; shift
2772
- old_pkg=${1} ; shift
2773
- new_pkg=${1} ; shift
2774
- v=${1} ; shift
2766
+ local pkg_to_tags_mvm_var_name=${1} ; shift
2767
+ local old_pkg=${1} ; shift
2768
+ local new_pkg=${1} ; shift
2769
+ local v=${1} ; shift
2775
2770
local -n changed_ref=${1} ; shift
2776
2771
2777
2772
# shellcheck source=for-shellcheck/globals
2778
2773
source " ${WORKDIR} /globals"
2779
2774
2780
- local pkg_name
2781
- pkg_name=${new_pkg#/ }
2782
- local -a lines
2783
- lines=( " 0:still at ${v} " )
2775
+ local pkg_name=${new_pkg#/ }
2776
+ local -a lines=( " 0:still at ${v} " )
2784
2777
2785
- local renamed
2786
- renamed=
2778
+ local renamed=' '
2787
2779
if [[ ${old_pkg} != " ${new_pkg} " ]]; then
2788
2780
lines+=( " 0:renamed from ${old_pkg} " )
2789
2781
renamed=x
@@ -2792,8 +2784,7 @@ function handle_pkg_as_is() {
2792
2784
local out_dir=${package_output_paths_ref[POP_PKG_SLOT_OUT_DIR_IDX]}
2793
2785
generate_ebuild_diff " ${out_dir} " " ${OLD_PORTAGE_STABLE} " " ${NEW_PORTAGE_STABLE} " " ${old_pkg} " " ${new_pkg} " " ${v} " " ${v} "
2794
2786
2795
- local modified
2796
- modified=
2787
+ local modified=' '
2797
2788
2798
2789
local diff_report_name
2799
2790
gen_varname diff_report_name
@@ -2849,25 +2840,21 @@ function handle_pkg_as_is() {
2849
2840
# 5 - old version
2850
2841
# 6 - new version
2851
2842
function handle_pkg_downgrade() {
2852
- local pkg_to_tags_mvm_var_name old_pkg new_pkg old new
2853
2843
local -n package_output_paths_ref=${1} ; shift
2854
- pkg_to_tags_mvm_var_name=${1} ; shift
2855
- old_pkg=${1} ; shift
2856
- new_pkg=${1} ; shift
2857
- old=${1} ; shift
2858
- new=${1} ; shift
2844
+ local pkg_to_tags_mvm_var_name=${1} ; shift
2845
+ local old_pkg=${1} ; shift
2846
+ local new_pkg=${1} ; shift
2847
+ local old=${1} ; shift
2848
+ local new=${1} ; shift
2859
2849
2860
2850
# shellcheck source=for-shellcheck/globals
2861
2851
source " ${WORKDIR} /globals"
2862
2852
2863
- local old_no_r new_no_r
2864
- old_no_r=${old% -r+([0-9])}
2865
- new_no_r=${new% -r+([0-9])}
2853
+ local old_no_r=${old% -r+([0-9])}
2854
+ local new_no_r=${new% -r+([0-9])}
2866
2855
2867
- local pkg_name
2868
- pkg_name=${new_pkg#*/ }
2869
- local -a lines
2870
- lines=( " 0:downgraded from ${old} to ${new} " )
2856
+ local pkg_name=${new_pkg#*/ }
2857
+ local -a lines=( " 0:downgraded from ${old} to ${new} " )
2871
2858
if [[ ${old_pkg} != " ${new_pkg} " ]]; then
2872
2859
lines+=( " 0:renamed from ${old_pkg} " )
2873
2860
fi
@@ -2950,10 +2937,9 @@ function tags_for_pkg() {
2950
2937
# 3 - version
2951
2938
# @ - package tags
2952
2939
function generate_changelog_entry_stub() {
2953
- local out_dir pkg_name v
2954
- out_dir=${1} ; shift
2955
- pkg_name=${1} ; shift
2956
- v=${1} ; shift
2940
+ local out_dir=${1} ; shift
2941
+ local pkg_name=${1} ; shift
2942
+ local v=${1} ; shift
2957
2943
# rest are tags
2958
2944
2959
2945
local -a applied_tags=()
@@ -2987,13 +2973,11 @@ function generate_changelog_entry_stub() {
2987
2973
# @ - tags followed by double dash followed by lines to append to the
2988
2974
# file
2989
2975
function generate_summary_stub() {
2990
- local out_dir pkg
2991
- out_dir=${1} ; shift
2992
- pkg=${1} ; shift
2976
+ local out_dir=${1} ; shift
2977
+ local pkg=${1} ; shift
2993
2978
# rest are tags separated followed by double dash followed by lines
2994
2979
2995
- local -a tags
2996
- tags=()
2980
+ local -a tags=()
2997
2981
while [[ ${# } -gt 0 ]]; do
2998
2982
if [[ ${1} = ' --' ]]; then
2999
2983
shift
@@ -3034,16 +3018,14 @@ function generate_summary_stub() {
3034
3018
# 4 - old package name
3035
3019
# 5 - new package name
3036
3020
function generate_full_diffs() {
3037
- local out_dir old_ps new_ps old_pkg new_pkg
3038
- out_dir=${1} ; shift
3039
- old_ps=${1} ; shift
3040
- new_ps=${1} ; shift
3041
- old_pkg=${1} ; shift
3042
- new_pkg=${1} ; shift
3021
+ local out_dir=${1} ; shift
3022
+ local old_ps=${1} ; shift
3023
+ local new_ps=${1} ; shift
3024
+ local old_pkg=${1} ; shift
3025
+ local new_pkg=${1} ; shift
3043
3026
3044
- local old_path new_path
3045
- old_path=" ${old_ps} /${old_pkg} "
3046
- new_path=" ${new_ps} /${new_pkg} "
3027
+ local old_path=" ${old_ps} /${old_pkg} "
3028
+ local new_path=" ${new_ps} /${new_pkg} "
3047
3029
3048
3030
local -a common_diff_opts=(
3049
3031
--recursive
@@ -3064,16 +3046,14 @@ function generate_full_diffs() {
3064
3046
# 4 - old package name
3065
3047
# 5 - new package name
3066
3048
function generate_non_ebuild_diffs() {
3067
- local out_dir old_ps new_ps old_pkg new_pkg
3068
- out_dir=${1} ; shift
3069
- old_ps=${1} ; shift
3070
- new_ps=${1} ; shift
3071
- old_pkg=${1} ; shift
3072
- new_pkg=${1} ; shift
3049
+ local out_dir=${1} ; shift
3050
+ local old_ps=${1} ; shift
3051
+ local new_ps=${1} ; shift
3052
+ local old_pkg=${1} ; shift
3053
+ local new_pkg=${1} ; shift
3073
3054
3074
- local old_path new_path
3075
- old_path=" ${old_ps} /${old_pkg} "
3076
- new_path=" ${new_ps} /${new_pkg} "
3055
+ local old_path=" ${old_ps} /${old_pkg} "
3056
+ local new_path=" ${new_ps} /${new_pkg} "
3077
3057
3078
3058
local -a diff_opts=(
3079
3059
--recursive
@@ -3099,22 +3079,19 @@ function generate_non_ebuild_diffs() {
3099
3079
# 6 - old package version
3100
3080
# 7 - new package version
3101
3081
function generate_ebuild_diff() {
3102
- local out_dir old_ps new_ps old_pkg new_pkg old new
3103
- out_dir=${1} ; shift
3104
- old_ps=${1} ; shift
3105
- new_ps=${1} ; shift
3106
- old_pkg=${1} ; shift
3107
- new_pkg=${1} ; shift
3108
- old=${1} ; shift
3109
- new=${1} ; shift
3110
-
3111
- local old_pkg_name new_pkg_name
3112
- old_pkg_name=${old_pkg#*/ }
3113
- new_pkg_name=${new_pkg#*/ }
3114
-
3115
- local old_path new_path
3116
- old_path=" ${old_ps} /${old_pkg} /${old_pkg_name} -${old} .ebuild"
3117
- new_path=" ${new_ps} /${new_pkg} /${new_pkg_name} -${new} .ebuild"
3082
+ local out_dir=${1} ; shift
3083
+ local old_ps=${1} ; shift
3084
+ local new_ps=${1} ; shift
3085
+ local old_pkg=${1} ; shift
3086
+ local new_pkg=${1} ; shift
3087
+ local old=${1} ; shift
3088
+ local new=${1} ; shift
3089
+
3090
+ local old_pkg_name=${old_pkg#*/ }
3091
+ local new_pkg_name=${new_pkg#*/ }
3092
+
3093
+ local old_path=" ${old_ps} /${old_pkg} /${old_pkg_name} -${old} .ebuild"
3094
+ local new_path=" ${new_ps} /${new_pkg} /${new_pkg_name} -${new} .ebuild"
3118
3095
3119
3096
xdiff --unified=3 " ${old_path} " " ${new_path} " > " ${out_dir} /ebuild.diff"
3120
3097
}
@@ -3155,11 +3132,10 @@ function generate_cache_diff_report() {
3155
3132
# 3 - old package name
3156
3133
# 4 - new package name
3157
3134
function generate_package_mention_reports() {
3158
- local out_dir scripts old_pkg new_pkg
3159
- out_dir=${1} ; shift
3160
- scripts=${1} ; shift
3161
- old_pkg=${1} ; shift
3162
- new_pkg=${1} ; shift
3135
+ local out_dir=${1} ; shift
3136
+ local scripts=${1} ; shift
3137
+ local old_pkg=${1} ; shift
3138
+ local new_pkg=${1} ; shift
3163
3139
3164
3140
generate_mention_report_for_package " ${scripts} " " ${new_pkg} " > " ${out_dir} /occurences"
3165
3141
0 commit comments