Easy to reproduce with KDE Frameworks. Have something like this in your config file: ``` module-set my-libs repository kde-git tag v5.34.0 use-modules \ karchive \ kcodecs \ ... end module-set ``` Then run: $ kdesrc-build kcodecs Resulting error: # kdesrc-build running: 'git' 'checkout' 'refs/tags/v5.34.0' # from directory: /home/build/kf5/src/kcodecs error: pathspec 'refs/tags/v5.34.0' did not match any file(s) known to git.
In the meantime, this WIP patch solves my issue: ``` diff --git a/modules/ksb/Updater/Git.pm b/modules/ksb/Updater/Git.pm index af14c16..e5b4b26 100644 --- a/modules/ksb/Updater/Git.pm +++ b/modules/ksb/Updater/Git.pm @@ -89,6 +89,9 @@ sub clone if (0 != log_command($module, 'git-clone', ['git', 'clone', @args])) { croak_runtime("Failed to make initial clone of $module"); } + if (0 != log_command($module, 'git-fetch', ['git', 'fetch', '--tags'])) { + croak_runtime("Failed to fetch tags of $module"); + } } $ipc->notifyPersistentOptionChange( @@ -384,7 +387,7 @@ sub updateExistingClone # Download updated objects. This also updates remote heads so do this # before we start comparing branches and such. - if (0 != log_command($module, 'git-fetch', ['git', 'fetch', $remoteName])) { + if (0 != log_command($module, 'git-fetch', ['git', 'fetch', '--tags', $remoteName])) { croak_runtime ("Unable to perform git fetch for $remoteName, which should be $cur_repo"); } ```
+1, that would remove one step from my monthly KF5 release procedure ;)
See this bug annoys me because I've run into it myself but never quite got so far as to fix it. Lazy me. :-/ But I have Kevin's patch applied and as long as it makes it through this current build I'll push it out shortly.
Git commit 9f70d018b9c9b1f07939022e1e00a78fcaeef4b5 by Michael Pyne. Committed on 22/08/2017 at 23:35. Pushed by mpyne into branch 'master'. git: Keep the tags up to date at initial clone and after. Fixes an annoying lack of tags. FIXED-IN:17.09 M +5 -2 modules/ksb/Updater/Git.pm https://commits.kde.org/kdesrc-build/9f70d018b9c9b1f07939022e1e00a78fcaeef4b5