tags 403849 + patch thanks Hi,
Attached is the diff for my bazaar 1.4.2-5.3 NMU, currently in DELAYED/5-day.
diff -u bazaar-1.4.2/debian/patches/06_neon26.dpatch bazaar-1.4.2/debian/patches/06_neon26.dpatch --- bazaar-1.4.2/debian/patches/06_neon26.dpatch +++ bazaar-1.4.2/debian/patches/06_neon26.dpatch @@ -1,13 +1,98 @@ #! /bin/sh /usr/share/dpatch/dpatch-run ## 06_neon26.dpatch by Clint Adams <[EMAIL PROTECTED]> +## Updated by Steinar H. Gunderson <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ +diff -urNad bazaar-1.4.2~/src/baz/libarch/pfs-dav.c bazaar-1.4.2/src/baz/libarch/pfs-dav.c +--- bazaar-1.4.2~/src/baz/libarch/pfs-dav.c 2006-12-22 13:57:17.000000000 +0100 ++++ bazaar-1.4.2/src/baz/libarch/pfs-dav.c 2006-12-22 13:58:41.000000000 +0100 +@@ -97,13 +97,13 @@ + static int dav_is_dir (struct arch_pfs_dav_session * pfs, char * dir); + static int pfs_rmdir (struct arch_pfs_session * p, t_uchar * path, int soft_errors); + static int pfs_rm (struct arch_pfs_session * p, t_uchar * path, int soft_errors); +-static void dav_is_dir_results (void * userdata, const char * uri, const ne_prop_result_set * set); ++static void dav_is_dir_results (void * userdata, const ne_uri * uri, const ne_prop_result_set * set); + static int dav_client_cwd (struct arch_pfs_dav_session * pfs, t_uchar * path, int soft_errors); + static int dav_client_auth (void * userdata, const char * realm, int attempt, + char * username, char * password); + static t_uchar * abs_path (t_uchar * cwd, t_uchar * path); + static t_uchar * dirfold (t_uchar *dir); +-static void results (void * userdata, const char * uri, const ne_prop_result_set * set); ++static void results (void * userdata, const ne_uri * uri, const ne_prop_result_set * set); + + + +@@ -815,19 +815,23 @@ + + + static void +-dav_is_dir_results (void * userdata, const char * uri, const ne_prop_result_set * set) ++dav_is_dir_results (void * userdata, const ne_uri * uri, const ne_prop_result_set * set) + { + struct dav_is_dir_ls_data * data = (struct dav_is_dir_ls_data *)userdata; + int len; + ++ char *textual_uri = ne_uri_unparse(uri); ++ + len = str_length (data->uri); +- if (!str_cmp_n (uri, len, data->uri, len)) ++ if (!str_cmp_n (textual_uri, len, data->uri, len)) + { +- if (uri[str_length (uri) - 1] == '/') ++ if (textual_uri[str_length (textual_uri) - 1] == '/') + data->is_dir = 1; + else + data->is_dir = 0; + } ++ ++ free(textual_uri); + } + + static int +@@ -998,21 +1002,24 @@ + } + + static void +-results (void * userdata, const char * uri, const ne_prop_result_set * set) ++results (void * userdata, const ne_uri * uri, const ne_prop_result_set * set) + { + int n; + char * file, * tmp; + struct ls_data * data = userdata; ++ char * textual_uri = ne_uri_unparse(uri); + +- if (str_cmp (data->uri, uri)) ++ if (str_cmp (data->uri, textual_uri)) + { +- if (1 == (n = str_length (uri))) ++ if (1 == (n = str_length (textual_uri))) { ++ free(textual_uri); + return; ++ } + +- if (uri[n - 1] == '/') ++ if (textual_uri[n - 1] == '/') + n--; + +- file = str_chr_rindex_n (uri, n, '/') + 1; ++ file = str_chr_rindex_n (textual_uri, n, '/') + 1; + + n = str_length (file); + if (file[n - 1] == '/') +@@ -1025,6 +1032,7 @@ + data->files = str_realloc_cat_many (0, data->files, tmp, "\r\n", str_end); + free (tmp); + } ++ free(textual_uri); + } + + diff -urNad bazaar-1.4.2~/src/baz/libarch/pfs-sftp.c bazaar-1.4.2/src/baz/libarch/pfs-sftp.c ---- bazaar-1.4.2~/src/baz/libarch/pfs-sftp.c 2005-06-20 17:59:37.000000000 -0400 -+++ bazaar-1.4.2/src/baz/libarch/pfs-sftp.c 2006-12-01 12:58:08.516166732 -0500 +--- bazaar-1.4.2~/src/baz/libarch/pfs-sftp.c 2006-12-22 13:57:17.000000000 +0100 ++++ bazaar-1.4.2/src/baz/libarch/pfs-sftp.c 2006-12-22 13:58:17.000000000 +0100 @@ -1496,7 +1496,7 @@ */ arch_uri_heuristics (&parsed_uri); @@ -18,8 +103,8 @@ if (parsed_uri.port) { diff -urNad bazaar-1.4.2~/src/baz/libarch/pfs.c bazaar-1.4.2/src/baz/libarch/pfs.c ---- bazaar-1.4.2~/src/baz/libarch/pfs.c 2006-12-01 12:57:57.022973848 -0500 -+++ bazaar-1.4.2/src/baz/libarch/pfs.c 2006-12-01 12:58:08.520167147 -0500 +--- bazaar-1.4.2~/src/baz/libarch/pfs.c 2006-12-22 13:58:04.000000000 +0100 ++++ bazaar-1.4.2/src/baz/libarch/pfs.c 2006-12-22 13:58:17.000000000 +0100 @@ -514,10 +514,10 @@ char *at_pos = str_chr_index (parsed_uri->host, '@'); if (!at_pos) @@ -36,8 +121,8 @@ } diff -urNad bazaar-1.4.2~/src/baz/libarch/tests/unit-sftp.c bazaar-1.4.2/src/baz/libarch/tests/unit-sftp.c ---- bazaar-1.4.2~/src/baz/libarch/tests/unit-sftp.c 2005-06-20 17:59:37.000000000 -0400 -+++ bazaar-1.4.2/src/baz/libarch/tests/unit-sftp.c 2006-12-01 13:00:00.271764380 -0500 +--- bazaar-1.4.2~/src/baz/libarch/tests/unit-sftp.c 2006-12-22 13:57:17.000000000 +0100 ++++ bazaar-1.4.2/src/baz/libarch/tests/unit-sftp.c 2006-12-22 13:58:17.000000000 +0100 @@ -35,7 +35,7 @@ char *host; unsigned int port; diff -u bazaar-1.4.2/debian/changelog bazaar-1.4.2/debian/changelog --- bazaar-1.4.2/debian/changelog +++ bazaar-1.4.2/debian/changelog @@ -1,3 +1,16 @@ +bazaar (1.4.2-5.3) unstable; urgency=high + + * Non-maintainer upload. + * Update 06_neon26.dpatch to work around an API change that was missed + earlier; the WebDAV functions no longer give back a char *, but rather an + ne_uri *, which is a struct. In the two relevant callback functions, the + patch now uses ne_uri_unparse() to convert this struct back to a char * + before processing it; it's not the prettiest way, but it works well, and + stops segfaulting on "baz ancestry-graph" (used in bzr baz-import-branch), + among others. (Closes: #403849) + + -- Steinar H. Gunderson <[EMAIL PROTECTED]> Fri, 22 Dec 2006 14:09:33 +0100 + bazaar (1.4.2-5.2) unstable; urgency=high * NMU