syntax problem with noclean option for rpmdrake urpmi /var/cache/urpmi/rpms
Hello,
I am failing to keep rpms in /var/cache/urpmi/rpms (after install) in Mandriva 2005LE while using the GUI rpmdrake / mandrake update. (I am not using the CLI, not planning to at this stage.) I have tried 3 things so far: In /etc/urpmi/urpmi.cfg I added in the first section inside the {} noclean:1 [edit] I also tried post-clean:0 and post-clean: off [edit] I have seen only one web reference to typing no-clean (I have not tried) man urpmi.cfg is not clear whether one can use a noclean option. It only states that "Control cache management for urpmi, default is only post-clean activated". Anyhow I struggle with the syntax here. Anybody knowing what syntax is ok? I edited bashrc and added alias urpmi="urpmi --noclean" This was still not working, i.e. rpms deleted automatically. [edit] In contrast, I tested the commandline urpmi somepackage does keep the rpms in in the cache [end edit] So I also edited the perl /usr/sbin/urpmi and set (if I remember well) our $noclean=1 (instead of 0 for the default option) I have no luck so far. What am I doing wrong? (the post-clean option is indeed activated, I checked keeping an eye on /var/cache/urpmi/rpms) Thanks. Regards PS: The heavy handed solution of patching rpmdrake http://hulllug.principalhosting.net/...p/t-20990.html |
solved
After doing some more googling http://hulllug.principalhosting.net/...p/t-27490.html I edited /usr/sbin/rpmdrake There was only one occurence of post_clean_cache so it was easy to change the parameter from "1" to "0" I quote from the link above: <<the only way to get the graphical tool to keep the cached RPMs is to patch /usr/sbin/rpmdrake>> <<Note that the urpmi alias only has an effect if you install RPMs using urpmi, that is if you install RPMs on the command line. The graphical tool doesn't use urpmi but the underlying perl module. That is, both urpmi and rpmdrake are frontends to the urpm perl module>> This is all very clear now. Shame I trusted some readings around cleaming that rpmdrake was a front-end to urpmi. Without looking into the code further and from my experience with aliases of urpmi the quote above really does sound true (must be then :-) Hoping this thread will help some other users Some more keywords relevant to this topic: save RPMs installed by urpmi or rpmdrake directory gui Graphical User Interface Mandrake Control Center (MCC) |
thanks!
Thanks for the help!
- great post! |
Thanks for the feedback
By the way once you get use to the command line, rather than drakrpm, urpmi --noclean (in command line is a good one) My posts above were for 2005 limited edition, but I can confirm it still works with mandriva 2006 free. One last thing, if you update your rpms for security/updates, there are sometimes new drakrpm packages (drakxtools usually). Once you have updated drakxtools.rpm (or whatever it is called), do not forget to edit again /usr/sbin/rpmdrake |
Another thanks Emmanuel
Changed rpmdrake However a question - also noted a perl script rpmdrake-remove Has the same constant (post_clean_cache) set to 1 Should this be changed also? Ty |
Quote:
Choose a very small rpms (like unzip or whatever) and do trial and errors (and look at the behaviour) It depends on what you want to achieve rpmdrake-remove is usually not taking the rpm from the cache, anyway. Maybe I am wrong. Note also that when using rpm -e there is the repackage option so you can make an rpm of what your are removing Let us know what your findings are |
mandy2007 mdv2007 mandriva 2007
If you want to keep the cache full then drarpm should look like this (well this is the way I do it for 2007) cat /usr/bin/drakrpm | grep clean update_sources($urpm, noclean => 1, banner => $::isEmbedded); clean_all => 0, post_clean_cache => 0, |
mandriva 2007.1 spring drakrpm perl code
Same problem, now 2007.1, I have not cracked it.
I looked in the drakrpm code and libraries but I have not found where is what and still do not know how to prevent /var/cache/urpmi/rpms from being emptied Any ideas? |
Thereś some tips here from JuniorHacker......
http://www.linuxquestions.org/questi...d.php?t=539887 And I used it till i upgraded to 2007.1, but the file is different now. |
Yes it is different so it does not work.
When starting drakrpm from command line and adding a package the terminal display some messages about removing files (from the cache AFAICrecall) So I tried to grep "removing" from the perl library *.pm in one folder to locate the code, but I must be looking at the wrong place. |
mandriva 2007.1 spring howto keep urpmi cache full
Found a solution:
urpmi -v rgrep rgrep -irl "post_clean_cache" /usr/lib/perl5/* rgrep -irl "removing installed rpms" /usr/lib/perl5/* You find out that this is where the action is /usr/lib/perl5/vendor_perl/5.8.8/urpm/install.pm there comment this line #if (@l == 0 && !$options{test} && $options{post_clean_cache}) { and replace it by if ( 0 ) { Ok not pretty but it works (also I think it forces urpmi not to clean the cache, not only drakrpm) You can play with a small packet like xwininfo (24 kb) for install / removal until it stays in the cache (check with this line: ls -l /var/cache/urpmi/rpms/ |
Thanks dude, I' ll check that out for sure.
Cheers, good work! |
Thanks, works a treat, seems to be fine with both MCC and CLI.
|
All times are GMT -5. The time now is 12:14 AM. |