Package: tla
Version: 1.3.3-3
Severity: normal
Tags: patch

(This is upstream bug #15286.)

tla register-archive sftp://arch.debian.org/arch/pkg-horde/2006/
tla abrowse -A [EMAIL PROTECTED] mnemo

Output:

[EMAIL PROTECTED]
mnemo
mnemo--sid
mnemo--sid--1
base-0 .. patch-6

mnemo--sid--2
base-0 .. patch-4

mnemo--sid
mnemo--sid--1
base-0 .. patch-6

mnemo--sid--2
base-0 .. patch-4

mnemo--upstream
mnemo--upstream--1
base-0 .. patch-2

mnemo--upstream--2
base-0 .. patch-1

mnemo--upstream
mnemo--upstream--1
base-0 .. patch-2

mnemo--upstream--2
base-0 .. patch-1

mnemo
mnemo--sid
mnemo--sid--1
base-0 .. patch-6

mnemo--sid--2
base-0 .. patch-4

mnemo--sid
mnemo--sid--1
base-0 .. patch-6

mnemo--sid--2
base-0 .. patch-4

mnemo--upstream
mnemo--upstream--1
base-0 .. patch-2

mnemo--upstream--2
base-0 .. patch-1

mnemo--upstream
mnemo--upstream--1
base-0 .. patch-2

mnemo--upstream--2
base-0 .. patch-1

Notice that the category is listed twice, in each category each branch
is listed twice.

Accessing the same archive over
http://arch.debian.org/arch/pkg-horde/2006/, everything works well.

You will see the same bug by running a (backported) tla on costa
itself and direct filesystem access.

This archive is in baz format, the default in this version of tla.


The reason for the bug is quite simple: In function pfs_baz_search (in
src/tla/libarch/archive-pfs.c), the directory list is created in the
list the OS/sftp gives it to us, so not necessarily sorted. But
rel_uniq_by_field supposes that this list is *sorted* (it removes only
consecutives duplicates). So the list has to be explicitly sorted
before being passed to rel_uniq_by_field. (Note that the uniquified
list will be sorted *again* higher up in the call trace, by
arch_archive_categories in archive.c . Maybe that later sort can be
removed, maybe not. I'm not familiar enough with the code.)

This also explains why this didn't happen with http access: the
.listing file is kept in sorted order!


A changeset fixing this is attached.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-1-686
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)

Versions of packages tla depends on:
ii  diff                       2.8.1-11      File comparison utilities
ii  gawk                       1:3.1.5-1     GNU awk, a pattern scanning and pr
ii  libc6                      2.3.5-9       GNU C Library: Shared libraries an
ii  libneon24                  0.24.7.dfsg-3 An HTTP and WebDAV client library
ii  patch                      2.5.9-2       Apply a diff file to an original

tla recommends no packages.

-- no debconf information

Attachment: ,,double-browse.tar.gz
Description: Binary data

Reply via email to