Patch -p1 file.patch do nothing

If you have trouble with PHC you can ask and hope for help here.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Honza
Posts: 3
Joined: Fri 25. Jul 2008, 15:46
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Patch -p1 file.patch do nothing

Post by Honza » Fri 25. Jul 2008, 15:52

Hi, when i tried to patch kernel with
"patch -p1 linux-phc-0.3.2-kernel-vanilla-2.6.26.patch", described in Installation Guide, patch was doing nothing.
so i done it with
"cat linux-phc-0.3.2-kernel-vanilla-2.6.26.patch | patch -p1" and it worked.

thanks for amazing PHC...

H.

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Patch -p1 file.patch do nothing

Post by the-fallen » Fri 25. Jul 2008, 21:37

Did you really typed "patch -p1 linux-phc-0.3.2-kernel-vanilla-2.6.26.patch" ?

Then it is wrong, you need to type "patch -p1 < linux-phc-0.3.2-kernel-vanilla-2.6.26.patch".
(You forgot the "<" ??)

Honza
Posts: 3
Joined: Fri 25. Jul 2008, 15:46
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Patch -p1 file.patch do nothing

Post by Honza » Sat 26. Jul 2008, 23:15

I am sorry, of course you are right. I have overlooked it :(

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Patch -p1 file.patch do nothing

Post by the-fallen » Sun 27. Jul 2008, 12:53

Hehe that is not a problem. I am glad that it is just that easy.

KdE
Posts: 2
Joined: Wed 29. Jul 2009, 12:25
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Patch -p1 file.patch do nothing

Post by KdE » Wed 29. Jul 2009, 12:39

It was not the Problem of Honza. The problem is, that even in the current version the "<" is missing in prepare.sh . I have downloaded the phc-intel-0.3.2-7.tar.gz

Dont know why the people did not get angry about that.
Instead of this part in prepare.sh

Code: Select all

	then
		echo "FOUND AVAILABLE PATCHSET. PREPARING."
		cp inc/$1/acpi-cpufreq.c phc-intel.c
		patch -p1 phc-intel.c inc/$1/linux-phc-0.3.2.patch
it should read this, because the diff file wants the name acpi-cpufreq.c

Code: Select all

	then
		echo "FOUND AVAILABLE PATCHSET. PREPARING."
		cp inc/$1/acpi-cpufreq.c acpi-cpufreq.c
		patch acpi-cpufreq.c -i inc/$1/linux-phc-0.3.2.patch
		mv acpi-cpufreq.c phc-intel.c

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Patch -p1 file.patch do nothing

Post by the-fallen » Wed 29. Jul 2009, 19:22

Honza was not using the offtree-package but the single patch.

But how ever, I did not realize that this may be a problem. For me it worked and no one else ever reported a problem.
But I do not say you are not right. I will investigate it as soon my "make" works again (running a developement deistribution release).

Thanks for the report.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable