[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] [BUG] tla grab fails if the target archive is not yet r
From: |
conrad |
Subject: |
[Gnu-arch-users] [BUG] tla grab fails if the target archive is not yet registered |
Date: |
Fri, 27 Aug 2004 14:40:55 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi,
"tla grab" fails without an error message if "Archive-Name" has not yet
been registered. I suppose the expected behaviour would be that it does
register the archive.
I've verified the bug with the official tla-1.2 and tla-1.2.1 releases.
Test case:
address@hidden:/tmp> mkdir test
address@hidden:/tmp> cd test
address@hidden:/tmp/test> HOME=`pwd` tla grab
http://www.unix-ag.uni-kl.de/~conrad/greylisting/releases--0.1
archive not registered: address@hidden
(see register-archive)
Grabbing:
address@hidden/http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden
Source: http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden, Dest:
greylisting-spp--releases--0.1
address@hidden:/tmp/test> ls -alR
.:
insgesamt 3
drwxr-xr-x 2 conrad users 48 2004-08-27 14:27
,,grab.greylisting-spp--releases--0.1.1093609651.3011.2
drwxr-xr-x 3 conrad users 120 2004-08-27 14:27 .
drwxrwxrwt 20 root root 1800 2004-08-27 14:27 ..
./,,grab.greylisting-spp--releases--0.1.1093609651.3011.2:
insgesamt 1
drwxr-xr-x 2 conrad users 48 2004-08-27 14:27 .
drwxr-xr-x 3 conrad users 120 2004-08-27 14:27 ..
address@hidden:/tmp/test> # failed, obviously
address@hidden:/tmp/test> cd ..
address@hidden:/tmp> rm -rf test
address@hidden:/tmp>
This works:
address@hidden:/tmp> mkdir test
address@hidden:/tmp> cd test
address@hidden:/tmp/test> HOME=`pwd` tla register-archive address@hidden
http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden
address@hidden:/tmp/test> HOME=`pwd` tla grab
http://www.unix-ag.uni-kl.de/~conrad/greylisting/releases--0.1
Grabbing:
address@hidden/http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden
Source: http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden, Dest:
greylisting-spp--releases--0.1
* from archive cached: address@hidden/greylisting-spp--releases--0.1--base-0
* patching for revision: address@hidden/greylisting-spp--releases--0.1--patch-1
[...]
* patching for revision: address@hidden/greylisting-spp--releases--0.1--patch-7
address@hidden:/tmp/test> ls -al
insgesamt 4
drwxr-xr-x 4 conrad users 128 2004-08-27 14:35 .
drwxrwxrwt 20 root root 1800 2004-08-27 14:35 ..
drwx------ 3 conrad users 80 2004-08-27 14:34 .arch-params
drwxr-xr-x 6 conrad users 240 2004-08-27 14:35
greylisting-spp--releases--0.1
address@hidden:/tmp/test> # expected result
address@hidden:/tmp/test> cd ..
address@hidden:/tmp> rm -rf test
address@hidden:/tmp>
Looking at the source of libarch/cmd-grab.c this seems to be easy to fix:
[...]
> /********************
> * Time to grab the archive
> */
> final_revision = find_latest_revision (archive_name, target_revision);
> arch_set_archive_location(archive_name, archive_location, 0,
> ARCH_REG_FAIL_QUIET);
>
> archive = arch_archive_connect (archive_name, 0);
[...]
find_latest_revision is called before the archive has been registered!
Swapping the two lines (find_latest_revision and arch_set_archive_location)
seems to solve the problem, see the attached patch.
Bye,
Peter
--
Peter Conrad | According to Dave Barry the word "politics" derives
Friedensallee 152 | from the Greek "poly" meaning many, and "ticks"
63263 Neu-Isenburg| meaning small disgusting bloodsucking parasites.
Germany
email: address@hidden / WWW: http://www.unix-ag.uni-kl.de/~conrad
tla-1.2.1-grabfix.patch
Description: Text document
[Gnu-arch-users] [BUG] tla grab fails if the target archive is not yet registered,
conrad <=