Author Topic: Testing updated synaptic-repair  (Read 3870 times)

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Testing updated synaptic-repair
« on: October 10, 2009, 03:32:44 PM »
Thanks Joble..  I got DropBox up and connected only to see that you beat me too it!

I also fixed synaptic-repair this morning and sent it up.. its now a little smarter in that it will download an updated sources.list,  detect kde3 vs. kde4 for repo sections, and copy any existing local repo and pass repo entries from the old sources list to the new one.

Don_crissti over at linuxgator.org just gave me some bash code to work with for testing repo download speeds.   When I get back from vacation I will update synaptic-repair again so that it gives the user an option to automatically pick the fastest repo for their location.

 ;D

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Testing updated synaptic-repair
« Reply #1 on: October 27, 2009, 10:41:09 AM »
Don_crissti over at linuxgator.org just gave me some bash code to work with for testing repo download speeds.   When I get back from vacation I will update synaptic-repair again so that it gives the user an option to automatically pick the fastest repo for their location.

 ;D



With Don crissti's help, I was able to update synaptic-repair so that in the process of rebuilding the source.list file, it will now also accept a user determined acceptable age for a repo sync and then perform the speed test against all repos that meet the age criteria.  The script then presents an ordered list (slowest to fastest) of up to date repos, the user then selects the repo they would like to use, and synaptic-repair then builds a new sources.list with the user selected repo set as default and all other up to date repo's disabled (..out-of-date and non-responding repos are removed from the sources.list file).  

Also by user request, PASS and local repo's are preserved (but temporarily disabled), and the user is also now given the option of wether or not to rebuild the RPM database and clean the RPM cache (these were forced previously).   The script finishes up by automatically updating the package lists (apt-get update), fixing any broken packages, running a full update, and then giving you the option to launch synaptic.

Anybody wishing to test the updated synaptic-repair script with integrated speed test can find it here:

http://linuxgator.org/forums/viewtopic.php?f=15&t=1719&p=12016#p12016

Don's new Perl script is also in that thread.  

At some point I will look into creating a basic GUI version (using bash & zenity) for just the repo test / sources.list update, but until then..

..test away!  ;D
« Last Edit: October 27, 2009, 10:47:04 AM by travisn000 »

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #2 on: October 28, 2009, 10:13:38 AM »
I went to run the latest script that had been posted and here is what I get. Thought someone should know

./update-sourcelist.sh: line 110: syntax error near unexpected token `('
./update-sourcelist.sh: line 110: `    if [ "\$(yorn y "Would you like to rebuild the RPM Database? (..this may take a while!) [Y/n] ")" = "Y" ]; then'




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Testing updated synaptic-repair
« Reply #3 on: October 28, 2009, 08:44:04 PM »
..something may have been broken by the copy & paste (line breaks, etc); try the attached file.

[attachment deleted by admin]

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #4 on: October 29, 2009, 12:54:50 AM »
..something may have been broken by the copy & paste (line breaks, etc); try the attached file.


It appears to be running just fine now. This is the results I got

PCLinuxOS official repositories:
(ordered by speed-test results, fastest at the bottom)


  0) http://ftp.kddlabs.co.jp
  1) http://ftp.leg.uct.ac.za
  2) http://mirror.pclinuxclub.com
  3) ftp://ftp.tu-chemnitz.de
  4) http://www.mirror.in.th
  5) ftp://mirror.aarnet.edu.au
  6) ftp://ftp.pbone.net
  7) http://gnustep.ethz.ch
  8) http://ftp.jaist.ac.jp
  9) http://na.mirror.garr.it
  10) http://ftp.belnet.be
  11) http://ftp.ch.debian.org
  12) http://debian.ethz.ch
  13) http://mirror.internode.on.net
  14) http://mirrors.lastdot.org:1280
  15) http://ftp.riken.go.jp
  16) http://gnupg.cdpa.nsysu.edu.tw
  17) http://ftp.twaren.net
  18) http://distrib-coffee.ipsl.jussieu.fr
  19) http://ftp.heanet.ie
  20) http://ftp.uwsg.indiana.edu
  21) http://spout.ussg.indiana.edu
  22) http://ftp.ussg.iu.edu
  23) http://distro.ibiblio.org
  24) http://pclosusers.com

Thanks travisn000 for looking into it.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Testing updated synaptic-repair
« Reply #5 on: October 29, 2009, 06:15:41 AM »
Out of curiosity, how many days old did you allow your repositories to be?  I only ask because I get 32 "good" repos when I run it allowing for a 10 day old sync, and I am only about 40 miles away from you.

(pclosusers is still the fastest!)  ;D

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #6 on: October 29, 2009, 08:35:49 PM »
I set mine for 5 days. Anything that is older than 10 days to me is worthless. 10 days is also pushing it, I think.
« Last Edit: October 29, 2009, 08:37:24 PM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Testing updated synaptic-repair
« Reply #7 on: October 30, 2009, 09:03:30 AM »
After I posted that question I realized that I could probably just read the date from the package list I download from ibiblio and use that as a standard..  require that other repo's have package lists that are within a day or week of ibiblio before considering them "good".

Do you think it is better to let the user pick an age, or should it be more automated?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #8 on: October 30, 2009, 04:37:42 PM »
After I posted that question I realized that I could probably just read the date from the package list I download from ibiblio and use that as a standard..  require that other repo's have package lists that are within a day or week of ibiblio before considering them "good".

Do you think it is better to let the user pick an age, or should it be more automated?

Personally I would rather it to be as fresh as possible. I think it would avoid lots of potential issues that may or could be caused by repositories that are way out of sync.  As for wither it should be more automated. I think it would be a good thing, but I am more than sure there are those who would disagree.  I think one has to weight the pros and cons to having to manually select the dates versus having it automatically set.  I think for simplicity it should be set automatically.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Testing updated synaptic-repair
« Reply #9 on: October 30, 2009, 05:20:25 PM »
After I posted that question I realized that I could probably just read the date from the package list I download from ibiblio and use that as a standard..  require that other repo's have package lists that are within a day or week of ibiblio before considering them "good".

Do you think it is better to let the user pick an age, or should it be more automated?

Personally I would rather it to be as fresh as possible. I think it would avoid lots of potential issues that may or could be caused by repositories that are way out of sync.  As for wither it should be more automated. I think it would be a good thing, but I am more than sure there are those who would disagree.  I think one has to weight the pros and cons to having to manually select the dates versus having it automatically set.  I think for simplicity it should be set automatically.

+1


Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: Testing updated synaptic-repair
« Reply #10 on: October 30, 2009, 05:58:52 PM »
in about the middle of the script is a test for KDE4:
Code: [Select]
if [ -d /usr/share/kde4 ]; then now I wonder about the following situation: imagine a user has installed KDE4 but then decided to go back to KDE3. I'm not sure but I think in this case the directory /usr/share/kde4 would still be there although a KDE3 desktop is in use. The script is still fine because the user can answer the following dialog appropriately but maybe a safer test for a KDE4 desktop could be to test for the kdebase4 rpm?
Code: [Select]
if [ `rpm -qa kdebase4|wc -l` -gt 0 ];then just a thought...
regards,
-p.

 


Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Testing updated synaptic-repair
« Reply #11 on: October 30, 2009, 06:07:42 PM »
pinoc-  that is a good suggestion, I will add it into the script.


regarding the repo age..

If I take the timestamp from the ibiblio package lists and add 1-2 days that should account for any delays between ibiblio updates and the remote server's scheduled sync time on a given day, as well as differences in time-zone, but should I account for additional time for repo's that may not sync on a daily basis?

I've read somewhere that pclosusers syncs twice a day..  Does anyone know if most other repos sync on a daily basis, weekly basis, etc ??

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #12 on: October 30, 2009, 06:19:51 PM »
pinoc-  that is a good suggestion, I will add it into the script.


regarding the repo age..

If I take the timestamp from the ibiblio package lists and add 1-2 days that should account for any delays between ibiblio updates and the remote server's scheduled sync time on a given day, as well as differences in time-zone, but should I account for additional time for repo's that may not sync on a daily basis?

I've read somewhere that pclosusers syncs twice a day..  Does anyone know if most other repos sync on a daily basis, weekly basis, etc ??

FWIW, I sync the (pclosusers.com) repo 3 times a day at 6am - 2pm and 10pm PST




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Testing updated synaptic-repair
« Reply #13 on: October 30, 2009, 08:34:45 PM »
I just noticed something that is a wee small issue when running the synaptic-repair script.

When it list the repo list after the speed test and ask you to choose your repo. The problem if you select anything below the number 10 it just keeps asking your to select a repo.  If you select 10 or greater than it proceeds to activate your choice.

Choose a repo to make active [0-27] 8
Choose a repo to make active [0-27] 6
Choose a repo to make active [0-27] 7
Choose a repo to make active [0-27] 9
Choose a repo to make active [0-27] 10

  Activating http://ftp.sh.cvut.cz/MIRRORS/pclinuxos/apt/

Just thought you might want to know.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2843
    • other projects...
Re: Testing updated synaptic-repair
« Reply #14 on: October 31, 2009, 03:43:06 AM »
pinoc-  that is a good suggestion, I will add it into the script.

travis, something which only occurred to me later...  ::)
after testing for the kdebase4 rpm we know for sure to have either a KDE4 or a KDE3 install, since there are mutually exclusive. At that point the dialog " You appear to have the KDE4 desktop..." is redundant and probably better to remove completely in order to avoid people not reading the message properly and eventually even clicking the wrong button...