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

Submitted by:  Peter Conrad <pco>
Submitted on:  Tue 25 Jan 2005 03:25:27 PM UTC  
Votes:  1  
 
Category: tlaSeverity: 3 - Normal
Item Group: bugStatus: Ready For Test
Privacy: PublicOpen/Closed: Open
Release: 1.3
Fixed Release: 1.3.5
Merge Request?: None
Your Archive Name: 
Your Archive Location: 
Assigned to: Andy Tai <atai>

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

patch applied, will show up in 1.3.5

Andy Tai <atai>
Project AdministratorIn charge of this item.
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: -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 -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 File(s):
   
   
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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 1 encouragement so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 8 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 06 Jan 2006 05:14:26 PM UTCataiAssigned toNone=>atai
Fri 06 Jan 2006 05:13:56 PM UTCataiFixed Release1.3.4.1=>1.3.5
Fri 06 Jan 2006 05:07:10 PM UTCataiSummary"tla grab" fails if "Archive-Name" 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
Thu 05 Jan 2006 10:54:36 AM UTCpcoAttached File-=>Added tla-grab.patch, #3247
  Carbon-Copy-=>Added pco
Fri 11 Feb 2005 12:25:53 PM UTCsascha_silbeCarbon-Copy-=>Added sascha_silbe

Back to the top


Powered by Savane 3.1-cleanup