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
Status: RESOLVED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-21 09:53 UTC by Massimo Burcheri
Modified: 2023-09-08 00:42 UTC (History)
0 users

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


Attachments

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:

[sunrise]
priority = 50
location = /var/lib/layman/sunrise
layman-type = git
sync-type = laymansync
sync-uri = https://anongit.gentoo.org/git/proj/sunrise-reviewed.git
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/api.py", line 394, in sync
    odb = db.select(ovl)
  File "/usr/lib64/python3.6/site-packages/layman/dbbase.py", 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/AsyncFunction.py", line 39, in _run
    result = self.target(*(self.args or []), **(self.kwargs or {}))
  File "/usr/lib64/python3.6/site-packages/portage/sync/controller.py", line 168, in sync
    taskmaster.run_tasks(tasks, func, status, options=task_opts)
  File "/usr/lib64/python3.6/site-packages/portage/sync/controller.py", line 67, in run_tasks
    result = getattr(inst, func)(**kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/sync/syncbase.py", line 304, in sync
    return self.update()
  File "/usr/lib64/python3.6/site-packages/portage/sync/modules/laymansync/pylayman.py", line 206, in update
    results = layman_inst.sync(self.repo.name)
  File "/usr/lib64/python3.6/site-packages/layman/api.py", line 401, in sync
    % {'repo': ovl, 'err': error}))
KeyError: 'error'
Comment 1 Brian Dolbec (RETIRED) 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.
Comment 2 Larry the Git Cow gentoo-dev 2023-06-22 13:26:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=805fe7c0495e1bf3a34d518041e466258944b82b

commit 805fe7c0495e1bf3a34d518041e466258944b82b
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2023-06-22 13:15:09 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2023-06-22 13:15:09 +0000

    app-portage/layman: treeclean
    
    Closes: https://bugs.gentoo.org/761199
    Closes: https://bugs.gentoo.org/609720
    Closes: https://bugs.gentoo.org/627930
    Closes: https://bugs.gentoo.org/700742
    Closes: https://bugs.gentoo.org/649766
    Closes: https://bugs.gentoo.org/681144
    Closes: https://bugs.gentoo.org/648374
    Closes: https://bugs.gentoo.org/545568
    Closes: https://bugs.gentoo.org/581890
    Closes: https://bugs.gentoo.org/539336
    Closes: https://bugs.gentoo.org/590132
    Closes: https://bugs.gentoo.org/574190
    Closes: https://bugs.gentoo.org/578992
    Closes: https://bugs.gentoo.org/540012
    Closes: https://bugs.gentoo.org/412883
    Closes: https://bugs.gentoo.org/443880
    Closes: https://bugs.gentoo.org/480884
    Closes: https://bugs.gentoo.org/567386
    Closes: https://bugs.gentoo.org/454604
    Closes: https://bugs.gentoo.org/567384
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 app-portage/layman/Manifest            |   1 -
 app-portage/layman/layman-2.4.3.ebuild | 100 ---------------------------------
 app-portage/layman/layman-9999.ebuild  | 100 ---------------------------------
 app-portage/layman/metadata.xml        |  24 --------
 profiles/package.mask                  |   5 --
 5 files changed, 230 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2023-09-08 00:42:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abfaed0b3460e638410c0fd74783f8d292d63afc

commit abfaed0b3460e638410c0fd74783f8d292d63afc
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-09-08 00:41:10 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-09-08 00:42:07 +0000

    app-portage/layman: treeclan
    
    Closes: https://bugs.gentoo.org/761199
    Closes: https://bugs.gentoo.org/609720
    Closes: https://bugs.gentoo.org/627930
    Closes: https://bugs.gentoo.org/700742
    Closes: https://bugs.gentoo.org/649766
    Closes: https://bugs.gentoo.org/681144
    Closes: https://bugs.gentoo.org/648374
    Closes: https://bugs.gentoo.org/545568
    Closes: https://bugs.gentoo.org/581890
    Closes: https://bugs.gentoo.org/539336
    Closes: https://bugs.gentoo.org/590132
    Closes: https://bugs.gentoo.org/574190
    Closes: https://bugs.gentoo.org/578992
    Closes: https://bugs.gentoo.org/540012
    Closes: https://bugs.gentoo.org/412883
    Closes: https://bugs.gentoo.org/443880
    Closes: https://bugs.gentoo.org/480884
    Closes: https://bugs.gentoo.org/567386
    Closes: https://bugs.gentoo.org/454604
    Closes: https://bugs.gentoo.org/567384
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 app-portage/layman/Manifest            |   1 -
 app-portage/layman/layman-2.4.3.ebuild | 100 ---------------------------------
 app-portage/layman/layman-9999.ebuild  | 100 ---------------------------------
 app-portage/layman/metadata.xml        |  24 --------
 profiles/package.mask                  |   5 --
 5 files changed, 230 deletions(-)