seth vidal wrote:
On Thu, 2007-07-05 at 03:04 +0530, Debarshi 'Rishi' Ray wrote:
Please find attached a patch to incorporate the persistent
enable/disable of repositories by editing the .repo files.
Repositories mentioned in yum.conf are still not supported.

This is done using the following two methods:
YumRepository.enablePersistent(self)
YumRepository.disablePersistent(self)

This is just a proof of concept and your comments are awaited.

the only thing I've noticed from your patch is that the following
behavior, which works now will no longer work:

/etc/yum/repos.d/bar.repo
[bar]
name=bar


/etc/yum/repos.d/foo.repo
baseurl=url://bar/repo
enabled=1

[foo]
name=foo

/etc/yum/repos.d/quux.repo
baseurl=url://foo/repo
enabled=0

[quux]
name=quux
baseurl=url://quux/repo
enabled=1




currently we concatenate all the .repo files then parse them (also we
end up with a single parser instance)

In your patch we'd have a parser instance for each of them and they
would not be concatenated. now, I don't really have a problem with
losing that behavior b/c I'm betting it is next to never used since most
people who had not looked at that section of the code would never know
how it happened anyway. :)

However, What does everyone else think?

-sv


_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
Besides the problems Seth already has found, There is 2 problem with writing repo back to disk.
1. The order of the options, they will be kind of mixed.
i should be.
[foorepo]'
name=this is the foo repo
baseurl=
or
mirrorlist=
enabled=0/1
otheroptions.

2. out commented options and comments will be lost.

1. and the problems Seth talked about i have solved in system-config-repo

2. is solved in repoman.

I will try to cook something together there there fits into the current yum config code, so it can save stuff in the right place and order without losing comments

Tim



_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to