Hi,
> git://
srobo.org not working any longer, with various workarounds
I recently hit another situation where this causes weird issues. While
submodules are suitably redirected using the url .. insteadOf config
trick, that clearly relies on all developers having that workaround
installed.
Unfortunately as I noted all non-developer scenarios remain broken, so
I've been migrating any submodules over to using
git.srobo.org
directly. In theory that should survive any future host changes as
well as avoiding additional network latency from using a port forward
if one ever appears.
While nice in practise this has some additional complexities. In order
for the new url to used, users must run `git submodule sync` in each
repo containing submodules. Where submodules are nested this means
several layers of update commits and `git submodule sync` runs are
needed to fully convert a repo.
This is an inconvenience locally, but turns out to be a serious issue
on saffron (both the live one and any dev clones) where several such
repos are deployed. While in general on saffron we fetch from the
local version of the repo (rather than fetch over a network something
which is essentially coming from localhost), this does not happen for
submodules [1].
These two factors, combined with puppet not appearing to have support
for running `git submodule sync` mean that some of saffron's repos had
managed to get themselves into a rather weird state of partial update.
I've fixed the couple I spotted which were causing puppet to error,
though there may be others hiding simply because they haven't had any
updates pushed yet.
For anyone needing to fix this in the future the process is largely
the same as for a local repo:
- if needed: `chown` the files in the repo which puppet has mangled ownership of
- `su` to the appropriate user for the repo then:
-- `git fetch --all --recurse-submodules`
-- `git submodule sync`
-- `git submodule foreach --recursive git submodule sync`
-- `git submodule update --recursive`
You may need to repeat these steps a few times to get each layer of
submodules suitably updated.
Thanks,
Peter
[1] We could use relative urls, but there are other reasons not to do
that: mainly that other clones would then need to re-host the entire
chain and be kept in sync, greatly complicating doing so.