Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 367814 Details for
Bug 485402
emerge --sync - git update of new repository fails: fatal: Not a git repository (or any of the parent directories): .git
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage_add_git_clone.patch
portage_add_git_clone.patch (text/plain), 2.03 KB, created by
Chris Reffett (RETIRED)
on 2014-01-13 22:50:17 UTC
(
hide
)
Description:
portage_add_git_clone.patch
Filename:
MIME Type:
Creator:
Chris Reffett (RETIRED)
Created:
2014-01-13 22:50:17 UTC
Size:
2.03 KB
patch
obsolete
>diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py >index 9bb4774..4947786 100644 >--- a/pym/_emerge/actions.py >+++ b/pym/_emerge/actions.py >@@ -2176,17 +2176,36 @@ def _sync_repo(emerge_config, repo): > writemsg_level("!!! %s\n" % l, > level=logging.ERROR, noiselevel=-1) > return 1 >- msg = ">>> Starting git pull in %s..." % repo.location >- emergelog(xterm_titles, msg ) >- writemsg_level(msg + "\n") >- exitcode = portage.process.spawn_bash("cd %s ; git pull" % \ >+ # Test if the directory is a valid git repo, and run >+ # git clone if not >+ exitcode = portage.process.spawn_bash("cd %s ; git rev-parse" %\ > (portage._shell_quote(repo.location),), > **portage._native_kwargs(spawn_kwargs)) >- if exitcode != os.EX_OK: >- msg = "!!! git pull error in %s." % repo.location >+ if exitcode == 128: >+ msg = "!!! Git repo does not already exist, cloning from upstream..." > emergelog(xterm_titles, msg) >- writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1) >- return exitcode >+ writemsg_level(msg + "\n") >+ exitcode = portage.process.spawn_bash("cd %s ; git clone %s ." % \ >+ (portage._shell_quote(repo.location), >+ portage._shell_quote(repo.sync_uri)), >+ **portage._native_kwargs(spawn_kwargs)) >+ if exitcode != os.EX_OK: >+ msg = "!!! git clone error in %s." % repo.location >+ emergelog(xterm_titles, msg) >+ writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1) >+ return exitcode >+ else: >+ msg = ">>> Starting git pull in %s..." % repo.location >+ emergelog(xterm_titles, msg ) >+ writemsg_level(msg + "\n") >+ exitcode = portage.process.spawn_bash("cd %s ; git pull" % \ >+ (portage._shell_quote(repo.location),), >+ **portage._native_kwargs(spawn_kwargs)) >+ if exitcode != os.EX_OK: >+ msg = "!!! git pull error in %s." % repo.location >+ emergelog(xterm_titles, msg) >+ writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1) >+ return exitcode > msg = ">>> Git pull in %s successful" % repo.location > emergelog(xterm_titles, msg) > writemsg_level(msg + "\n")
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 485402
: 367814