dynup/kpatch

kpatch-build: verify_patch_files might miss a parameter

laokz opened this issue · 2 comments

laokz commented

To make verify_patch_files() consistent with apply_patches() , lsdiff might be lsdiff --strip=1, because apply_patches use patch -p1.

		for path in $(lsdiff "$patch" 2>/dev/null); do

			dir=$(dirname "$path")
			ext="${path##*.}"

			if [[ "$dir" =~ ^lib$ ]] || [[ "$dir" =~ ^lib/ ]] ; then

Hm, yes. I'm not sure how that code even works - I guess it doesn't ;-)

Hm, yes. I'm not sure how that code even works - I guess it doesn't ;-)

Heh, yea it's only looking for negative results. It's never gonna match on "src/lib" so we never saw any complaints.

I do wonder if this is the only dependency on patchutils. Something like awk '/^diff/{print $NF}' "$patch" gets us 90% of the way there... but would need to workaround that pesky leading directory to strip.

$ for p in $(rpm -ql patchutils | grep '/bin'); do grep -R $(basename "$p"); done
README.md:patch with the previous patch using `combinediff` before running
kpatch-build/kpatch-build:              for path in $(lsdiff "$patch" 2>/dev/null); do

One stale comment and this particular utility.