mc patch system

Brian Murray brian at ubuntu.com
Tue Apr 14 18:23:32 BST 2009


On Mon, Apr 13, 2009 at 08:53:33PM +0000, Chow Loong Jin wrote:
> On Mon, 2009-04-13 at 13:16 -0700, Brian Murray wrote:
> > On Mon, Apr 13, 2009 at 09:59:54PM +0200, Emilio Pozuelo Monfort wrote:
> > > Brian Murray wrote:
> > > > I've recently been looking at bugs with patches and ran across
> > > > http://launchpad.net/bugs/333835 which seemed easy enough to incorporate
> > > > and a worthwhile fix for Jaunty.  However, I ran into a problem trying
> > > > to get the existing patches in mc to apply and adding that particular
> > > > patch.  Is anyone familiar with how the patch system in mc works?
> > > 
> > > I haven't looked at it, but it build-depends on quilt so I guess it uses it.
> > > Here's a small howto:
> > > 
> > > http://pkg-perl.alioth.debian.org/howto/quilt.html
> > 
> > Maybe I should have elaborated a bit more.  While it uses quilt
> > executing 'quilt push -a' fails with the message 'No patches in series'.
> > Additionally, the structure of the debian/patches directory seemed a bit
> > odd to me:
> > 
> > all.series        bugs    mc.ext  README  utf8
> > autgen-run.patch  debian  po      syntax  vfs
> > 
> I've just read through the debian/rules file, and found this rule:
> ---8<---
> apply-patches: pre-build debian/stamp-patched
> debian/stamp-patched: $(DEB_PATCHES)
> debian/stamp-patched reverse-patches:
>         @echo "patches: $(DEB_PATCHES)"
>         @set -e ; \
>           if [ ! "$@" = "reverse-patches" ]; then \
>             ln -s debian/patches/all.series series;\
>                 ln -s debian/patches/ patches; \
>                 $(QUILT) --quiltrc /dev/null push -a; \
>           else \
>                 $(QUILT) --quiltrc /dev/null  pop -a || true \
>                 rm -f series patches; \
>                 rm -rf .pc; \
>           fi; \
>         if [ "$@" = "debian/stamp-patched" ]; then touch debian/stamp-patched; fi
> --->8---
> 
> Specifically, what you want to look at is that it links
> debian/patches/all.series to ./series, and debian/patches to ./patches.
> Hence you can't use the usual export QUILT_PATCHES=debian/patches way. 
> 
> You'll have to set QUILT_PATCHES=patches, and make the appropriate
> links:
> ---8<---
> ln -s debian/patches patches
> ln -s debian/patches/all.series ./series
> export QUILT_PATCHES=patches
> --->8---
> 
> Then just use quilt as usual. When you're done:
> ---8<---
> quilt pop -a
> rm -rf patches series .pc
> --->8---

That worked like a charm, thanks for the assistance!

-- 
Brian Murray                                                 @ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-motu/attachments/20090414/87bc8897/attachment.pgp 


More information about the Ubuntu-motu mailing list