Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

emerge --sync problem



Good night,since today ,have trouble with sync

new-host-20 ~ # emerge --sync 
>>> Syncing repository 'gentoo' into '/usr/portage'...
/usr/bin/git pull
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/portage/util/_async/AsyncFunction.py", line 39, in _run
    result = self.target(*(self.args or []), **(self.kwargs or {}))
  File "/usr/lib64/python2.7/site-packages/portage/sync/controller.py", line 159, in sync
    taskmaster.run_tasks(tasks, func, status, options=task_opts)
  File "/usr/lib64/python2.7/site-packages/portage/sync/controller.py", line 66, in run_tasks
    result = getattr(inst, func)(**kwargs)
  File "/usr/lib64/python2.7/site-packages/portage/sync/syncbase.py", line 125, in sync
    return self.update()
  File "/usr/lib64/python2.7/site-packages/portage/sync/modules/git/git.py", line 91, in update
  File "/usr/lib64/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['/usr/bin/git', 'rev-list', '--max-count=1', 'HEAD']' returned non-zero exit status 128
new-host-20 ~ # kate

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0



# ping -c5 google.com

to see if network is ok.



# eselect python set python3.4
# emerge --sync

If Doesn't run correctly try:



# cd /usr/portage && git reset --hard


# emerge --sync

If You'll have other troubles, report the output.


Otherwise for reset the portage

# mv /usr/portage /usr/portage_old
# emerge --sync

If this will be resolutive you'll delete the /usr/portage_old

Link to comment
Share on other sites

  • 0

Thanks the last option works like charm!!

kali ~ # emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
/usr/bin/git pull
Already up-to-date.
=== Sync completed for gentoo
q: Updating ebuild cache in /usr/portage ... 
q: Finished 39297 entries in 0.136935 seconds
kali ~ # 

Link to comment
Share on other sites

  • 0

Very Happy rof this; if is all ok now you can remove the "/usr/portage_old" ^^ :)



I like app-portage/eix


eix is a "database" for Portage.

emerge eix


then when you want

# eix-sync


This command will make 2 operations.....

1) emerge --sync

2) eventually layman -S

3) eix-update (that update the internal database




I wish not to be too "pedantic , otherwise i'll recompile myself using CFLAGS="-pedantic" emerge -e sandro :D :D :D :D :D


Sorry my "joke" is just for "smiling a bit" :) :) :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...