After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682516 - dvcs_mirror interacts badly with submodules
dvcs_mirror interacts badly with submodules
Status: RESOLVED OBSOLETE
Product: jhbuild
Classification: Infrastructure
Component: general
3.6.x
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks: 669439
 
 
Reported: 2012-08-23 04:09 UTC by Craig Keogh
Modified: 2021-05-17 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add skip-build attribute to <autotools> (3.10 KB, patch)
2012-08-28 23:51 UTC, Craig Keogh
rejected Details | Review
doc: document skip-build attribute to <autotools> (1.79 KB, patch)
2012-08-28 23:52 UTC, Craig Keogh
rejected Details | Review
3.6: Add submodule libgd and dependencies (2.19 KB, patch)
2012-08-28 23:57 UTC, Craig Keogh
rejected Details | Review
neat little python script (5.35 KB, text/plain)
2015-02-22 06:25 UTC, Allison Karlitskaya (desrt)
  Details

Description Craig Keogh 2012-08-23 04:09:50 UTC
In my ~/.config/jhbuildrc I have:
dvcs_mirror_dir = os.path.expanduser('~/gnome/dvcs')

Checkout of gnome-font-viewer fails with:

*** Checking out gnome-font-viewer *** [1/1]
git clone --mirror ssh://cskeogh@git.gnome.org/git/gnome-font-viewer /home/oxyde/gnome/dvcs/gnome-font-viewer.git
Cloning into bare repository '/home/oxyde/gnome/dvcs/gnome-font-viewer.git'...
remote: Counting objects: 749, done.
remote: Compressing objects: 100% (663/663), done.
remote: Total 749 (delta 530), reused 109 (delta 84)
Receiving objects: 100% (749/749), 1.52 MiB | 301 KiB/s, done.
Resolving deltas: 100% (530/530), done.
git clone /home/oxyde/gnome/dvcs/gnome-font-viewer.git
Cloning into 'gnome-font-viewer'...
done.
git remote set-url origin /home/oxyde/gnome/dvcs/gnome-font-viewer.git
git remote update origin
Fetching origin
git pull --rebase
Current branch master is up to date.
git submodule init
Submodule 'libgd' (/home/oxyde/gnome/dvcs/libgd) registered for path 'libgd'
git submodule update
fatal: repository '/home/oxyde/gnome/dvcs/libgd' does not exist
Clone of '/home/oxyde/gnome/dvcs/libgd' into submodule path 'libgd' failed
*** Error during phase checkout of gnome-font-viewer: ########## Error running git submodule update *** [1/1]
Comment 1 Craig Keogh 2012-08-23 04:37:33 UTC
Only happens with dvcs_mirror_dir set. Works ok without dvcs_mirror_dir set.
Comment 2 Craig Keogh 2012-08-23 07:21:25 UTC
# cat build/gnome-font-viewer/.gitmodules
[submodule "libgd"]
	path = libgd
	url = ../libgd

Having trouble with relative url '../libgd'

From the docs [1]:
  This may be either an absolute URL ready to be passed to git-clone(1) or (if it
  begins with ./ or ../) a location relative to the superproject’s origin
  repository. 

[1] http://www.kernel.org/pub/software/scm/git/docs/gitmodules.html
Comment 3 Craig Keogh 2012-08-28 23:51:40 UTC
Created attachment 222689 [details] [review]
Add skip-build attribute to <autotools>


This patch needs attachment 221232 [details] [review] from bug 681289 to be applied first.
Comment 4 Craig Keogh 2012-08-28 23:52:14 UTC
Created attachment 222690 [details] [review]
doc: document skip-build attribute to <autotools>
Comment 5 Craig Keogh 2012-08-28 23:57:38 UTC
Created attachment 222691 [details] [review]
3.6: Add submodule libgd and dependencies


Create a "special" module libgd. "special" because libgd is a submodule. Checkout only - skip autogen, skip build and skip install. Checkout is required for "url = ../libgd" within .gitmodules to work with DVCS mirrors (dvcs_mirror_dir set within ~/.config/jhbuildrc).

This libgd checkout won't be used for people that don't use dvcs_mirror_dir, so it's a little wasteful. But only a little, because libgd is a very small module. I'm not sure how to solve the bug otherwise.
Comment 6 Frederic Peters 2012-08-29 09:00:05 UTC
I really don't like having libgd listed as a real module, then worked around with a new skip-build attribute. Would it be possible instead to have the git checkout phase check and process .gitmodules, when using dvcs_mirror_dir?
Comment 7 Frederic Peters 2012-08-29 09:19:16 UTC
Actually I think ../libgd should be discouraged, the only advantage I see is that it gets the git clone over the same transport (ssh over http) than the module, but that can be changed manually if the user wanted to hack on that particular submodule.

On the other hand, and apart this bug, using ../libgd would also break a clone of gnome-font-viewer published on another platform, say github.
Comment 8 Frederic Peters 2012-08-29 09:29:09 UTC
For reference: https://mail.gnome.org/archives/desktop-devel-list/2012-August/msg00145.html
Comment 9 Craig Keogh 2012-08-29 11:59:22 UTC
I agree, and I don't like my solution either, but I was out of ideas. I'll wait on the remove ../libgd discussion. If no outcome occurs in two weeks, I'll look at processing .gitmodules.

(Also, you can't process submodules using --recurse-submodules as it doesn't work with --mirror)
Comment 10 Allison Karlitskaya (desrt) 2015-02-22 06:25:28 UTC
Created attachment 297554 [details]
neat little python script

This is a python script that I've been working on.  I think the solution to this bug is going to end up looking quite a lot like this, and I don't want to lose it, so I'm attaching it here.
Comment 11 Colin Walters 2015-02-22 13:56:57 UTC
I'd look at what gnome-continuous does for submodules; it has a lot of subtleties for doing a full recursive mirror: https://git.gnome.org/browse/gnome-continuous/tree/src/js/vcs.js
Comment 12 GNOME Infrastructure Team 2021-05-17 15:53:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/135.