bugGNU arch -- a revision control system - Bugs: bug #11731, "tla grab" fails if...

 
 

bug #11731: "tla grab" fails if "Archive-Name" has not yet been registered

Submitter:  Peter Conrad <pco>
Submitted:  Tue 25 Jan 2005 03:25:27 PM UTC
Votes: 1
 
Category:  tla Severity:  3 - Normal
Item Group:  bug Status:  Ready For Test
Privacy:  Public Open/Closed:  Open
Release:  1.3
Fixed Release:  1.3.5
Merge Request?:  None
Your Archive Name: 
Your Archive Location: 
Assigned to:  atai
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 06 Jan 2006 05:13:56 PM UTC, comment #3: 

patch applied, will show up in 1.3.5

Andy Tai <atai>
Group administrator
Thu 05 Jan 2006 10:54:36 AM UTC, comment #2: 

The bug is still present in 1.3.4

Peter Conrad <pco>
Mon 07 Feb 2005 11:06:03 AM UTC, comment #1: 

Seems to be fixed in 1.4pre1... and I don't know how to close this bug. :-/

Peter Conrad <pco>
Tue 25 Jan 2005 03:25:27 PM UTC, original submission:  

[this is a re-submission - it was already fixed in 1.2.2 but apparently didn't make it into 1.3]

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 [and 1.3] releases.

Test case:

address@bogus.example.com:/tmp> mkdir test
address@bogus.example.com:/tmp> cd test
address@bogus.example.com:/tmp/test> HOME=`pwd` tla grab
http://www.unix-ag.uni-kl.de/~conrad/greylisting/releases--0.1
archive not registered: -email is unavailable-
  (see register-archive)
Grabbing:
address@bogus.example.com/address@bogus.example.com">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@bogus.example.com
Source: address@bogus.example.com">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@bogus.example.com, Dest:
greylisting-spp--releases--0.1
address@bogus.example.com:/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@bogus.example.com:/tmp/test> # failed, obviously
address@bogus.example.com:/tmp/test> cd ..
address@bogus.example.com:/tmp> rm -rf test
address@bogus.example.com:/tmp>

This works:

address@bogus.example.com:/tmp> mkdir test
address@bogus.example.com:/tmp> cd test
address@bogus.example.com:/tmp/test> HOME=`pwd` tla register-archive -email is unavailable-
address@bogus.example.com">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@bogus.example.com
address@bogus.example.com:/tmp/test> HOME=`pwd` tla grab
http://www.unix-ag.uni-kl.de/~conrad/greylisting/releases--0.1
Grabbing:
address@bogus.example.com/address@bogus.example.com">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@bogus.example.com
Source: address@bogus.example.com">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@bogus.example.com, Dest:
greylisting-spp--releases--0.1

  • from archive cached: address@bogus.example.com/greylisting-spp--releases--0.1--base-0
  • patching for revision: address@bogus.example.com/greylisting-spp--releases--0.1--patch-1

[...]

  • patching for revision: address@bogus.example.com/greylisting-spp--releases--0.1--patch-7

address@bogus.example.com:/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@bogus.example.com:/tmp/test> # expected result
address@bogus.example.com:/tmp/test> cd ..
address@bogus.example.com:/tmp> rm -rf test
address@bogus.example.com:/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 <pco>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2252:  tla-grab.patch added by pco (541B - text/x-diff - Patchfile containing the fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 8 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-06 atai Assigned toNone atai
2006-01-06 atai Fixed Release1.3.4.1 1.3.5
2006-01-06 atai Summary&quot;tla grab&quot; fails if &quot;Archive-Name&quot; has not yet been registered "tla grab" fails if "Archive-Name" has not yet been registered
    StatusNone Ready For Test
    Fixed Release1.2.2 1.3.4.1
2006-01-05 pco Attached File- Added tla-grab.patch, #3247
    Carbon-Copy- Added pco
2005-02-11 sascha_silbe Carbon-Copy- Added sascha_silbe

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code