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

Re: diff.gz contains more than just debian directory



On Thu, Sep 22, 2005 at 08:51:44PM +0200, Vedran Fura? wrote:
> Is it OK to have more than debian directory (and files under it) in
> package_version-rev.diff.gz? I have a lot of other diffs outside debian/
> (in aclocal.m4, Makefile.in,...). The problem is that after I run
> ./configure and then make distclean, I don't have the same directory (as
> it was before ./configure). Can I ignore this?
It is a nice property to have that the .diff.gz modifies (well,
creates) only files in ./debian/.  However, it is not a necessary
property.  It is perfectly acceptable to have it modify (or create)
some files provided upstream.

If you use dpatch, or a similar patch management system, then you
should, of course, keep all the patches in ./debian/patches, and then
the diff is restricted to ./debian/ (because the clean rule, invoked
before creating the .diff by dpkg-buildpackage, unpatches everything
to restore it to pristine state).

The relevent section is policy 4.8:

     `clean'
          This must undo any effects that the `build' and `binary' targets
          may have had, except that it should leave alone any output files
          created in the parent directory by a run of a `binary' target.

Actually, the accepted interpretation of the intent of this is just
that it must be possible to build a package multiple times, an d end
up with a functionally equivalent package.  So, for example, the
following in the build: target would be bad:

  sed -n '2p' foo >foo2; mv foo2 foo;

Because it will cause foo to have different contents during the second
build than during the first build.

The more thorough the clean target is, the better, though.

-- 
Clear skies,
Justin



Reply to: