Execution of Parallel yum. and locking should be shifted at the time of installing.
Any person can execute multiple instances of yum. Right now this is happening but locking need to taken place only when installation taken place. and it need to have way to download the files.
- Name: Manish Runwal
- email: email@example.com
- Targeted release: Fedora 22
- Last updated: 3-Dec-2009
- Percentage of completion: 0%
Right now when any application is using yum then locking is taken place for using yum. But some time its non-sense(sorry using hard words) to have it locking. e.g. If I am downloading one application and parallelly I want to install another application where their is no common files. but still yum is locked so I can't even download the files. So I want to have locking need to shifted only at the time of installing any package.
So you might have question. lets say if "A" is instance which is downloading one application with having common rpm with "B" instance have it. while downloading it will ask either A or B whom ever taken first downloading, "Do you want to overwrite the downloading?" then it will be user's concern of managing the things. if certain amount of time person have not responded then installation will not be taken place. and whole package installation will be skipped.
Deadlock situation : If on A instance given permission to download then it will have to either locking of that perticular package for downloading for B instance. So on "B" they will given locking and same can't able to proceed installation of B package.
Doing this we can fully optimize yum features. and we can download and install many files. and locking will be taken place only at the time of installation.
Benefit to Fedora
Right now existing yum. let say it will take 50% amount of time to download particular package. and 10% time to check dependencies and 10% time for installation and 10% time for cleaning the older files. (Please note that percentages are assumptions). so actual so when one instances is installing the files. other yum instance will download the files. This will speed up installation process.
I am not sure. But it will be affected with yum, kpackegekit. and add-remove programs.
How To Test
Here we have different sets of test cases.
- Normal Executation
0. Start yum to install gedit
1. At the same time yum to install juk/amarok.
2. It will check for dependencies. now here we don't find any collision rpm.
2. So yum will download gedit files. at the same time it will download juk/amarok files.
3. Now it will installed gedit. for juk installation it will get lock as yum is doing installation.
4. Installation lock will be free. and now juk will be installed.
5. Now cleaning process of gedit taken place. and the same time cleaning process of juk will take place.
I hope this will be easier to understand.
- Complex Execution
Let say any person is installing gedit and another instance any gnome-package 0. yum will parallel download both files.
1. let say one file which yum is downloading other instance of yum is also downloading the same file.
2. So for first instance it will download the collision file. but for other instance he will given message on that terminal(I am expecting that we are doing this on terminal, once everything is properly same features will be used for gui), that "do you want to overwrite package ?" as existing package is downloading by other instance. if he said yes then first instance will not move for installation. while other will go for installation. if their is any deadlock situation then user will abort any instance by either breaking the process.(if its gui then hit cancel)
3. Lets say for another instance user said cancel then still it will download other files. so first instance will have all the files downloaded. and second instance will not download collision file and other files will be downloaded.
4. now first installation process will take place. and other instance will see the lock.
5. Now first process is complete lock will be released and other instances of yum will install the package.
6. Now cleaning of first package taken place without cleaning collision files.
7. Now other process's cleaning take place and removing that collision files as well.
8. And now yum's work is finished.
Little bit complicated to understand but this will be really beneficial for all people.
They can download files of both packages on different terminal (might be different user who is accessing same machine).
I am not the fedora developer but sure fedora programmer surely write something about this.
Backup plan is that let yum to work as what its working now.
This will be same as what I have described in How to test.
Not sure. But I am expecting on Fedora 13