On Mon, Dec 30, 2013 at 08:57:46AM +0100, Raphael Hertzog wrote: > On Sun, 29 Dec 2013, Martin Quinson wrote: > > I checked a bit more, and the documentation is a bit misleading here > > as the order of a find is used when --sort is not provided. So this is > > not the patch order at all. > > So this is the thing to fix as the order of find might differ when > you generate the patch on one system and refresh it on another and thus > you might introduce useless noise in a VCS.
********* * TL;DR * ********* I think that this bug cannot happen with our codebase. I need a test case that I can play with. In lack of this, I blame dpkg for the behavior you saw, not quilt. * long version * **************** I digged a bit further, and I think I misunderstood the code the first time: the documentation seem right. Here is how the list of files is generated in quilt/refresh: ------------->8--------------------->8--------- if [ -z "$opt_sort" ] then files=( $(files_in_patch_ordered $patch) ) else files=( $(files_in_patch $patch | sort) ) fi -------------8<---------------------8<-------- If you pass the --sort argument, then the result of the find (as computed by the function files_in_patch) is sorted. If not ("$opt_sort" is empty), then the function files_in_patch_ordered() does the following: ------------->8--------------------->8--------- ( files_in_patch $patch | sort echo "-" filenames_in_patch $patch ) | awk ' $1 == "-" { out=1 ; next } !out { files[$0]=1 new_files[++n]=$0 } out { if ($0 in files && !($0 in printed)) { print $0 printed[$0]=1 } } END { for (i=1; i<=n; i++) if (!(new_files[i] in printed)) print new_files[i] } ' -------------8<---------------------8<-------- filenames_in_patch() gets all the filenames that are present in the patch file. At the end of the day, the previous chunk gets all modified files (as found by find in files_in_patch), and then prints them in the patch order (as found by filenames_in_patch) if they are present, and in the sort order if they are new. Q.E.D.: This bug cannot happen with quilt. Are you sure that your patch got regenerated by quilt and not another debian-related program that mimicks its behavior? I think that this is what that dpkg commit induces: http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commit;h=2cb257105366f933a3b9e5ea2647033da12b07f3 Bye, Mt. -- If you're not paying for something, you're not the customer. You're the product being sold. --- Andrew Lewis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org