Hmm... Looks like a unified diff to me...

Does anyone know how to stop this msg popping up when applying a diff?

According to Thread 42044/post-233763, the patch is being applied from the wrong directory, in which case, where should it be applied from.

Alternatively, could it be because the patch was created with FreeBSD diff and is being applied using GNU patch?
 
Looking at the source around line 187:


Code:
    if (verbose)
        say("Hmm...");
...
    if (verbose)
        say("  %sooks like %s to me...\n",
            (p_base == 0 ? "L" : "The next patch l"),
            diff_type == UNI_DIFF ? "a unified diff" :
            diff_type == CONTEXT_DIFF ? "a context diff" :
        diff_type == NEW_CONTEXT_DIFF ? "a new-style context diff" :
            diff_type == NORMAL_DIFF ? "a normal diff" :
            "an ed script");

So it's looking for a verbose flag, man patch says:

Code:
     -s, --quiet, --silent
             Makes patch do its work silently, unless an error occurs.

And if you look in patch.c, c. line 642
Code:
        case 's':
            verbose = false;
I'm not entirely sure it answers your question - the topic title seems to be about suppressing the message, but the topic body seems to be more about paths and things.
 
I think I phrased the question wrongly. I'm attempting to apply two patches to two different files. One just comes up with the 'looks like .... ' msg but does the patch and carries on. The other reports and requires a response about a previously applied patch has been detected, which I don't believe is the case, as I don't see the changes included and am mystified why patch has reached this conclusion.


Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- include/prereq-build.mk 2021-12-03 21:03:44.406974000 +0000
|+++ include/prereq-build.mk-FreeBSD-getopt 2021-12-03 21:56:19.603555000 +0000
--------------------------
Patching file include/prereq-build.mk using Plan A...
Hunk #1 succeeded at 130.
done

patchfile 0% of 548 B 0 Bps
patchfile 548 B 357 kBps 00s
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- mkhash.c.orig 2021-12-04 02:12:26.261244120 +0000
|+++ mkhash.c 2021-12-04 02:16:23.570984930 +0000
--------------------------
Patching file scripts/mkhash.c using Plan A...
Reversed (or previously applied) patch detected! Assume -R? [y]
Hunk #1 succeeded at 79.
Hunk #2 succeeded at 90.
Hunk #3 succeeded at 100 with fuzz 2 (offset -26 lines).
done
 
Code:
make clean
make extract
make patch

If you don't clean the work directory then previously applied patches are going to get in the way. Test your patches on a 'clean' environment. Also note that patches could be applied through the port's Makefile (post-patch, pre-patch and patch targets). And I suggest using make makepatch to create your patches, so they're in the correct format and have the correct naming convention.
 
SirDice, you mistakenly assumed balanga is applying the patch on a port, but he is applying on OpenWRT.

balanga, if you paste the patches it would be easier to check what the cause may be.

I mistakenly believed that mkhash.c needed to be patched to work on FreeBSD as per reported bug


It turns out that this patch is no longer required because it has now been applied into the mainline code, and I've only just realised that this is what the warning msgs meant. ie I was trying to apply a patch to code which had already been patched. Yeah I know - kinda dumb of me not to figure this out earlier.

So as it stand now the OpenWrt Build system should work out of the box once the path to the getopt port is included.

Unfortunately, mkhash does not get built for some, as yet unidentified reason and this cause errors such as:-

Prerequisite check failed. Use FORCE=1 to override.
gmake: *** [/root/OpenWrt-BuildSystem/openwrt/include/toplevel.mk:180: staging_dir/host/.prereq-build] Error 1
bash: line 3: /root/OpenWrt-BuildSystem/openwrt/staging_dir/host/bin/mkhash: No such file or directory
 
Back
Top