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

Bug 180107

Summary: app-portage/layman, the --overlays flag does not work as expected
Product: Gentoo Linux Reporter: Nirbheek Chauhan (RETIRED) <nirbheek>
Component: Current packagesAssignee: Gunnar Wrobel (RETIRED) <wrobel>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo
Priority: High    
Version: 2007.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nirbheek Chauhan (RETIRED) gentoo-dev 2007-05-28 12:32:57 UTC
According to the man page, `layman -o URL` should add URL to the /etc/layman/layman.cfg file:

"-o url, --overlays url
Specifies the location of additional overlay lists. You can use this flag several times and the specified urls will get appended to the list of urls you specified in your config file. You may also specify local file urls by prepending the path with file://"

However, the addition is only temporary. The URL does not get added to the config file.
Hence, if I wish to add an external layman list,

`layman -o URL`

will not work as expected. However, if I wish to add a specific repository listed in URL,

`layman -o URL -a OVERLAY`

will work, but the overlay list will not get added to layman.cfg in any case.

Steps to reproduce:
1. layman -o URL (say http://wtk-overlay.sourceforge.net/layman.xml as an example)

Expected result:
URL should get added to /etc/layman/layman.cfg

Actual result:
URL gets added to the layman overlay-lists only for that specific run of the command.

This is for layman version 1.0.99
Comment 1 Naresh V 2007-05-28 12:37:17 UTC
Same problem here.

"strace layman -o URL" showed lines such as this:


...
...
stat("/usr/lib64/python2.4/site-packages/layman/overlays/rsync", 0x7fff3a17fd70) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.4/site-packages/layman/overlays/rsync.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.4/site-packages/layman/overlays/rsyncmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.4/site-packages/layman/overlays/rsync.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=1909, ...}) = 0
open("/usr/lib64/python2.4/site-packages/layman/overlays/rsync.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=1482, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af472ad6000
read(7, "m\362\r\n;\2743Fc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s@\0\0"..., 4096) = 1482
fstat(7, {st_mode=S_IFREG|0644, st_size=1482, ...}) = 0
read(7, "", 4096)                       = 0
close(7)                                = 0

...
...
Comment 2 René 'Necoro' Neumann 2007-07-13 00:35:58 UTC
I think this option is meant to add the overlay only temporarily ... never thought of this being permanently Oo
Comment 3 Nirbheek Chauhan (RETIRED) gentoo-dev 2007-07-13 14:44:04 UTC
(In reply to comment #2)
> I think this option is meant to add the overlay only temporarily ... never
> thought of this being permanently Oo
> 

Well then, either the manpage needs to be changed or the application needs to be fixed :)
I'd help, but I haven't the faintest clue about python.
Comment 4 Gunnar Wrobel (RETIRED) gentoo-dev 2007-09-11 15:35:12 UTC
Thanks for the note. layman-1.1 is in the tree and this should be fixed in the documentation