Re: Quilt bug or needs repackaging?
Andreas Tille <andreas@an3as.eu> writes:
> $ quilt push
> Applying patch fix-makefile.patch
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |--- a/SAINT_v2.3.3/Makefile
> |+++ b/SAINT_v2.3.3/Makefile
> --------------------------
> No file to patch. Skipping patch.
> 1 out of 1 hunk ignored
> Patch fix-makefile.patch does not apply (enforce with -f)
This would need to be done in a directory that has SAINT_v2.3.3 as a
subdirectory.
> I simply created the patch using
> quilt new fix-makefile.patch
> quilt edit Makefile
> and endet up with the patch I posted. I also think that it is actually
> a -p1 patch - things just get complicated by the fact that the orig
> tarball contains two directories in its root (__MACOSX).
Ah, sorry, I should have put more of the pieces together, but I didn't
entirely understand the terminology you were using. I've got it now.
You were thinking of the SAINT_v2.3.3 directory as the source directory,
but that's not how dpkg-source works. Unless all files in the tarball are
in a single directory, dpkg-source synthesizes a parent directory to hold
the files, to deal with upstream tarballs where upstream did:
tar cf foo.tar .
or some equivalent. So dpkg-source treats this tarball the same as a
tarball containing:
saint-2.3.3/SAINT_v2.3.3
saint-2.3.3/__MACOSX
This actually has nothing to do with different treatment of quilt patches.
I had missed that you had not done the same when you unpacked the tarball.
> Thanks for the clarification why quilt and dpkg-buildpackage might
> behave differently - but for the moment I do not yet see a better
> solution than repackaging (which I have no problems with and perhaps I'm
> even able to teach upstream - just wanted to understand the issue
> completely).
You don't need to repackage; you would just need to stop treating
SAINT_v2.3.3 as if it were the top level of the upstream tarball, since
dpkg-source doesn't agree with that. If you make the debian directory at
the same level as SAINT_v2.3.3 and __MACOSX, everything, including quilt,
will work (although of course you'll have to change the packaging to
actually work in the SAINT_v2.3.3 directory).
But repackaging may be easier, depending on what the build system is like.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: