Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538324 - app-portage/layman-9999: fails hard when repos.conf is a file :)
Summary: app-portage/layman-9999: fails hard when repos.conf is a file :)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2015-01-31 09:59 UTC by Michał Górny
Modified: 2016-05-10 04:40 UTC (History)
1 user (show)

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-31 09:59:48 UTC
So I enabled repos.conf config and didn't notice repos.conf is a file on my system:


# layman -a zx2c4

 * Adding overlay...
 * Running Git... # ( cd /var/db/repos  && /usr/bin/git clone http://git.zx2c4.com/portage /var/db/repos/zx2c4 )
Cloning into '/var/db/repos/zx2c4'...
Checking connectivity... done.
 * Running Git... # ( cd /var/db/repos/zx2c4  && /usr/bin/git config user.name "layman" )
 * Running Git... # ( cd /var/db/repos/zx2c4  && /usr/bin/git config user.email "layman@localhost" )
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.

 * CLI: Errors occurred processing action add
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.
 * Exception caught installing repository 'zx2c4' : 'ConfigHandler' object has no attribute 'repo_conf'


So I fixed the issue and try again:

# layman -a zx2c4

 * Adding overlay...
 * Repository 'zx2c4' was already installed

 * CLI: Errors occurred processing action add
 * Repository 'zx2c4' was already installed


Ok, so I want to remove it:

# layman -d zx2c4                                                                 

 * Deleting selected overlay(s)...
 * Deleting directory "/var/db/repos/zx2c4"
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.

 * CLI: Errors occurred processing action delete
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.
 * Exception caught removing repository 'zx2c4':
 * 'ConfigHandler' object has no attribute 'repo_conf'


And re-add it:

# layman -a zx2c4

 * Adding overlay...
 * Repository 'zx2c4' was already installed

 * CLI: Errors occurred processing action add
 * Repository 'zx2c4' was already installed


Errr...

# layman -d zx2c4

 * Deleting selected overlay(s)...
 * Directory /var/db/repos/zx2c4 did not exist, no files deleted.
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.

 * CLI: Errors occurred processing action delete
 * ReposConf: ConfigHandler.read(); Failed to read "/etc/portage/repos.conf/layman.conf".
 * File not found.
 * Exception caught removing repository 'zx2c4':
 * 'ConfigHandler' object has no attribute 'repo_conf'


So I pretty much get stuck until I create repos.conf/layman.conf myself. I don't think this is good :).
Comment 1 Devan Franchini (RETIRED) gentoo-dev 2015-03-25 00:46:31 UTC
Sanity checks have been added to ensure layman gracefully dies when confronted with this type of issue instead of generating a traceback. Although, it should be worth noting that repos.conf shouldn't be a file to ensure both portage and layman can write overlay info to files in that dir :)
Comment 2 Devan Franchini (RETIRED) gentoo-dev 2015-03-25 00:47:50 UTC
Correction, it will send logical exceptions as opposed to the one you've encountered that don't seem to make much sense for the issue at hand.
Comment 3 Devan Franchini (RETIRED) gentoo-dev 2016-05-10 04:40:48 UTC
2.4.1 is out which resolves this issue, therefore, I'm resolving the bug.