Re: Writing get-orig-source targets to conform with policy
On Monday 18 February 2008 7:01:35 am Gerfried Fuchs wrote:
> * Andres Mejia <firstname.lastname@example.org> [2008-02-17 05:10:01 CET]:
> > I have two questions. First question is;
> > Is it at all possible to write a get-orig-source target that calls an
> > external script to handle generating the orig tarball?
> Why shouldn't it?
> > The problem I'm facing is when the get-orig-source target is written
> > like: get-orig-source:
> > debian/external-script
> > It works fine under the package's top directory, but fails under any
> > other directory, for instance, /tmp.
> Why does it fail there? It just make's no sense... But hmm, well, what
> do you mean with /tmp? You can't call from /tmp any debian/rules in any
> other directory than in the current one, dh_testdir is always applied.
I meant leaving the package top directory residing somewhere (like
$HOME/package_dir), and calling the rules script from any directory,
like /tmp. In other words, from /tmp I should
run "$HOME/package_dir/debian/rules get-orig-source" and the tarball is
generated in /tmp. The policy states that the get-orig-source target may be
called from any directory. Also, dh_testdir is only applied when you call it
in a specific target. The example I gave doesn't use dh_testdir.