On 07/06/11 14:16, Vincent Danjean wrote: > On 07/06/2011 14:36, Osamu Aoki wrote: >> On Tue, Jun 07, 2011 at 12:54:23PM +0200, Vincent Danjean wrote: >>> On 05/06/2011 07:39, Vincent Bernat wrote: >>>> On Sat, 4 Jun 2011 21:54:11 +0200, Jonas Smedegaard wrote: >>>> >>>>> What I do is use upstream provided tarballs, then put aside >>>>> autotools-generated files, then autogenerate myself, and in the clean >>>>> rule put back the upstream-provided files (because I want not only >>>>> minimal required build routines idempotent but also building with >>>>> git-buildpackage). >>>> >>>> In the clean rules, you can just delete those autogenerated files. >>> >>> If you do not want git-buildpackage to complain (of >>> "not committed changes"), you need to restore them. >>> >>> I often use this in my rules: >>> clean: >>> [...] >>> # if this is a git repository, restore removed files that would have >>> # been ignored by dpkg-source >>> -test -d .git && git checkout -- $$(git status | \ >>> sed -e >>> '/^#[[:space:]]*deleted:[[:space:]]*/s/^#[[:space:]]*deleted:[[:space:]]*//p;d' >>> | \ >>> grep -v '^debian/') >> >> I thought "git reset --hard; git clean -f" is enough to get pristine >> state under git for manual operation. I am curious why this is done >> with this fancy script? Maybe this is something to do with >> git-buildpackage which I should know. > > I do not want to do a reset if some files are modified/added and not > commited (the standard behavior of git-buildpackage, ie complaining, is > ok for me in this case). > I only want that git-buildpackage ignores missing files as dpkg-source > does. It is also a quick a dirty script and I would be very pleased > to know a better way to do this. > > Regards, > Vincent > >> (I was thinking , as long as git reflect pristine source situation, this >> shorter type-able sequence restores source tree for me. If inside >> debian tree should not be recorded in git, we can add .gitignore with >> debian in it.) >> >> >> Osamu >> >> > >
Two possibilities : You could use the --filter option to git-import-orig to prevent the files from being imported into git in the first place, I do this to filter out the upstream debian directory. If you're using pristine-tar the excluded files still get included as part of its delta so created tarballs will still be byte-for-byte identical to upstream. Alternatively you could just build in a different directory using the --export-dir option. Cheers, David. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/isokcc$iak$1...@dough.gmane.org