LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mirror slackware current script failing (https://www.linuxquestions.org/questions/slackware-14/mirror-slackware-current-script-failing-4175417443/)

vdemuth 07-18-2012 02:47 PM

mirror slackware current script failing
 
Hoping Eric picks this up. I am using the mirror-slackware-current script as so:-

Quote:

Mirroring slackware64-current from rsync.osuosl.org::slackware/slackware64-current
While it was running my laptop threw one and crashed. I think it's got it in for me :)

Anyway, resumed with the -f switch, and saved the current (18th july) to my local HD.

Trouble is, when running slackpkg upgrade-all, nothing is upgraded.

I have checked the directories, i.e. //home/ftp/pub/Linux/Slackware/slackware64-current/blah-blah and the latest updates have been downloaded OK, but slackpkg doesn't see them.

I thought, fine, some problem with the download, so I went through the process again, including using the -f switch as shown here:-

Code:

Changing to /home/ftp/pub/Linux/Slackware/slackware64-current ...
Wed Jul 18 20:38:44 BST 2012 [15040]: Getting ChangeLog.txt...
Wed Jul 18 20:38:46 BST 2012 [15040]: No difference found, continuing anyway...
*** Using rsync.osuosl.org::slackware/slackware64-current ***
Wed Jul 18 20:38:55 BST 2012 [15040]: Done mirroring slackware64-current (exit code 0).
Wed Jul 18 20:38:55 BST 2012 [15040]: Creating CDROM ISO images for slackware64-current...
Wed Jul 18 20:39:12 BST 2012 [15040]: First CDROM ISO created (exit code 0) - two to go ...
Wed Jul 18 20:39:37 BST 2012 [15040]: Second CDROM ISO created (exit code 0) - one to go ...
Wed Jul 18 20:40:10 BST 2012 [15040]: CDROM ISO's created of slackware64-current.
Wed Jul 18 20:40:10 BST 2012 [15040]: The combined exit code for ISO creation is '0'. A a non-zero number here means: something goofed along the way.
Wed Jul 18 20:40:10 BST 2012 [15040]: Computing MD5 checksums of the ISO's (time consuming).
Wed Jul 18 20:40:48 BST 2012 [15040]: Resulting ISO files:
-rw-r--r-- 1 root root 686125056 Jul 18 20:39 /home/ftp/pub/Linux/Slackware/slackware64-current-iso/slackware64-current-install1.iso
-rw-r--r-- 1 root root 550055936 Jul 18 20:39 /home/ftp/pub/Linux/Slackware/slackware64-current-iso/slackware64-current-install2.iso
-rw-r--r-- 1 root root 608284672 Jul 18 20:40 /home/ftp/pub/Linux/Slackware/slackware64-current-iso/slackware64-current-install3.iso
Wed Jul 18 20:40:48 BST 2012 [15040]: Done!

As can be seen, all that happens is the iso are recreated, but the packages are not re-downloaded as I thought they should be.

How do I get the downloaded updates to install?

TobiSGD 07-18-2012 02:56 PM

It is not quite clear to me what you want to achieve. Do you want slackpkg to update your installed system from the mirror you created?

samac 07-18-2012 04:00 PM

Did you run slackpkg update first?

samac

NightSky 07-18-2012 05:02 PM

Exactly what directory have you to created to place your local mirror, where did you place it on your system, what is the path to your local mirror?

vdemuth 07-19-2012 12:09 AM

Have used this method for the past 6 months or so, so the script used to work correctly. All updates are saved to
Quote:

//home/ftp/pub/Linux/Slackware/slackware64-current/blah-blah
Run the usual
Quote:

slackpkg update/install-new/upgrade-all
and it has been fine for 6 months. But since the laptop crashed during the rsync phase of downloading the latest updates, then the script seems not to be able to recover from that crash.

Any more suggestions?

willysr 07-19-2012 01:53 AM

try switching to rsync_current.sh to make sure your repository is up to date with the official repository

vdemuth 07-19-2012 02:42 PM

OK,
turns out the changelog.txt file got corrupted. Deleted it and all is well again. But as a suggestion to Eric if he happens to read this thread. And I don't know how feasable it would be as I have no idea about programming. But would it be possible to somehow have the script write a progress log as it's going along, so if it is interrupted for some reason, it could pick up where it left of. Or is that what the -f switch is meant to do and I've just been caught out?

TobiSGD 07-19-2012 03:18 PM

The script is using rsync, so it should anyways start from where it was interrupted, if I am not wrong.

Alien Bob 07-25-2012 01:56 PM

Quote:

Originally Posted by vdemuth (Post 4733000)
Or is that what the -f switch is meant to do and I've just been caught out?

Indeed.

Eric

vdemuth 07-25-2012 02:02 PM

Quote:

Originally Posted by Alien Bob (Post 4737871)
Indeed.

Eric

What? Indeed it should carry on where it left off, or I have been caught out and misunderstood it's meaning.

Alien Bob 07-25-2012 02:19 PM

Quote:

Originally Posted by vdemuth (Post 4737874)
What? Indeed it should carry on where it left off, or I have been caught out and misunderstood it's meaning.

The "-f" parameter means "force a re-sync even if it appears the local copy of ChangeLog.txt is identical to the remote original".

You have to realize that the mirror-slackware-current.sh script tries to be friendly to mirror servers - instead of just starting a full re-sync the script will initially only download the ChangeLog.txt file and check for differences to the version you already have locally. If no difference is detected, the script assumes that you already have a full local mirror copy of Slackware. In the case of an aborted sync attempt, your local ChangeLog.txt will usually be identical to the original and running the script again - with the same parameters - will not give the desired effect. That is when you add "-f" to force a re-sync. Because the script uses rsync for the synchronization of your local mirror to the remote original, the script is able to continue downloading right where you aborted it before. Only the file for which a download was in progress, will have to be downloaded in full again.

Eric

vdemuth 07-26-2012 12:03 AM

Thanks, that clears that up.

I don't suppose you had considered, (or maybe would consider) some sort of prompt asking the user if they maybe wanted to backup their 'current' current as opposed to the 'yet to be synced' current to allow some sort of roll back.

I do that now as a result of the broken mirroring I experienced by using the backintime utility, but it would be so much better if it were built into your script.

If I knew anything at all about programming I would have ago for myself, but unfortunately that's not to be.

Alien Bob 07-26-2012 02:48 AM

I understand what you mean, but I will not add that functionality to the script. If you think you may need an older version of Slackware-current package tree just to be safe, you have to create that backup copy yourself.

Eric

vdemuth 07-26-2012 10:54 AM

No problem.

It was worth the ask. Just don't pinch the idea in a years time;)


All times are GMT -5. The time now is 05:56 PM.