Mandriva This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-02-2005, 03:00 AM
|
#1
|
Senior Member
Registered: Nov 2004
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)
Thanks. Regards
PS: The heavy handed solution of patching rpmdrake
http://hulllug.principalhosting.net/...p/t-20990.html
Last edited by Emmanuel_uk; 08-03-2005 at 07:46 AM.
|
|
|
08-03-2005, 08:03 AM
|
#2
|
Senior Member
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
|
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)
Last edited by Emmanuel_uk; 08-04-2005 at 02:14 AM.
|
|
|
08-04-2006, 08:25 PM
|
#3
|
LQ Newbie
Registered: Aug 2006
Posts: 2
Rep:
|
thanks!
Thanks for the help!
- great post!
|
|
|
08-06-2006, 09:07 AM
|
#4
|
Senior Member
Registered: Nov 2004
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
|
|
|
08-16-2006, 06:57 AM
|
#5
|
Member
Registered: Jun 2006
Location: Oz
Distribution: Mandriva 10.0,10.1,10.2,2006,Mepis 6.0,Opensuse10.2,Puppy 2.14
Posts: 250
Rep:
|
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
Last edited by tytower; 08-16-2006 at 06:58 AM.
|
|
|
08-16-2006, 07:14 AM
|
#6
|
Senior Member
Registered: Nov 2004
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
Let us know what your findings are
|
|
|
10-25-2006, 04:08 PM
|
#7
|
Senior Member
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Original Poster
Rep:
|
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,
|
|
|
05-01-2007, 08:25 AM
|
#8
|
Senior Member
Registered: Nov 2004
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
Any ideas?
|
|
|
05-01-2007, 09:07 PM
|
#9
|
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,686
|
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.
|
|
|
05-02-2007, 02:21 AM
|
#10
|
Senior Member
Registered: Nov 2004
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.
|
|
|
05-06-2007, 06:52 AM
|
#11
|
Senior Member
Registered: Nov 2004
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 06:56 AM.
|
|
|
05-06-2007, 08:38 AM
|
#12
|
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,686
|
Thanks dude, I' ll check that out for sure.
Cheers, good work!
|
|
|
05-06-2007, 08:29 PM
|
#13
|
LQ Newbie
Registered: Jun 2006
Location: Australia
Distribution: SimplyMEPIS 8.0, debian 5.0
Posts: 22
Rep:
|
Thanks, works a treat, seems to be fine with both MCC and CLI.
|
|
|
All times are GMT -5. The time now is 10:35 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.
|
Latest Threads
LQ News
|
|