[SOLVED] Offline upate and keeping packages

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Offline upate and keeping packages

Postby claudecat » Aug 22nd, '12, 22:47

Ok, I've searched a bit and learned a bit, but haven't achieved my goal. I have 2 machines with near identical installs of Mageia 2 and I need to keep both updated. I'm trying to figure out how to avoid downloading all the updates twice. I know that from the command line I can add --noclean to urpmi --auto-update to have the packages saved to /var/cache/urpmi/rpms. I did this and then transferred the files to the other machine but it appears to ignore them, claiming it wants to grab 155mb of updates. Am I missing something?

Also, is there something I can put in my /etc/urpmi/urpmi.cfg so that it will always default to --noclean? I tried adding { post-clean: 0 } and that did not work... I saw the files briefly, but they were removed as usual upon install.

This entire process is SO much easier on other distros, and I find urpmi from the command line rather confusing, but I do like Mageia and would like to continue to use it. If I can't figure this out I may have to give it up. Any help would be much appreciated!
Last edited by claudecat on Aug 23rd, '12, 07:10, edited 1 time in total.
claudecat
 
Posts: 4
Joined: Jun 3rd, '12, 03:32

Re: Offline upate and keeping packages

Postby tom_ » Aug 23rd, '12, 00:07

Welcome on Mageia, claudecat :)

claudecat wrote:I did this and then transferred the files to the other machine but it appears to ignore them, claiming it wants to grab 155mb of updates. Am I missing something?


have you seen if it really redownloads the files?
it could be just an information

claudecat wrote:Also, is there something I can put in my /etc/urpmi/urpmi.cfg so that it will always default to --noclean?


you can create a new command for that, using alias:

alias claudecat_urpmi='urpmi --noclean'

ehmmm.. better if you find a shorter name :?

to have that command defined on each session you can add that line to the file /root/.bashrc

use
Code: Select all
man alias

to have more details about the alias command
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: Offline upate and keeping packages

Postby ah7013 » Aug 23rd, '12, 03:48

claudecat wrote:Also, is there something I can put in my /etc/urpmi/urpmi.cfg so that it will always default to --noclean? I tried adding { post-clean: 0 } and that did not work... I saw the files briefly, but they were removed as usual upon install.


Adding "post-clean: 0" should work. I did try it here and it worked fine. Could you post the output of
Code: Select all
head /etc/urpmi/urpmi.cfg

with the post-clean option added? It should be in between the top two curly brackets e.g:
Code: Select all
[andrew@localhost ~]$ head /etc/urpmi/urpmi.cfg
{
post-clean: 0
}

Core\ Release http://repo.home.local/mageia/distrib/2/x86_64/media/core/release {
  key-ids: 80420f66
}

Core\ Release\ Debug http://repo.home.local/mageia/distrib/2/x86_64/media/debug/core/release {
  ignore
Mageia 2 x86_64, KDE 4.8.5 on a Thinkpad Edge E520 - Intel Core i7-2640M 2.8GHZ, 16GB DDR3 RAM 1333MHz
Mageia 2 x86_64, KDE 4.8.5 on a Dell Studio 1555 - Intel Core 2 Duo T6600 2.2GHz, 8GB DDR2 RAM 800MHz
User avatar
ah7013
 
Posts: 74
Joined: Apr 9th, '11, 05:02
Location: Adelaide, Australia

Re: Offline upate and keeping packages

Postby claudecat » Aug 23rd, '12, 05:15

Thanks for the responses.

ah: the post-clean: 0 is now working after a reboot. Strange that it did not work immediately upon editing the file. Anyway, that's sorted.

What is still a mystery is that even after putting all the updates in /var/cache/urpmi/rpms on the second (not yet updated) machine, urpmi --auto-update claims it needs to download 155mb of updates. And yes, it WILL download them rather than using the cached ones (I let it do it's thing briefly to make sure). These were 2 installs done exactly the same way (accepting all defaults - no custom package selection) from the dvd - the only difference is in graphics cards (one nvidia, one amd - both using the free drivers). For some reason urpmi is just not seeing the stuff in /var/cache/urpmi/rpms. Why?!? Again, this is really simple in deb-based distros, Arch, Fedora, even Slackware. Why is urpmi so reluctant to use cached packages? Or am I just missing something?
claudecat
 
Posts: 4
Joined: Jun 3rd, '12, 03:32

Re: Offline upate and keeping packages

Postby claudecat » Aug 23rd, '12, 07:03

Well, I'm an idiot... in all my flailing around trying to solve this I didn't notice that half of the updates I had copied via a flash drive had been corrupted into zero-length files along the way. Tried again with a different flash drive and now all is working as expected (both machines fully updated). I'm not sure it was necessary, but I ended up creating a "custom medium" pointing at /var/cache/urpmi/rpms. Would it have worked without that step?

Sorry for wasting your time and thanks again for the help!
claudecat
 
Posts: 4
Joined: Jun 3rd, '12, 03:32

Re: Offline upate and keeping packages

Postby Ken-Bergen » Aug 23rd, '12, 07:20

claudecat wrote:I'm not sure it was necessary, but I ended up creating a "custom medium" pointing at /var/cache/urpmi/rpms. Would it have worked without that step?

Sorry for wasting your time and thanks again for the help!
Unless you create a hdlist for the media in /var/cache/urpmi/rpms it will be ignored as a medium but the files therein will be used as if they were downloaded.

If you or anyone else learned something from this it wasn't a waste of time but a learning experience.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: [SOLVED] Offline upate and keeping packages

Postby doktor5000 » Aug 23rd, '12, 22:30

You may want to have a look at https://wiki.mageia.org/en/Urpmi-proxy
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest