Re: quilt patch (hunk ignored)

2022-05-19 Thread Bo YU

On Thu, May 19, 2022 at 04:21:42PM +0500, Andrey Rahmatullin wrote:

On Thu, May 19, 2022 at 07:17:11PM +0800, Bo YU wrote:

> > But if use the same way to apply patch into d/*, sometime it will get:
> Patches shouldn't patch files in debian/. Edit the files directly.


Understood it. here is SO[0] to hint it.

But this is inconvenient:

*shrug*


* if to modify many files in d/* or code snip and want to keep a clean status
 to watch different parts on many times modify. 

Not sure what does this mean but it's possible that a VCS can help here.


* send these modify to the package's maintainer

You should send a debdiff, not a patch from debian/patches/.


Ok, got it. thank you:)

BR,
Bo



--
WBR, wRAR





Re: quilt patch (hunk ignored)

2022-05-19 Thread Andrey Rahmatullin
On Thu, May 19, 2022 at 07:17:11PM +0800, Bo YU wrote:
> > > But if use the same way to apply patch into d/*, sometime it will get:
> > Patches shouldn't patch files in debian/. Edit the files directly.
> 
> 
> Understood it. here is SO[0] to hint it.
> 
> But this is inconvenient:
*shrug*

> * if to modify many files in d/* or code snip and want to keep a clean status
>  to watch different parts on many times modify. 
Not sure what does this mean but it's possible that a VCS can help here.

> * send these modify to the package's maintainer
You should send a debdiff, not a patch from debian/patches/.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: quilt patch (hunk ignored)

2022-05-19 Thread Bo YU

Hi wRAR,
On Thu, May 19, 2022 at 04:00:40PM +0500, Andrey Rahmatullin wrote:

On Thu, May 19, 2022 at 06:57:27PM +0800, Bo YU wrote:

Hi,

I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
the patch file be applied out of debian/*.:

// for people who if need it
*quilt push -a
* quilt new fix-issue.patch
* quilt add source-code-file(out of the d/*)
* quilt refresh
* quilt header -e
* quilt pop -a

But if use the same way to apply patch into d/*, sometime it will get:

Patches shouldn't patch files in debian/. Edit the files directly.



Understood it. here is SO[0] to hint it.

But this is inconvenient:
* if to modify many files in d/* or code snip and want to keep a clean status
 to watch different parts on many times modify. 
* send these modify to the package's maintainer

Thank you~

BR,
Bo

[0]: 
https://stackoverflow.com/questions/29634868/adding-a-file-in-a-quilt-dquilt-patch-patch-applies-correctly-by-hand-but-brea



--
WBR, wRAR





Re: quilt patch (hunk ignored)

2022-05-19 Thread Andrey Rahmatullin
On Thu, May 19, 2022 at 06:57:27PM +0800, Bo YU wrote:
> Hi,
> 
> I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
> the patch file be applied out of debian/*.:
> 
> // for people who if need it
> *quilt push -a
> * quilt new fix-issue.patch
> * quilt add source-code-file(out of the d/*)
> * quilt refresh
> * quilt header -e
> * quilt pop -a
> 
> But if use the same way to apply patch into d/*, sometime it will get:
Patches shouldn't patch files in debian/. Edit the files directly.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


quilt patch (hunk ignored)

2022-05-19 Thread Bo YU

Hi,

I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
the patch file be applied out of debian/*.:

// for people who if need it
*quilt push -a
* quilt new fix-issue.patch
* quilt add source-code-file(out of the d/*)
* quilt refresh
* quilt header -e
* quilt pop -a

But if use the same way to apply patch into d/*, sometime it will get:
```
vimer@unmatched-local:~/ sudo sbuild -c sid-riscv64-sbuild --no-clean-source
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building waypipe using existing ./waypipe_0.8.2.orig.tar.gz
dpkg-source: info: using patch list from debian/patches/series
patching file debian/rules
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'fix-ftbfs-riscv64.patch' is correctly applied by 
quilt, use 'quilt refresh' to update it
dpkg-source: info: if the file is present in the unpacked source, make sure it 
is also present in the orig tarball
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B 
.pc/fix-ftbfs-riscv64.patch/ --reject-file=- < 
waypipe-0.8.2.orig.J2h0OD/debian/patches/fix-ftbfs-riscv64.patch subprocess 
returned exit status 1
```

I suspect the sbuild has switch can control it but i do not find it.

I can apply the such patches like:
```
patch -p1 < ~/Fix_ftbfs.patch
patching file debian/rules
```
But imagine if one patch will contain two files to modfy: one file is d/rules 
and the other is CMakelist.txt. This is common usage to fix something, how did it?


Thank you,
Bo

[0]: 
https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/
[1]: https://wiki.debian.org/UsingQuilt