bug-gnu-arch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnu-arch] [bugs #11731] "tla grab" fails if "Archive-Name" has not


From: Peter Conrad
Subject: [Bug-gnu-arch] [bugs #11731] "tla grab" fails if "Archive-Name" has not yet been registered
Date: Tue, 25 Jan 2005 15:25:30 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2) (KHTML, like Gecko)

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11731>

                 Summary: "tla grab" fails if "Archive-Name" has not yet
been registered
                 Project: GNU arch -- a revision control system
            Submitted by: pco
            Submitted on: Die 25.01.2005 um 15:25
                Category: tla
                Severity: 5 - Average
              Item Group: bug
                  Status: None
                 Privacy: Public
             Open/Closed: Open
                 Release: 1.3
           Fixed Release: 1.2.2
          Merge Request?: None
       Your Archive Name: 
   Your Archive Location: 
             Assigned to: None

    _______________________________________________________

Details:

[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@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/address@hidden">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden
Source:
address@hidden">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 
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/address@hidden">http://www.unix-ag.uni-kl.de/~conrad/Archives/address@hidden
Source:
address@hidden">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






    _______________________________________________________

This item URL is:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11731>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]