forked from pool/etc-update
- Refresh etc-update-opensuse.patch to match for rpmnew files too.
Now it matched only rpmsave and rpmorig * etc-update-opensuse.patch OBS-URL: https://build.opensuse.org/package/show/utilities/etc-update?expand=0&rev=14
This commit is contained in:
committed by
Git OBS Bridge
parent
b208392d1a
commit
a74e9ccd9d
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 30 09:29:28 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Refresh etc-update-opensuse.patch to match for rpmnew files too.
|
||||
Now it matched only rpmsave and rpmorig
|
||||
* etc-update-opensuse.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 26 08:14:14 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
||||
+23
-27
@@ -2,7 +2,7 @@ Index: portage-portage-2.3.31/bin/etc-update
|
||||
===================================================================
|
||||
--- portage-portage-2.3.31.orig/bin/etc-update
|
||||
+++ portage-portage-2.3.31/bin/etc-update
|
||||
@@ -32,11 +32,12 @@ get_config() {
|
||||
@@ -32,10 +32,11 @@ get_config() {
|
||||
"${PORTAGE_CONFIGROOT}"etc/etc-update.conf)
|
||||
}
|
||||
|
||||
@@ -11,51 +11,47 @@ Index: portage-portage-2.3.31/bin/etc-update
|
||||
|
||||
case $OS_RELEASE_ID in
|
||||
- suse|opensuse) OS_FAMILY='suse' NEW_EXT='rpmnew';;
|
||||
- arch|manjaro|antergos) OS_FAMILY='arch' NEW_EXT='pacnew';;
|
||||
+ suse|opensuse|opensuse-leap|opensuse-tumbleweed) OS_FAMILY='rpm' ;;
|
||||
+ fedora|rhel) OS_FAMILY='rpm' ;;
|
||||
+ arch|manjaro|antergos) OS_FAMILY='arch' ;;
|
||||
arch|manjaro|antergos) OS_FAMILY='arch' NEW_EXT='pacnew';;
|
||||
*) OS_FAMILY='gentoo' ;;
|
||||
esac
|
||||
|
||||
@@ -53,18 +54,32 @@ if [[ $OS_FAMILY == 'gentoo' ]]; then
|
||||
@@ -53,7 +54,7 @@ if [[ $OS_FAMILY == 'gentoo' ]]; then
|
||||
get_live_file() {
|
||||
echo "${rpath}/${rfile:10}"
|
||||
}
|
||||
-elif [[ $OS_FAMILY == 'suse' ]] || [[ $OS_FAMILY == 'arch' ]]; then
|
||||
+elif [[ $OS_FAMILY == 'arch' ]]; then
|
||||
+ get_basename() {
|
||||
+ printf -- '%s\n' "${1%.pacnew}"
|
||||
+ }
|
||||
+ get_basename_find_opt() {
|
||||
+ printf -- '%s\n' "${1}.pacnew"
|
||||
+ }
|
||||
+ get_scan_regexp() {
|
||||
+ echo "s:\(^.*/\)\(.*\)\(\.pacnew\):\1\2\3$b\1$b\3$b\2:"
|
||||
+ }
|
||||
+ get_live_file() {
|
||||
+ printf -- '%s\n' "${cfg_file%.pacnew}"
|
||||
+ }
|
||||
+# In rpm we have rpmsave rpmorig and rpmnew
|
||||
+elif [[ $OS_FAMILY == 'rpm' ]]; then
|
||||
get_basename() {
|
||||
- printf -- '%s\n' "${1%.${NEW_EXT}}"
|
||||
+ printf -- '%s\n' "${1}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//'
|
||||
printf -- '%s\n' "${1%.${NEW_EXT}}"
|
||||
}
|
||||
get_basename_find_opt() {
|
||||
- printf -- '%s\n' "${1}.${NEW_EXT}"
|
||||
+ printf -- '%s\n' "${1}.rpm????"
|
||||
@@ -61,11 +62,25 @@ elif [[ $OS_FAMILY == 'suse' ]] || [[ $O
|
||||
printf -- '%s\n' "${1}.${NEW_EXT}"
|
||||
}
|
||||
get_scan_regexp() {
|
||||
- echo "s:\(^.*/\)\(.*\)\(\.rpmnew\):\1\2\3$b\1$b\3$b\2:"
|
||||
+ echo "s:\(^.*/\)\(.*\)\(\.\(rpmnew|rpmsave|rpmorig\)\):\1\2\3$b\1$b\3$b\2:"
|
||||
+ echo "s:\(^.*/\)\(.*\)\(\.${NEW_EXT}\):\1\2\3$b\1$b\3$b\2:"
|
||||
}
|
||||
get_live_file() {
|
||||
- printf -- '%s\n' "${cfg_file%.${NEW_EXT}}"
|
||||
+ printf -- '%s\n' "${cfg_file}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//'
|
||||
printf -- '%s\n' "${cfg_file%.${NEW_EXT}}"
|
||||
}
|
||||
+# In rpm we have rpmsave, rpmorig, and rpmnew.
|
||||
+elif [[ $OS_FAMILY == 'rpm' ]]; then
|
||||
+ get_basename() {
|
||||
+ printf -- '%s\n' "${1}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//'
|
||||
+ }
|
||||
+ get_basename_find_opt() {
|
||||
+ printf -- '%s\n' "${1}.rpm???*"
|
||||
+ }
|
||||
+ get_scan_regexp() {
|
||||
+ echo "s:\(^.*/\)\(.*\)\(\.\(rpmnew|rpmsave|rpmorig\)\):\1\2\3$b\1$b\3$b\2:"
|
||||
+ }
|
||||
+ get_live_file() {
|
||||
+ printf -- '%s\n' "${cfg_file}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//'
|
||||
+ }
|
||||
fi
|
||||
|
||||
cmd_var_is_valid() {
|
||||
@@ -557,7 +572,7 @@ do_merge() {
|
||||
|
||||
local file="${1}"
|
||||
|
||||
Reference in New Issue
Block a user