Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 681144 - app-portage/layman-2.4.2-r2: Fails to populate empty /var/lib/layman
Summary: app-portage/layman-2.4.2-r2: Fails to populate empty /var/lib/layman
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
Depends on:
Reported: 2019-03-21 09:53 UTC by Massimo Burcheri
Modified: 2019-03-22 03:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Burcheri 2019-03-21 09:53:03 UTC
After deleting /var/lib/layman/* and doing another emerge --sync, only the empty directories in /var/lib/layman are created.

My overlays in /etc/portage/repos.conf/layman.conf all look like this:

priority = 50
location = /var/lib/layman/sunrise
layman-type = git
sync-type = laymansync
sync-uri =
auto-sync = Yes

emerge --sync also populates an empty /usr/portage, so should it be done for /var/lib/layman/ locations.

Reproducible: Always

Actual Results:  
This is the error output of the emerge --sync:

>>> Syncing repository 'sunrise' into '/var/lib/layman/sunrise'...
>>> Starting layman sync for sunrise...
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/layman/", line 394, in sync
    odb =
  File "/usr/lib64/python3.6/site-packages/layman/", line 260, in select
    raise UnknownOverlayException(overlay)
layman.dbbase.UnknownOverlayException: Exception: Overlay "sunrise" does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/portage/util/_async/", line 39, in _run
    result =*(self.args or []), **(self.kwargs or {}))
  File "/usr/lib64/python3.6/site-packages/portage/sync/", line 168, in sync
    taskmaster.run_tasks(tasks, func, status, options=task_opts)
  File "/usr/lib64/python3.6/site-packages/portage/sync/", line 67, in run_tasks
    result = getattr(inst, func)(**kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/sync/", line 304, in sync
    return self.update()
  File "/usr/lib64/python3.6/site-packages/portage/sync/modules/laymansync/", line 206, in update
    results = layman_inst.sync(
  File "/usr/lib64/python3.6/site-packages/layman/", line 401, in sync
    % {'repo': ovl, 'err': error}))
KeyError: 'error'
Comment 1 Brian Dolbec gentoo-dev 2019-03-22 03:55:40 UTC
Layman  predates the newer portage git capabilities.  Layman's sync capabilities are based on the fact that the repo was added via layman previously.

The fact that you deleted your repository checkouts means that you will need to delete then re-add them via layman or just change them from laymansync to git, and let portage's git module look after populating and syncing.

So, this bug could be marked as user error/invalid.  But also could be an enhancement.

I am not sure that layman will remain the primary means of adding overlays to user systems much longer.  So, will not make this a priority.   I will keep this in mind the next time I am poking in layman's code.  If it won't require major re-write, I will see about detecting deleted repo directories and re-check them out.