From c955f7ab8a63ae765fc90e60b7b1eb8435b89985 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Jun 13 2025 16:46:29 +0000 Subject: refresh_patch.sh -> refresh_patch --- diff --git a/README.md b/README.md index f11cd32..fb1e2cb 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ To hack on the kernel sources: $ cd tmp/linux-$version-$branch $ quilt new patches.suse/fix-foo-and-bar.patch $ quilt edit some/file.c - $ ./refresh_patch.sh + $ ./refresh_patch $ quilt header -e # see next chapter Refer to the Quilt documentation for details. When you are done, add the new diff --git a/scripts/README.scripts b/scripts/README.scripts index f7716e9..a3ce7ab 100644 --- a/scripts/README.scripts +++ b/scripts/README.scripts @@ -85,7 +85,7 @@ prepare-maint-update python - Python module path -refresh_patch.sh +refresh_patch - Wrapper for 'quilt refresh' to be used in a sequence-patch tree. rpm-changes-merge.pl diff --git a/scripts/check-patchfmt b/scripts/check-patchfmt index 3256312..38edeee 100755 --- a/scripts/check-patchfmt +++ b/scripts/check-patchfmt @@ -20,7 +20,7 @@ # you may find current contact information at www.novell.com ############################################################################# -# Check that the a patch is in the format produced by scripts/refresh_patch.sh +# Check that the a patch is in the format produced by scripts/refresh_patch use strict; use warnings; @@ -138,7 +138,7 @@ if ($ARGV[0] eq "--stdin") { } if ($errors) { - printf STDERR ("Please refresh the patch%s using scripts/refresh_patch.sh\n", (scalar(@ARGV) > 1 ? "es" : "")); + printf STDERR ("Please refresh the patch%s using scripts/refresh_patch\n", (scalar(@ARGV) > 1 ? "es" : "")); if ($git_renames) { print STDERR "Use --no-renames when generating patches from git\n"; } diff --git a/scripts/git_sort/README.md b/scripts/git_sort/README.md index 60c4cb1..64ae1ed 100644 --- a/scripts/git_sort/README.md +++ b/scripts/git_sort/README.md @@ -120,7 +120,7 @@ ben@f1:~/local/src/kernel-source/tmp/current$ make olddefconfig scripts/kconfig/conf --olddefconfig Kconfig ben@f1:~/local/src/kernel-source/tmp/current$ qfmake [...] -ben@f1:~/local/src/kernel-source/tmp/current$ ./refresh_patch.sh +ben@f1:~/local/src/kernel-source/tmp/current$ ./refresh_patch Refreshed patch patches/patches.drivers/of-of_mdio-Add-marvell-88e1145-to-whitelist-of-PHY-c.patch ben@f1:~/local/src/kernel-source/tmp/current$ cd ../../ ben@f1:~/local/src/kernel-source$ git st @@ -241,12 +241,12 @@ To address the situation, Then call `qskip` to skip the commit. * remove the other copy, using `q delete -r ` and follow as indicated below (q push, qfmake, - ./refresh_patch.sh) + ./refresh_patch) * if a commit does not apply `q push -f # or -fm` `vi-conflicts # also from git-helpers` `qfmake [...]` - `./refresh_patch.sh` + `./refresh_patch` * if one or more additional commits are necessary to fix the problem Use `qedit` to add these additional commits to the list of commits to backport. diff --git a/scripts/git_sort/quilt-mode.sh b/scripts/git_sort/quilt-mode.sh index 839d2d2..efa4848 100644 --- a/scripts/git_sort/quilt-mode.sh +++ b/scripts/git_sort/quilt-mode.sh @@ -400,7 +400,7 @@ qdoit () { return 1 fi - ./refresh_patch.sh + ./refresh_patch if ! qfmake "$@"; then echo "The last applied commit results in a build failure. Please examine the situation." > /dev/stderr diff --git a/scripts/python/qcp.py b/scripts/python/qcp.py index 5e9811d..4a8c266 100755 --- a/scripts/python/qcp.py +++ b/scripts/python/qcp.py @@ -50,7 +50,7 @@ def format_import(references, tmpdir, dstdir, rev, poi=[]): "--commit=%s" % rev, "--reference=%s" % references, src]) subprocess.check_call(("quilt", "import", "-P", dst, src,)) - # This will remind the user to run refresh_patch.sh + # This will remind the user to run refresh_patch target_dir = os.path.join(".pc", dstdir) if not os.path.isdir(target_dir): os.mkdir(target_dir) diff --git a/scripts/refresh_patch b/scripts/refresh_patch new file mode 100755 index 0000000..9700b31 --- /dev/null +++ b/scripts/refresh_patch @@ -0,0 +1,34 @@ +#!/bin/bash +# +# keep noise between two revisions of a patch small: +# fixed sort order +# fixed filenames a/b, requires quilt 0.46+ +# no timestamps +# diffstat to get a quick overview what files get modified +# +export LC_ALL=C +export LANG=C + +current="$(quilt top)" +case "$current" in +*/patches.kernel.org/*) + echo "Will not touch kernel.org patch '$current' because it will disappear soon." + exit 0 + ;; +*/patches.xen/*) + # Preserve file order in xen patches + ;; +*) + # Sort files in other patches + opt_sort=--sort + ;; +esac + +quilt refresh \ + -U 3 \ + --no-timestamps \ + --no-index \ + --diffstat \ + $opt_sort \ + --backup \ + -p ab diff --git a/scripts/refresh_patch.sh b/scripts/refresh_patch.sh deleted file mode 100755 index 9700b31..0000000 --- a/scripts/refresh_patch.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# keep noise between two revisions of a patch small: -# fixed sort order -# fixed filenames a/b, requires quilt 0.46+ -# no timestamps -# diffstat to get a quick overview what files get modified -# -export LC_ALL=C -export LANG=C - -current="$(quilt top)" -case "$current" in -*/patches.kernel.org/*) - echo "Will not touch kernel.org patch '$current' because it will disappear soon." - exit 0 - ;; -*/patches.xen/*) - # Preserve file order in xen patches - ;; -*) - # Sort files in other patches - opt_sort=--sort - ;; -esac - -quilt refresh \ - -U 3 \ - --no-timestamps \ - --no-index \ - --diffstat \ - $opt_sort \ - --backup \ - -p ab diff --git a/scripts/refresh_patch.sh b/scripts/refresh_patch.sh new file mode 120000 index 0000000..9b6119e --- /dev/null +++ b/scripts/refresh_patch.sh @@ -0,0 +1 @@ +deprecated-shell \ No newline at end of file diff --git a/scripts/sequence-patch b/scripts/sequence-patch index 13d5980..79418b9 100755 --- a/scripts/sequence-patch +++ b/scripts/sequence-patch @@ -600,7 +600,7 @@ if ! $QUILT; then fi ln -s $PWD $PATCH_DIR/patches -ln -s patches/scripts/{refresh_patch.sh,run_oldconfig{,.sh}} $PATCH_DIR/ +ln -s patches/scripts/{refresh_patch,run_oldconfig}{,.sh} $PATCH_DIR/ if $VANILLA; then touch "$PATCH_DIR/.is_vanilla" fi