Playground DNF plugin

Mikolaj Izdebski mizdebsk at redhat.com
Tue Apr 15 13:45:24 UTC 2014


On 04/15/2014 03:05 PM, Miroslav Suchy wrote:
> Hi,
> I created first prototype of Playground repo (you know - release early...).
> 
> The playground repo is just set of Copr repositories. I.e. some Copr
> projects can have attribute "playground" set to true (currently no
> interface, only directly in DB). I choosed randomly several projects and
> set the flag to true.
> 
> There is an API call to get list of those projects:
> http://copr.fedoraproject.org/api/playground/list/
> (currently undocumented, because I plan to make some changes).
> 
> I wrote DNF plugin (based on Copr DNF plugin). You can test it by:
> curl
> https://raw.githubusercontent.com/akozumpl/dnf-plugins-core/master/plugins/copr.py
>> /usr/lib/python2.7/site-packages/dnf-plugins/copr.py

You could wrap the plugin in an RPM and publish in playground repo
itself :)  Self-hosting FTW

> 
> and you can do:
>  dnf playground enable
> which will enable all Copr project, which are marked as part of
> Playground and store them in
> /etc/yum.repos.d/_playground_<owner>_<projectname>.repo
> and:
>  dnf playground upgrade
> which will fetch new repos (by removing all old repos and fetch all
> playground repos).
> and:
>  dnf playground disable
> which will delete all /etc/yum.repos.d/_playground_*.repo
> 
> As I said, this is first prototype (although functional) and it have
> some glitches. But you can get the idea.
> 
> Is this the path we want to follow? Questions? Comments?

Works for me (to the extent of DNF limitations, that is).

I'd expect assumeyes option to work (i.e. "dnf -y playground enable"
should not wait for user input).

Playground repos could be better distinguished from other repos.  If a
user with FAS name "fedora" creates copr named "updates", then his copr
could be easily mistaken for standard "fedora-updates" repo and so on.

Otherwise it looks good.

-- 
Mikolaj Izdebski
Software Engineer, Red Hat
IRC: mizdebsk


More information about the copr-devel mailing list