It often happens, that layman fails to pull some overlays. Solving this is done by $ git reset --hard origin/master manually. Please integrate this in layman. Maybe this is related to my configuration git_addopts : --depth=1 git_syncopts : --depth=1 related to bug 500358. I already talked to mv about his overlay, maybe this is caused by some rebase on the repos. But it also happens for other overlays: * Running Git... # ( cd /var/lib/layman/mv && /usr/bin/git pull --depth=1 ) error: Pull is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. * Failure result returned from Git * * Errors: * ------ * Failed to sync overlay "mv". * Error was: Syncing overlay "mv" returned status 128! * db.sync() * * Running Git... # ( cd /var/lib/layman/flavour && /usr/bin/git pull --depth=1 ) error: Pull is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. * Failure result returned from Git * * Errors: * ------ * Failed to sync overlay "flavour". * Error was: Syncing overlay "flavour" returned status 128! * db.sync() * Reproducible: Sometimes
Having layman handle something like this would be far too automatic and should be left in the hands of the user. As such, I recommend that if a user runs into issues like this then they should either move the changed file from the overlay, reset the changes, or commit the changes and add --rebase to git opts to preserve them on pull.
My opinion is different about this because * I have to to these resets for many overlays nearly every time I do a --sync. * users most probably are not responsible for changes in the overlay and did not even touch the files there * users just want to have a up-to-date bare repository without history just like rsync would do. Using git for these tasks today is just abusing their good implementation of delta-updates for the costs of some additional meta /.git data. git even better performs than rsync. This has been discussed in the past when portage switched to sync-type git by default. This is not the purpose of git and asking #git people for bare repo updates they will tell you that git is not designed like this. But it works, performs well and I agree with the decision. Anyway. For not failing with nearly every sync I will need to add some "git reset --hard origin/master" to the scripts.
Almost every layman sync I run into errors like this caused by incomplete git merges: * * Errors: * ------ * Failed to sync overlay "kde". * Error was: Syncing overlay "kde" returned status 128! * db.sync() * Failed to sync overlay "mv". * Error was: Syncing overlay "mv" returned status 128! * db.sync() * Failed to sync overlay "mva". * Error was: Syncing overlay "mva" returned status 128! * db.sync() * Failed to sync overlay "nightmare". * Error was: Syncing overlay "nightmare" returned status 128! * db.sync() * Failed to sync overlay "rion". * Error was: Syncing overlay "rion" returned status 128! * db.sync() * --- Invalid atom in /var/lib/layman/kde/profiles/package.use.mask: >>>>>>> --- Invalid atom in /var/lib/layman/kde/profiles/package.use.mask: <<<<<<< --- Invalid atom in /var/lib/layman/kde/profiles/package.use.mask: ======= --- Invalid atom in /var/lib/layman/kde/profiles/package.mask/misc: <<<<<<< HEAD --- Invalid atom in /var/lib/layman/kde/profiles/package.mask/misc: ======= --- Invalid atom in /var/lib/layman/kde/profiles/package.mask/misc: >>>>>>> 0afe78f9b3b51814b2a93e06234400f65c3330a8 --- Invalid atom in /var/lib/layman/mva/profiles/package.mask: <<<<<<< HEAD --- Invalid atom in /var/lib/layman/mva/profiles/package.mask: ======= --- Invalid atom in /var/lib/layman/mva/profiles/package.mask: >>>>>>> 4439548e8aadcf1e44deeb064149fc3da16ff94d This does not happen with very special overlays but with almost every overlay after a while. The easiest way to get around for now is to just re-fetch every overlay like this: # overlays="$(layman -l |cut -d " " -f 3)";layman -d $overlays;layman -a $overlays The git pull of the Portage tree never has these issues, only layman, eventhough the sync-type is equal: # cat /etc/portage/repos.conf/*.conf [DEFAULT] main-repo = gentoo [gentoo] location = /usr/portage #sync-type = websync sync-type = git #sync-uri = rsync://rsync.de.gentoo.org/gentoo-portage #sync-uri = git://github.com/gentoo/gentoo-portage-rsync-mirror sync-uri = git://github.com/gentoo-mirror/gentoo auto-sync = yes [kde] priority = 50 location = /var/lib/layman/kde layman-type = git sync-type = laymansync sync-uri = git://anongit.gentoo.org/proj/kde.git auto-sync = Yes [mv] priority = 50 location = /var/lib/layman/mv layman-type = git sync-type = laymansync sync-uri = git://anongit.gentoo.org/user/mv.git auto-sync = Yes [mva] priority = 50 location = /var/lib/layman/mva layman-type = git sync-type = laymansync sync-uri = git://github.com/msva/mva-overlay auto-sync = Yes [nightmare] priority = 50 location = /var/lib/layman/nightmare layman-type = git sync-type = laymansync sync-uri = https://gitlab.com/r3lgar/nightmare.git auto-sync = Yes [portage_vmgentoo-mb] location = /usr/local/portage auto-sync = no
You can do this on your own right now... In layman.cfg theere is this line: #git_command : /usr/bin/git uncomment it and set it to your own wrapper script the gleans the repo path from the options it is passed, does your git reset and then continues with the normal pull.
Sorry, this issue was caused by git_addopts : --depth=1 git_syncopts : --depth=1 proposed in the currently unconfirmed bug 500358. Please mark this bug as duplicate of that, if you agree, as it needs to be discussed there, how layman should fetch/pull shallow git repos as portage already does (bug 552814).