Bug 282367 - Unable to add a git remote named origin
Summary: Unable to add a git remote named origin
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: 1.14
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 18:58 UTC by Davide Marcelli
Modified: 2011-09-22 01:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Marcelli 2011-09-19 18:58:11 UTC
Version:           git
OS:                Linux

When kdesrc start compile qt-copy, appear this error: 
Error updating kde-baseapps, removing from list of packages to build.
 > Unable to add a git remote named origin for git://anongit.kde.org/kde-baseapps at ./kdesrc-build line 2811

Reproducible: Always

Steps to Reproduce:
Launch the kdesrc-build script

Actual Results:  
Appear the bug

Expected Results:  
Download and complie kde-baseapps.
Comment 1 Michael Pyne 2011-09-19 22:15:12 UTC
This bug seems related to the kate and konsole applications, which end up saved under kde-baseapps starting from kdesrc-build 1.14, since they are logically under kde-baseapps in the KDE project database.

Git doesn't support nested git modules like this, which is where the error comes from. I'm investigating the proper fix for this. I'd like to be able to retain the new on-disk layout without having issues like this. :)
Comment 2 Michael Pyne 2011-09-19 22:34:37 UTC
Updating version.
Comment 3 Michael Pyne 2011-09-19 23:12:39 UTC
Hmm, apparently git is supposed to support nested modules like this (it's how git-submodule works).

However if the directories already existed from an older kde-baseapps checkout then kdesrc-build will not have overwritten them.

Can you make sure that you don't have any unsaved patches or anything in the kde-baseapps source directory and then delete the kde-baseapps source directory? Afterwards, run "kdesrc-build --refresh-build +kde-baseapps +kate +konsole"  (the + module names forces kdesrc-build to use the XML database, --refresh-build will delete the old build directory for those modules).

Please let me know if there are still errors afterwards.
Comment 4 Davide Marcelli 2011-09-20 16:10:45 UTC
I'm sure i have nothing related to kde-baseapps, i have runned the script also on OpenSuse and in a Chakra fresh install, with the same results. Konsole and Kate are however compiled and installed, it's quite strange?
May be that the script don't find the right url? On quickgit.kde.org the kde-baseapps url is: git://anongit.kde.org/kde-baseapps.git and the error say that the url is git://anongit.kde.org/kde-baseapps, ".git" is missing.
Comment 5 Michael Pyne 2011-09-21 01:39:12 UTC
My understanding is that git.kde.org (and its associated support sites) will automatically add .git as needed for URIs (and in fact that's the recommended URI format).

If you are using kde-projects as the repository kdesrc-build is using the exact URL that's advertised from the database so there should be no error with that.

If you are specifying the repository yourself you should use something like

module kde-baseapps
    repository kde:kde-baseapps
end module

Either way getting an error about being unable to configure a git origin means that kdesrc-build thought the source directory for that module was already checked out (i.e. the directory exists).
Comment 6 Michael Pyne 2011-09-22 01:26:31 UTC
Git commit a28539a224c31b436441c0033f94646778e9485e by Michael Pyne.
Committed on 22/09/2011 at 03:24.
Pushed by mpyne into branch 'master'.

Allow kdesrc-build to remove existing source dirs.

That is, if the user permits it using --delete-my-patches, and only for
git clones at this point.

This should hopefully resolve bug 282367 (also frequently reported on
IRC ;)

BUG:282367

M  +36   -1    kdesrc-build

http://commits.kde.org/kdesrc-build/a28539a224c31b436441c0033f94646778e9485e