syntax problem with noclean option for rpmdrake urpmi /var/cache/urpmi/rpms
MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Rep:
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)
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)
Last edited by Emmanuel_uk; 08-04-2005 at 01:14 AM.
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
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
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
Quote:
Has the same constant (post_clean_cache) set to 1
Should this be changed also?
I do not know. Good question.
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
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
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
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
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.
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
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/
Last edited by Emmanuel_uk; 05-06-2007 at 05:56 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.