Poll

Should the repo speed test progress indicatory be displayed as pulsating bar with text updates, or a bar indicating percentage of repo's tested (also with text updates)?

Pulsating bar, with text updates
1 (5.3%)
Percent completed, with text updates
14 (73.7%)
Scrap the idea and keep my favorite repo a secret!
4 (21.1%)

Total Members Voted: 17

Author Topic: SCRIPT: Repo speed test GUI  (Read 11256 times)

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: TESTING & POLL: Repo speed test GUI
« Reply #30 on: November 29, 2009, 12:47:39 PM »
the following changes have been made:
--disabled re-writing of the existing /etc/apt/sources.list file
--root permission are no longer required; files are saved in $HOME/repo-speed-test

--user can select the number of public on-line repo's to keep in the new sources.list file
--local and pass repos from the old sources.list are added to the top of the new sources.list file
--local "localhost" repo's are also now preserved


The new version is attached to the first post of this thread..  Please test and post feedback!

Thank you!

Galen

Tommylee567

  • Guest
Re: TESTING & POLL: Repo speed test GUI
« Reply #31 on: December 13, 2009, 01:58:56 AM »
Thanks! And the default version of the script is working perfectly. Since i'm on narrowband it is easier to identify which is best close by.

Thanks again!
Tim

PS: Hope this comes out like a package in the future!

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: TESTING & POLL: Repo speed test GUI
« Reply #32 on: December 13, 2009, 05:29:43 AM »
Brilliant script Travis! Users will save time, and users will not automatically tend to choose the same repos.

I would suggest to include the addition to let the user be able to install the script (providing the root pw here) - and finally ask if intermediate files should be kept or cleaned up.

I just ran the script, and would have said Yes to let the script install the change, and Yes to clean up.

If you need assistance packing this let me know,

cheers,
MBantz

EDIT: I needed manually to change kde to kde4 in the repo line - will the script be able to handle this as well?
« Last Edit: December 13, 2009, 08:31:11 AM by MBantz »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TESTING & POLL: Repo speed test GUI
« Reply #33 on: December 13, 2009, 09:12:56 AM »
Thats quite a compliment..  thank you!

I know I wrote a few other scripts that detect kde3/4, I don't recall if this was one of them... if not it should be easy to add. 

There is one other thing that needs to be fixed before it is ready to package..  IIRC I recieved a PM awhile ago about it allowing the user to select a default repo, but then later chop that repo off the list when they pick the number of repo's to keep.

By your suggestion to let users install the script, I assume you mean install the sources.list ???  ..That is how the original script was written, but there seemed to be a majority against it.  I will consider adding it back it in a way that limits root activity to this one task.

I should have the time later today, so I will look into these issues and post a fix.  If you would like to package it, that would be fine.  Before I post the updates, I will see what I can do about having it ready for the international community to translate.

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: TESTING & POLL: Repo speed test GUI
« Reply #34 on: December 13, 2009, 09:54:45 AM »
You're welcome :-) Great idea you have here, it's a very useful script imo. :-)

Yes, I read the comments about installing sources.list as you don't need root to perform the analysis itself - which is true. Only if the user would change anything the root is of course required, fair enough (instead of manually doing this immediately afterwards anyway)

I would suggest a clean-up routine as well, eventually by user request. Perhaps two commandline switches --install=yes --cleanup=yes and default could be off eventually (and see what experience users have with this).

I'll start making a spec :-) but wait for your fix,

cheers,
MBantz

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TESTING & POLL: Repo speed test GUI
« Reply #35 on: December 13, 2009, 10:15:22 AM »
I would suggest a clean-up routine as well, eventually by user request. Perhaps two commandline switches --install=yes --cleanup=yes and default could be off eventually (and see what experience users have with this).

...I like that approach!   ;) :o ;D

My initial thought was that you wanted more dialog boxes asking for these options..  I was a little resistent to the idea as I get sick having to answer endless promps about available options.  I may rewrite a larger part of the script to make use of command line switches for most options, that way we as the users can change the desktop file exec= line to run it in the way we want..  to each his own!

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: TESTING & POLL: Repo speed test GUI
« Reply #36 on: December 13, 2009, 10:25:59 AM »
A couple of comments if I may ....

besides the 'official' mirrors, and also of course the PASS repository, I would have in my sources list some entries which may look like these


file://<some_mount_point>/
http://localhost:<port number>
http://<alias>:<port number>
http://192.168.x.y:<port number>

Should I have any or all of those in my sources list I would certainly not be happy if they were removed.
Most users I should imagine would prefer to use the Synaptic GUI to administer their sources list (if they so choose) rather than edit the file themselves.

If I have previously edited my sources list and reduced the number of entries to mirrors in my locality (for instance) then it would be very useful to know which of those may be having trouble and slowed, so I could drop it down the list.

So, yes, this script I find very useful indeed.
I would even say that I would use it to change my sources list from the mirror selection, but I would never wish it to interfere with my personal entries in the list.

I guess the difficulty is to go through the process and even write the new list, without changing the personal entries in the list.

There are probably several ways to work around the problem ....... such as compare the present list with the official mirror list, and present the differences to the user to allow those entries to be retained.
That would allow the user to retain whatever he wished, while still getting the option to choose a number of the faster mirrors to be ADDED to those retained, at which point the sources list could of course be written anew.

It is that flexibility -  to retain specific entries -  and to choose then from the others, that I think would help those of us with personal entries in the sources list.

The option to write the list could then be presented to the user .... accept or exit the script, and if accept to write the list a request for the root password to allow it to happen.

I realise most of what I have written has already been covered. I did not mean to imply otherwise.
I just wished to suggest a method by which my particular situation might be covered.

regards.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TESTING & POLL: Repo speed test GUI
« Reply #37 on: December 13, 2009, 10:56:04 AM »
A couple of comments if I may ....

besides the 'official' mirrors, and also of course the PASS repository, I would have in my sources list some entries which may look like these


file://<some_mount_point>/
http://localhost:<port number>
http://<alias>:<port number>
http://192.168.x.y:<port number>



The file:/ and localhost urls are already recognized by the script..  recognizing common lan IP ranges also shouldn't be a problem, but the alias is just about impossible to do effectively because it could be just about anything...  The user could alias their networked PC's to be google.com, ibiblio.com, etc..  Having the script make a decision as to which are local and which are not would be difficult and probably slow..  a ping or DNS look up might be able to determine it, but even this is not a guarantee.

Although i know it is not ideal, I would hope that an advanced user that had added such special cases to their sources.list could use the generated repo speed information and simply open a text editor and copy/paste the changes they need.
« Last Edit: December 13, 2009, 02:19:10 PM by travisn000 »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: TESTING & POLL: Repo speed test GUI
« Reply #38 on: December 13, 2009, 11:48:20 AM »
The 'alias' I had in mind would be maybe a computer name as an alias for localhost/127.0.0.1 and such.
Maybe it would be possible to check the entries in /etc/hosts ....
As I said I am not personally much bothered just trying to help.  ;)

Yes of course one would expect a user who had such things set up on their PC to be 'advanced'  -  but they may have received help in doing the set up and not be as advanced as one might imagine.

regards.

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: TESTING & POLL: Repo speed test GUI
« Reply #39 on: December 13, 2009, 05:15:40 PM »
I just updated the script with most all of the issues fixed (it still won't recognize LAN aliases); the download link is on the first post of the thread.

Much of the options can now be specified from console, thereby skipping the GUI dialogs for those options..  if you don't specify them you will still be prompted, but if you do you won't!


..the option to clean up (remove the repo-speed-test directory from the users home directory) is only offered when the switch to enable over-writing of the apt sources.list file is enabled.  It didn't seem that removing the directory made sense unless the changes had already been applied..  if this is not what was requested, let me know.

Also, a bash script that backs up the old sources.list file and copies the new one to overwrite the old one is saved in the repo-speed-test directory,  This allows the user to simply right click the script and select "Run as Root" to apply the changes at a later time.

Code: [Select]
# ..excerpt from --help
Available console options to override default behavior include:.
  -a, -age=<time in days>           Allowed repo age before FAIL
  -n, -number=<number of repos>     Max number of official repos to keep (fastest)
  -s, -sources=<url of file>        Location of official online sources.list
  -t, -timeout=<time in seconds>    Time to start file download before FAIL
  -v, -verbose                      Verbose output for debugging
  -w, -write                        Prompt to write new sources.list to /etc/apt (root password)
  -u, -usage                        Display sample command line usage, help
  -h, -help                         Display this help message
« Last Edit: December 15, 2009, 12:22:34 AM by travisn000 »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: SCRIPT: Repo speed test GUI
« Reply #40 on: December 15, 2009, 12:25:19 AM »
the script attached to the first post has been fixed to work with either kdesu or gksu..  It should now be compatible with the kde & non-kde desktop environments.

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: SCRIPT: Repo speed test GUI
« Reply #41 on: December 15, 2009, 04:09:37 AM »
I'll create a package for it now,

I'll PM you Travis to make sure names and licenses and such are correct,

cheers,
MBantz

EDIT: erw... just updated my VMWare and -don't- update if it's not broke!! Turns out you can't easily install tools with the newest VMWare if you have updated your kernel..
After I have found a solution I'm on it again, will take some time though...
« Last Edit: December 15, 2009, 05:22:47 AM by MBantz »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: SCRIPT: Repo speed test GUI
« Reply #42 on: December 15, 2009, 06:24:15 AM »
There is a vmware how to in the packaging section..  I'm not sure how up to date it is though.
 
Don't sweat the license stuff..  the only reason I put it on there is because I wanted people to know they could do pretty much whatever they wanted with it, with the exception of putting a different (closed) license on it!  ;D

EDIT:  I'm also adding the .pot file to the first post so that others can translate..  
« Last Edit: December 15, 2009, 09:31:03 AM by travisn000 »

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: SCRIPT: Repo speed test GUI
« Reply #43 on: December 15, 2009, 06:32:59 AM »
Thanks Travis,

the how-to in packaging is ok. Issue with vm is that you can't install the tools for the newest vmware player, as the tools need to be compiled with the same gcc as the current kernel (have tried different gcc's with no luck). Solution in the short term is to avoid updating the tools (they appear to work fine although not updated) if you have them installed. I need to reinstall vm with MiniMe and install the new vmware player here, and not update the kernel,

small pebble, big crash....

when I'm back in packaging business I'll get straight to it :-)


Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: SCRIPT: Repo speed test GUI
« Reply #44 on: December 15, 2009, 09:57:02 AM »
To know not only what is the fastest server to load but it quickly down to there are "apt-fast". Did it myself for a long time in use.

http://www.mattparnell.com/projects/apt-fast-and-axel-roughly-26x-faster-apt-get-installations-and-upgrades.html


That is an interesting idea...  Aliasing wget to axel as he mentions seems like a simpler solution than using the script to pre-fetch rpms..  assuming that apt uses wget for downloads..  I did a quick google search and it seems that apt's downloading may be self contained though.

@MBantz..  
I may have some time to package it toward the end of the week if you don't get to it first..  If you already have a spec started, post it and I may get to it quicker!  ;) ;D

.
@Galen

Installing apt-fast should be as easy as installing axel (I don't know if it is in the repos..), then puting the script from the web page link somewhere in your PATH (..most likely /usr/sbin) and make it executable and run as described...  just note that this type of install / upgrade is not officially supported..  The comments on the page mention that they had some problems..  do it at your own peril!  ;D
« Last Edit: December 15, 2009, 10:16:59 AM by travisn000 »