Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 384091

Summary: app-portage/layman-2.0.0_rc3: confusing ewarn message regarding overlays.xml
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: [OLD] UnspecifiedAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: normal CC: dolsen, idl0r
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 375789    

Description Martin von Gagern 2011-09-22 14:44:53 UTC
The upgrade to app-portage/layman-2.0.0_rc3 included the following piece of information:

The installed db file '%(storage)/overlays.xml'
has been renamed to '%(storage)/installed.xml'

Reading this, I assumed that the mentioned file on my system had been renamed by the ebuild, and got on with my work. It later turned out that, due to the fact that I've configured my storage directory different from the default of /var/lib/layman, the ebuild did not in fact move the file.

In case the required file is not present, the user should be warned that some action is required. What has been changed at the point where the ewarn is written is the name that layman looks for, not the name of a file on disk. The wording of the messages should be adjusted to convey this fact.

Of course it would be better if the ebuild could parse the appropriate locations form the layman configuration file, perhaps with the help of layman itself, to increase chances of a successful rename. That information could also be used to print the correct location of make.conf in those cases.

Furthermore, as the installed.xml was absent on my system, a cron job syncing the installed overlays did nothing instead. After noticing this problem (due to bug #383601 comment #1), I had assumed that the cron job had overwritten the existing overlays.xml with the complete list. Apparently that assumption was wrong, but I only found out after clearing out all the repositories to start from scratch.

So more detailed instructions in case the ebuild couldn't rename the file would be nice. And perhaps someone should make sure that overlays.xml never gets overwritten before the user actually has renamed the list of installed overlays, I'm not sure if I was just lucky that my on-disk file was newer than the master list or something like that.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2011-09-22 15:22:02 UTC
I have some code in layman to migrate the change, but it kept causing the tests to fail.  To use it it would require another small script to only perform the change.  It was decided to just have the ebuild move the file if it was in the default location.

I'll see what I can come up with for the next one.
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2012-10-15 05:10:08 UTC
I've now moved the rename_db code to a stand-alone layman-updater script.

starting in commit: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=b2f4591004a0f16a4c348123e999b0912745833e

with a few more changes in some commits after that.

It is ready in an updated layman-9999 ebuild now.  Hopefully if there are no bugs reported, in a 2.0.0 final release next weekend.
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2012-11-19 01:54:06 UTC
released in layman-2.0.0_rc4 and rc5.