Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Portage Developer (http://www.linux-archive.org/gentoo-portage-developer/)
-   -   layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted (http://www.linux-archive.org/gentoo-portage-developer/360201-layman-hard-coded-fetching-gentoo-org-broken-overlays-when-add-interrupted.html)

Amit Dor-Shifer 04-21-2010 09:09 PM

layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted
 
Hi all. Some questions rgd layman:

1. Seems like layman is hard-wired to contain the layman-global.txt
list of overlays. What's the reasoning behind this? My issue
w/this is that, lately, when gentoo.org was unreachable, this
hard-wiring presented considerable hangs on fetch attempts.
2. Layman refuses to overwrite an existing local overlay dir, if that
dir already exists. I've experienced the following scenario:
1. added an overlay and broke layman w/ctrl+C before it finished.
2. attempted to re-execute the add action. Layman refuses,
saying it will not overwrite the dir.
3. attempted to remove overlay w/-d. Layman refuses, saying
there's no such overlay.
4. Same refusal (obviously) when attempting to sync the
incomplete overlay.

I think layman should allow the overwrite, at least pending a (-f)orce
flag. As far as my use-cases go, the local instance of the overlay has
no importance: it's just a copy from some overlay repo.


Would appreciate comments,
Amit

"Robin H. Johnson" 04-21-2010 09:33 PM

layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted
 
On Thu, Apr 22, 2010 at 12:09:21AM +0300, Amit Dor-Shifer wrote:
> Hi all. Some questions rgd layman:
>
> 1. Seems like layman is hard-wired to contain the layman-global.txt
> list of overlays. What's the reasoning behind this? My issue
> w/this is that, lately, when gentoo.org was unreachable, this
> hard-wiring presented considerable hangs on fetch attempts.
It's definitely NOT hardcoded.
# grep www.gentoo.org /etc/layman/layman.cfg
overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml

--
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Amit Dor-Shifer 04-21-2010 10:05 PM

layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted
 
Robin H. Johnson wrote:

On Thu, Apr 22, 2010 at 12:09:21AM +0300, Amit Dor-Shifer wrote:


Hi all. Some questions rgd layman:

1. Seems like layman is hard-wired to contain the layman-global.txt
list of overlays. What's the reasoning behind this? My issue
w/this is that, lately, when gentoo.org was unreachable, this
hard-wiring presented considerable hangs on fetch attempts.


It's definitely NOT hardcoded.
# grep www.gentoo.org /etc/layman/layman.cfg
overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml



amit0 ~ # grep -A 10 self.defaults =
/usr/lib64/python2.6/site-packages/layman/config.py

self.defaults = {'config' : '/etc/layman/layman.cfg',
'storage' : '/usr/portage/local/layman',
'cache' : '%(storage)s/cache',
'local_list': '%(storage)s/overlays.xml',
'make_conf' : '%(storage)s/make.conf',
'nocheck' : 'yes',
'proxy' : ',
'umask' : '0022',
'overlays' :
*
'http://www.gentoo.org/proj/en/overlays/layman-global.'*

'txt',}

When I invoke the following, I see http interaction w/gentoo.org:

layman -c /dev/null -N -f -a oversi -o file:///tmp/layman-oversi.xml

which AFAIK doesn't read /etc/layman/layman.cfg.

http interaction indicated by running 'tshark host www.gentoo.org' while
executing the above.


Amit

"Robin H. Johnson" 04-22-2010 02:32 AM

layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted
 
On Thu, Apr 22, 2010 at 01:05:11AM +0300, Amit Dor-Shifer wrote:
> When I invoke the following, I see http interaction w/gentoo.org:
>
> layman -c /dev/null -N -f -a oversi -o file:///tmp/layman-oversi.xml
> which AFAIK doesn't read /etc/layman/layman.cfg.
The config file given (empty via /dev/null in this case) overrides the
options from self.defaults. Using '-c /dev/null' imports an EMPTY
config, and empty does NOT override anything, leaving you with the
defaults.

Do this instead:
# cat >/etc/layman/empty-overlays.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE repositories SYSTEM "/dtd/repositories.dtd">
<repositories xmlns="" version="1.0" />
EOF

Then set the 'overlays' key as:
overlays: file:///etc/layman/empty-overlays.xml

Or better yet, just put your OWN layman-oversi.xml reference into there
and distribute that file, and avoid the entire need for the -o argument.

--
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Amit Dor-Shifer 04-22-2010 07:06 AM

layman: hard-coded fetching from gentoo.org and broken overlays when an 'add' is interrupted
 
Robin H. Johnson wrote:

On Thu, Apr 22, 2010 at 01:05:11AM +0300, Amit Dor-Shifer wrote:


When I invoke the following, I see http interaction w/gentoo.org:

layman -c /dev/null -N -f -a oversi -o file:///tmp/layman-oversi.xml
which AFAIK doesn't read /etc/layman/layman.cfg.


The config file given (empty via /dev/null in this case) overrides the
options from self.defaults. Using '-c /dev/null' imports an EMPTY
config, and empty does NOT override anything, leaving you with the
defaults.

Do this instead:
# cat >/etc/layman/empty-overlays.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE repositories SYSTEM "/dtd/repositories.dtd">
<repositories xmlns="" version="1.0" />
EOF

Then set the 'overlays' key as:
overlays: file:///etc/layman/empty-overlays.xml

Or better yet, just put your OWN layman-oversi.xml reference into there
and distribute that file, and avoid the entire need for the -o argument.


ok. Thanks. I'll try generating a layman.cfg on the fly, read it w/(-c)
and reference my overlay index from there. I want to ignore
/etc/layman/layman.cfg


Any advice regarding the second issue?

Amit


All times are GMT. The time now is 04:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.