Package: maint-guide Version: 1.2.25 Followup-For: Bug #626565
Hi Osamu, I'm thekittster on IRC, as Mark mentioned I confirmed this behaviour, not on an Ubuntu system but on a Debian system. (Testing mostly, but quilt is 0.48-7.) I'm attaching the script output obtained by running the sequence of commands you suggested. As you can see, the [ -e ~/.quiltrc-dpkg ] test fails, even though the file does exist. Sourcing ~/.quiltrc-dpkg works: heffalump[1000] 1 $ cd boo heffalump[boo] 2 $ . ~/.quiltrc-dpkg heffalump[boo] 3 $ echo $QUILT_PATCHES debian/patches I haven't been able to determine what's going wrong, but feel free to ask for any further information you might need. Regards, Stephen -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (200, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.38-2-686-bigmem (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash maint-guide depends on no packages. maint-guide recommends no packages. Versions of packages maint-guide suggests: ii debian-policy 3.9.2.0 Debian Policy Manual and related d ii developers-reference 3.4.4 guidelines and information for Deb ii devscripts 2.10.72 scripts to make the life of a Debi ii dh-make 0.58 tool that converts source archives ii doc-base 0.10.1 utilities to manage online documen ii dput 0.9.6.2 Debian package upload tool ii dupload 2.7.0 utility to upload Debian packages ii fakeroot 1.15.1-1 tool for simulating superuser priv ii lintian 2.5.0 Debian package checker ii pbuilder 0.199+nmu3 personal package builder for Debia ii quilt 0.48-7 Tool to work with series of patche -- no debconf information
Script started, file is 626565.trace steve@heffalump:~% bash heffalump[~] 1 $ alias dquilt="quilt --quiltrc=~/.quiltrc-dpkg" heffalump[~] 2 $ cat ~/.quiltrc-dpkg d=. ; while [ ! -d $d/debian -a $(readlink -e $d) != / ]; do d=$d/..; done if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then # if in Debian packaging tree with unset $QUILT_PATCHES QUILT_PATCHES="debian/patches" QUILT_PATCH_OPTS="--reject-format=unified" QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto" QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi fi heffalump[~] 3 $ cd $TMP heffalump[1000] 4 $ rm -rf .pc debian patches boo heffalump[1000] 5 $ mkdir -p boo/debian; cd boo heffalump[boo] 6 $ mkdir -p debian/patches heffalump[boo] 7 $ touch foo heffalump[boo] 8 $ dquilt new p1 Patch p1 is now on top heffalump[boo] 9 $ dquilt add foo File foo added to patch p1 heffalump[boo] 10 $ echo "AAAAAAAAA" >foo heffalump[boo] 11 $ dquilt refresh Refreshed patch p1 heffalump[boo] 12 $ cat debian/patches/p1 cat: debian/patches/p1: No such file or directory heffalump[boo] 13 $ dquilt --trace refresh + . /usr/share/quilt/refresh +++ type -t patch_file_name ++ '[' '' '!=' function ']' ++ '[' -r /usr/share/quilt/scripts/patchfns ']' ++ . /usr/share/quilt/scripts/patchfns +++ export TEXTDOMAIN=quilt +++ TEXTDOMAIN=quilt +++ export TEXTDOMAINDIR=/usr/share/locale +++ TEXTDOMAINDIR=/usr/share/locale +++ : en_GB.UTF-8 +++ : en_GB.UTF-8 +++ ORIGINAL_LANG=en_GB.UTF-8 +++ export LANG=POSIX +++ LANG=POSIX +++ export QUILT_PATCHES QUILT_PC SUBDIR SERIES DB +++ DB_VERSION=2 +++ : .pc +++ '[' -d /usr/share/quilt/compat ']' +++ export PATH=/usr/share/quilt/compat:/usr/share/quilt/compat:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/home/steve/bin:/home/steve/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games +++ PATH=/usr/share/quilt/compat:/usr/share/quilt/compat:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/usr/lib/ccache:/home/steve/bin:/home/steve/bin:/home/steve/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games +++ unset CDPATH +++ shopt -s dotglob +++ '[' -e '~/.quiltrc-dpkg' ']' +++ '[' -n refresh ']' ++++ echo refresh ++++ tr a-z A-Z +++ args=QUILT_REFRESH_ARGS +++ eval set -- '"$@"' ++++ set -- +++ unset args +++ unset SUBDIR SUBDIR_DOWN +++ '[' -d .pc -o -d patches ']' +++ '[' -r .pc/.quilt_patches ']' +++ : patches +++ '[' -r .pc/.quilt_series ']' +++ : series +++ '[' s = / -a '(' -f series -o '!' -e series ')' ']' +++ '[' -f .pc/series ']' +++ '[' -f series ']' +++ SERIES=patches/series +++ DB=.pc/applied-patches +++ '[' -z '' ']' +++ version_check +++ '[' -e .pc ']' +++ '[' -e .pc/.version ']' +++ version=2 +++ '[' 2 -gt 2 ']' +++ '[' 2 = 2 ']' +++ return 0 +++ getopt -o p:uU:cC:fz::h --long no-timestamps,diffstat,backup,sort --long no-index --long strip-trailing-whitespace -- ++ options=' --' ++ '[' 0 -ne 0 ']' ++ eval set -- ' --' +++ set -- -- ++ opt_format=-u ++ true ++ case "$1" in ++ shift ++ break ++ '[' 0 -gt 1 ']' ++ QUILT_DIFF_OPTS=' -u' +++ find_applied_patch '' +++ local name= +++ '[' -n '' ']' +++ find_top_patch +++ top_patch ++++ tail -n 1 .pc/applied-patches +++ local patch=p1 +++ '[' -n p1 ']' +++ echo p1 ++ patch=p1 ++ '[' -z '' ']' ++ files=($(files_in_patch_ordered $patch)) +++ files_in_patch_ordered p1 +++ local patch=p1 +++ 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] } ' +++ sort +++ files_in_patch p1 +++ local patch=p1 +++ local path=.pc/p1 +++ '[' -d .pc/p1 ']' +++ local files +++ files=($(find "$path" -type f -a ! -path "$path/.timestamp")) ++++ find .pc/p1 -type f -a '!' -path .pc/p1/.timestamp +++ printf '%s\n' foo +++ echo - +++ filenames_in_patch p1 +++ local patch=p1 ++++ patch_file_name p1 ++++ echo patches/p1 +++ local patch_file=patches/p1 +++ '[' -e patches/p1 ']' ++++ patch_strip_level p1 ++++ local patch=p1 i +++++ patch_args p1 +++++ local patch=p1 +++++ '[' -e patches/series ']' +++++ awk ' {sub(/(^|[ \t]+)#.*/, "") } $1 == "p1" \ { p_printed=0 for (i=2; i<=NF; i++) { print $i if ($i ~ /^-p/) p_printed=1 } if (!p_printed) print "-p1" ; exit } ' patches/series ++++ for i in '$(patch_args $patch)' ++++ case $i in ++++ echo 1 ++++ return +++ local strip=1 +++ '[' 1 = ab ']' +++ awk ' ($1 == "+++" || $1 == "---" || $1 == "***") && \ $3 != "----" && $3 != "****" \ { sub(/\t.*/, "") sub(/^... /, "") for (n=0 ; n<1; n++) sub(/^([^\/]+\/)/, "") print $0 }' patches/p1 ++ '[' -n '' -a 0 -ne 0 ']' ++ '[' -n '' ']' ++ '[' -z '' ']' +++ patch_strip_level p1 +++ local patch=p1 i ++++ patch_args p1 ++++ local patch=p1 ++++ '[' -e patches/series ']' ++++ awk ' {sub(/(^|[ \t]+)#.*/, "") } $1 == "p1" \ { p_printed=0 for (i=2; i<=NF; i++) { print $i if ($i ~ /^-p/) p_printed=1 } if (!p_printed) print "-p1" ; exit } ' patches/series +++ for i in '$(patch_args $patch)' +++ case $i in +++ echo 1 +++ return ++ opt_strip_level=1 ++ case "$opt_strip_level" in ++ num_strip_level=1 ++ trap 'die 1' SIGTERM ++ '[' -n '' ']' +++ gen_tempfile +++ local name +++ '[' '' = -d ']' +++ mktemp /tmp/user/1000/quilt_refresh.XXXXXX ++ tmp_patch=/tmp/user/1000/quilt_refresh.PS7AnQ ++ for file in '"${files[@]}"' ++ '[' -n '' ']' +++ backup_file_name p1 foo +++ local patch=p1 +++ '[' 2 -gt 1 ']' +++ echo .pc/p1/foo +++ shift +++ '[' 1 -gt 1 ']' ++ old_file=.pc/p1/foo +++ next_patch_for_file p1 foo +++ local patch=p1 file=foo ++++ patches_on_top_of p1 ++++ local patch=p1 ++++ '[' -e .pc/applied-patches ']' ++++ awk ' $0 == "p1" { seen=1 ; next } seen == 1 { print } ' .pc/applied-patches +++ local patches_on_top= +++ '[' -n '' ']' ++ next_patch= ++ '[' -z '' ']' ++ new_file=foo ++ diff_file foo .pc/p1/foo foo ++ local file=foo old_file=.pc/p1/foo new_file=foo ++ local index old_hdr old_date new_hdr new_date line ++ : 1 ++ '[' 1 = ab ']' ++ '[' 1 -eq 0 ']' +++ basename /tmp/user/1000/boo +++ local path=/tmp/user/1000/boo +++ '[' o = / ']' +++ echo boo ++ local dir=boo ++ old_hdr=boo.orig/foo ++ new_hdr=boo/foo ++ index=boo/foo ++ '[' -s .pc/p1/foo ']' ++ old_file=/dev/null ++ old_hdr=/dev/null ++ '[' -n '' ']' ++ old_date=' 1970-01-01 00:00:00.000000000 +0000' ++ '[' -s foo ']' ++ '[' -n '' ']' +++ date '+%Y-%m-%d %H:%M:%S.%N %z' -r foo ++ new_date=' 2011-05-13 22:53:44.313958418 +0200' ++ read line ++ diff -u /dev/null foo --label '/dev/null 1970-01-01 00:00:00.000000000 +0000' --label 'boo/foo 2011-05-13 22:53:44.313958418 +0200' ++ '[' -z '' ']' ++ echo 'Index: boo/foo' ++ echo =================================================================== ++ echo '--- /dev/null 1970-01-01 00:00:00.000000000 +0000' ++ cat ++ '[' -n '' -a -z '' ']' ++ '[' -n '' -a -n '' ']' ++ '[' -s /tmp/user/1000/quilt_refresh.PS7AnQ ']' ++ '[' -z '' ']' ++ /usr/share/quilt/scripts/remove-trailing-ws -n -p1 +++ patch_file_name p1 +++ echo patches/p1 ++ patch_file=patches/p1 ++ trap '' SIGINT +++ gen_tempfile +++ local name +++ '[' '' = -d ']' +++ mktemp /tmp/user/1000/quilt_refresh.XXXXXX ++ tmp_result=/tmp/user/1000/quilt_refresh.KaTssF ++ prev_patch_file=patches/p1 ++ '[' -e patches/p1 ']' ++ '[' -n '' ']' ++ cat_file patches/p1 ++ patch_header ++ local filename ++ for filename in '"$@"' ++ '[' -e patches/p1 ']' ++ case "$filename" in ++ cat patches/p1 ++ awk ' /^(---|\*\*\*|Index:)[ \t][^ \t]|^diff -/ \ { exit } { print } ' ++ cat /tmp/user/1000/quilt_refresh.PS7AnQ +++ dirname patches/p1 +++ local path=patches/p1 +++ '[' 1 = / ']' +++ local basename=p1 +++ path=patches/ +++ '[' / = / ']' +++ path=patches +++ '[' s = / ']' +++ '[' -n patches ']' +++ echo patches ++ mkdir -p patches ++ '[' -e patches/p1 ']' ++ diff -q patches/p1 /tmp/user/1000/quilt_refresh.KaTssF +++ print_patch p1 +++ echo -n p1 ++ printf 'Patch %s is unchanged\n' p1 Patch p1 is unchanged ++ rm -f .pc/p1~refresh ++ change_db_strip_level -p1 p1 ++ local level=-p1 patch=p1 ++ '[' x-p1 '!=' x-p1 ']' ++ level= ++ '[' -e patches/series ']' +++ gen_tempfile +++ local name +++ '[' '' = -d ']' +++ mktemp /tmp/user/1000/quilt_refresh.XXXXXX ++ local tmpfile=/tmp/user/1000/quilt_refresh.nvpgDY +++ quote_re p1 +++ sed -e 's:\([][?{(|)}^$/.+*\\]\):\\\1:g' +++ echo p1 ++ awk ' function remove_arg(nr, j) { for (j=nr; j<NF; j++) $j=$(j+1) NF-- } function insert_arg(nr, value, j) { for (j=NF; j>=nr; j--) $(j+1)=$j $nr=value } /^p1([ \t]|$)/ \ { p_printed=0 for (i=2; i<=NF && $i !~ /^#/; i++) { if ($i ~ /^-p/) { if ("" == "") remove_arg(i--) else $i="" p_printed=1 continue } if ($i == "-R") { remove_arg(i--) continue } } if (!p_printed && "" != "") insert_arg(2, "") } { print } ' patches/series ++ cmp patches/series /tmp/user/1000/quilt_refresh.nvpgDY ++ rm -f /tmp/user/1000/quilt_refresh.nvpgDY ++ die 0 ++ local status=0 ++ '[' -n /tmp/user/1000/quilt_refresh.PS7AnQ ']' ++ rm -f /tmp/user/1000/quilt_refresh.PS7AnQ ++ '[' -n /tmp/user/1000/quilt_refresh.KaTssF ']' ++ rm -f /tmp/user/1000/quilt_refresh.KaTssF ++ '[' -n '' ']' ++ exit 0 heffalump[boo] 14 $ cat patches/p1 Index: boo/foo =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ boo/foo 2011-05-13 22:53:44.313958418 +0200 @@ -0,0 +1 @@ +AAAAAAAAA heffalump[boo] 15 $ exit