[Yum-devel] Unable to set repo attribute pkgdir, using YUM Plugin

James Antill james at fedoraproject.org
Wed Jun 3 13:37:55 UTC 2009


On Tue, 2009-06-02 at 17:33 -0700, Creative Innovative wrote:
> Hi Folks,
> 
> I am using yum-3.2.22 version.
> 
> I have modified the downloadonly.py YUM plugin, that comes with
> yum-utils.
> 
> def postreposetup_hook(conduit):
>     package_mailbox = conduit.confString('main', 'package_mailbox',
> '/var/pkg_mailbox')
>     print 'setting pkgdir=%s' % package_mailbox
>     repos = conduit.getRepos();
>     list = repos.listEnabled();
> 
>     for repo in list:
>         repo.setAttribute('pkgdir', package_mailbox)
> 
> When the above plugin runs, it quits with below error,

 Yes, it was changed in commit cea34c86cc5142effa3b33fce1a62dff1d8d2bc0.
It was generally assumed to be a readonly attribute. For just a local
hack, you could just still override the '_dir_setup_pkgdir' value. If
you want it to be writable again, it's possible but a bit of work, open
an RFE ticket in BZ or trac.

-- 
James Antill <james at fedoraproject.org>
Fedora


More information about the Yum-devel mailing list