"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Got is unhappy with the FreeBSD repository
To:
Sebastien Marie <semarie@online.fr>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Fri, 10 Mar 2023 12:50:09 +0100

Download raw body.

Thread
  • Stefan Sperling:

    Got is unhappy with the FreeBSD repository

  • On Thu, Feb 23, 2023 at 05:24:30PM +0100, Sebastien Marie wrote:
    > On Thu, Feb 23, 2023 at 04:58:12PM +0100, Christian Weisgerber wrote:
    > > Got chokes when updating to different commits in the FreeBSD
    > > repository.
    > > 
    > > Here's a reproducer:
    > > 
    > > $ got clone ssh://anongit@git.freebsd.org/src.git
    > > $ got co -c 67bceb38f463d8a929c55efdcfcfefc9aedfeff6 src.git
    > > $ cd src
    > > $ got up
    > > [...]
    > > U  contrib/llvm-project/libcxx/include/__split_buffer
    > > D  contrib/llvm-project/libcxx/include/__sso_allocator
    > > U  contrib/llvm-project/libcxx/include/__std_stream
    > > U  contrib/llvm-project/libcxx/include/__string
    > > got: stat: /home/naddy/tmp/src/contrib/llvm-project/libcxx/include/__string/char_traits.h: Not a directory
    > 
    > I think I already saw such problem with openbsd for this particular file.
    > 
    > in fact, .../libcxx/include/__string was a file at some point, and next, it was 
    > a directory with files inside it.
    
    I have tested the above FreeBSD scenario with my patch in place.
    
    Updating across the type change of __string from file to directory works.
    
    When updating backwards, __string changes from a directory to a file
    and the update operation reports an obstruction:
        ~  contrib/llvm-project/libcxx/include/__string
    However the directory is removed anyway, and if 'got update' is run again
    it will restore the now missing file __string.
    
    I guess this is good enough, for now. At least there are no crashes or
    hard errors. I will add a test case to cover the second case, using the
    above behaviour as expected behaviour. We can make more improvements later.
    
    
  • Stefan Sperling:

    Got is unhappy with the FreeBSD repository