Re: newt upgrade (install, sync) fails on mcuboot repo

2019-10-18 Thread Christopher Collins
On Thu, Oct 17, 2019 at 04:13:35PM -0700, Christopher Collins wrote:
> On Thu, Oct 17, 2019 at 10:16:22AM -0700, Christopher Collins wrote:
> > I couldn't think of a good general solution to this problem (if anyone
> > else can, please share!).  Unless I'm missing something, I think I would
> > call this a git bug, so I am going to report it to the git maintainers
> > if it hasn't already been reported. 
> 
> I reported the bug here:
> https://public-inbox.org/git/20191017230751.gc4...@pseudoephedrine.nightmare-heaven.no-ip.biz/T/#u

Just one more follow up- someone on the git mailing list replied to my
bug report.  This is already a known issue.  It was first reported in
2017[1], so it probably won't get fixed any time soon.  I will try to
think of a more general workaround for newt.

Chris

[1]: 
https://public-inbox.org/git/788230417.115707.1507584541...@ox.hosteurope.de/


Re: newt upgrade (install, sync) fails on mcuboot repo

2019-10-17 Thread Christopher Collins
On Thu, Oct 17, 2019 at 10:16:22AM -0700, Christopher Collins wrote:
> I couldn't think of a good general solution to this problem (if anyone
> else can, please share!).  Unless I'm missing something, I think I would
> call this a git bug, so I am going to report it to the git maintainers
> if it hasn't already been reported. 

I reported the bug here:
https://public-inbox.org/git/20191017230751.gc4...@pseudoephedrine.nightmare-heaven.no-ip.biz/T/#u

Chris


Re: newt upgrade (install, sync) fails on mcuboot repo

2019-10-17 Thread Christopher Collins
On Thu, Oct 17, 2019 at 07:51:07AM +0200, Szymon Janc wrote:
> Hello,
> 
> Due to recent changes in mcuboot git (use of submodules) you may hit issues 
> with newt upgrade|install|sync commands. There is a short term hotfix merged 
> into newt master to workaround this.
> 
> Since this is also affecting new users we may need to release newt
> 1.7.1 (only newt tool) in next few days to address this issue.

Thanks Szymon.  This is indeed a bummer.

To add a few details, mcuboot replaced a regular directory with a
submodule (ext/mbedtls).  This was done with two separate commits:
1. Rename (regular directory) `ext/mbedtls` --> `ext/mbedtls-asn1`
2. Add submodule `ext/mbedtls`

Git reports an error when you use `git checkout` to "jump over" these
two commits.  If you try going from post- to pre-, git reports the
following error and aborts the operation:

The following untracked working tree files would be overwritten by
checkout:
ext/mbedtls/include/mbedtls/asn1.h
ext/mbedtls/include/mbedtls/bignum.h
ext/mbedtls/include/mbedtls/check_config.h
ext/mbedtls/include/mbedtls/config.h
ext/mbedtls/include/mbedtls/ecdsa.h
ext/mbedtls/include/mbedtls/ecp.h
ext/mbedtls/include/mbedtls/md.h
ext/mbedtls/include/mbedtls/oid.h
ext/mbedtls/include/mbedtls/pk.h
ext/mbedtls/include/mbedtls/platform.h
ext/mbedtls/include/mbedtls/platform_util.h
ext/mbedtls/include/mbedtls/threading.h
Please move or remove them before you switch branches.
Aborting

If you attempt the reverse (pre- to post-), the operation succeeds, but
git reports a warning and leaves an orphaned directory behind (making
the repo state dirty).

These issues cause `newt upgrade` to fail in most cases.

This problem was addressed in the newt tool with an mcuboot-specific
hack: https://github.com/apache/mynewt-newt/pull/343

I couldn't think of a good general solution to this problem (if anyone
else can, please share!).  Unless I'm missing something, I think I would
call this a git bug, so I am going to report it to the git maintainers
if it hasn't already been reported. 

Chris


newt upgrade (install, sync) fails on mcuboot repo

2019-10-16 Thread Szymon Janc
Hello,

Due to recent changes in mcuboot git (use of submodules) you may hit issues 
with newt upgrade|install|sync commands. There is a short term hotfix merged 
into newt master to workaround this.

Since this is also affecting new users we may need to release newt 1.7.1 (only 
newt tool) in next few days to address this issue.


-- 
pozdrawiam
Szymon Janc