Hello,

the test setup.test started failing in the build of the debian package.
This was due to the fact that quilt looks up parent directories for
.pc/.quilt_patches and finds the .pc used by the debian source package and
thus sets QUILT_PATCHES to debian/patches instead of patches that the test
expects.

Now, given the role of "quilt setup" wouldn't it make sense to hardcode
the locations of the series and patches directories in quilt setup ?
I would think so and I attach the corresponding patch.

If not, then please modify test/setup.test to hardcode the location
of the patches directory (second patch attached).

Cheers,
-- 
Raphaƫl Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/
quilt setup really wants to create the default quilt directories
and not those that might have been autodetected by looking up parent
directories. So instead of using $QUILT_PATCHES and $QUILT_SERIES,
we hardcode "patches" and "series".

Bug-Debian: http://bugs.debian.org/573689

diff --git a/quilt/setup.in b/quilt/setup.in
index 75e7bf9..d07b40d 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -26,16 +26,16 @@ check_for_existing_files() {
        local dir status=0
        for dir in $(awk ' $1 == "patch" { print $2 }' $tmpfile | uniq)
        do
-               if [ -e "$prefix$dir/$QUILT_PATCHES" ]
+               if [ -e "$prefix$dir/patches" ]
                then
                        printf $"Directory %s exists\n" \
-                              "$prefix$dir/$QUILT_PATCHES" >&2
+                              "$prefix$dir/patches" >&2
                        status=1
                fi
-               if [ -e "$prefix$dir/$QUILT_SERIES" ]
+               if [ -e "$prefix$dir/series" ]
                then
                        printf $"File %s exists\n" \
-                              "$prefix$dir/$QUILT_SERIES" >&2
+                              "$prefix$dir/series" >&2
                        status=1
                fi
        done
@@ -200,15 +200,15 @@ do
                tar_file="$arg1"
                ;;
        patch)
-               [ -e "$prefix$dir/$QUILT_PATCHES" ] \
-               || create_symlink "$sourcedir" "$prefix$dir/$QUILT_PATCHES"
+               [ -e "$prefix$dir/patches" ] \
+               || create_symlink "$sourcedir" "$prefix$dir/patches"
                if [ -n "$series_file" ]
                then
-                       [ -e "$prefix$dir/$QUILT_SERIES" ] \
+                       [ -e "$prefix$dir/series" ] \
                        || create_symlink "$series_file" \
-                                         "$prefix$dir/$QUILT_SERIES"
+                                         "$prefix$dir/series"
                else
-                       if ! [ -e "$prefix$dir/$QUILT_SERIES" ]
+                       if ! [ -e "$prefix$dir/series" ]
                        then
                                (       echo "# Patch series file for quilt," \
                                             "created by ${0##*/}"
@@ -218,9 +218,9 @@ do
                                                && echo "# Source: $tar_file"
                                        echo "# Patchdir: $dir"
                                        echo "#"
-                               ) > "$prefix$dir/$QUILT_SERIES"
+                               ) > "$prefix$dir/series"
                        fi
-                       echo "$arg1" $arg2 >> "$prefix$dir/$QUILT_SERIES"
+                       echo "$arg1" $arg2 >> "$prefix$dir/series"
                fi
                ;;
        esac
Subject: avoid test failure in setup.test by hardcoding QUILT_PATCHES

Without this patch, quilt setup would try to use debian/patches instead
of patches and would fail. This is because quilt now initializes
QUILT_PATCHES by looking up parent directories and it would find
.pc/.quilt_patches of the debian source package.

The right upstream fix is probably to hardcode the location in quilt setup
but until that is approved, this fix is less intrusive and doesn't change
the behaviour of quilt setup.

Bug-Debian: http://bugs.debian.org/573689

diff --git a/test/setup.test b/test/setup.test
index e1744c7..3ba1b65 100644
--- a/test/setup.test
+++ b/test/setup.test
@@ -1,3 +1,4 @@
+$ export QUILT_PATCHES=patches
 $ rm -rf d
 $ mkdir -p d/dir
 $ cd d
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to