[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to patch a file with changing path?



Hi Christian,

On Mon, Jun 27, 2011 at 06:56:02PM +0200, Christian Welzel wrote:
> currently i'm trying to package the new alpha of typo3, but there is a
> problem: the new upstream tar.gz contains the core of typo3 file in
> a directory that has the version in its name
> (eg: [/]typo3_src-4.6.0alpha2/t3lib/GPL.txt). There are also some
> symlinks into this directory "tslib -> typo3_src-4.6.0alpha2/t3lib".
> So if i want to patch GPL.txt, i cannot patch trough the symlink
> as quilt wont let me, but i do not want to change all patches every
> release to adjust the path of the files...

interesting problem. ;-)

> I'm not sure, how to handle this and need counsel.
> 
> There is also a zip available, that does not contain either symlinks
> or versioned directories, but i cannot use zip as upstream package.
> 
> I use 3.0(quilt) format.

As I see things you've got 3 options:
- talk to upstream and make them release a tarball without that versioned
  dir

- introduce a sed line (or perl/python/whatever) in the clean target using a
  fancy regexp on debian/patches/... and fixing the path according to the
  version number of your deb or even better with a path that you just found
  via e.g. "ls -1"

- Why you can't use the zip I don't see. You can easily repack and note that
  in README.source. Use the get-orig-source target in debian/rules for that
  and possibly use a ~debian version number. The ~debian is not neccessary
  though IMHO in this case.

-- 
Best regards,
Kilian

Attachment: signature.asc
Description: Digital signature


Reply to: