LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-02-2005, 03:00 AM   #1
Emmanuel_uk
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: Reputation: 53
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.
 
Old 08-03-2005, 08:03 AM   #2
Emmanuel_uk
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: Reputation: 53
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.
 
Old 08-04-2006, 08:25 PM   #3
jimihendrixhewasgood
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
thanks!

Thanks for the help!
- great post!
 
Old 08-06-2006, 09:07 AM   #4
Emmanuel_uk
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: Reputation: 53
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
 
Old 08-16-2006, 06:57 AM   #5
tytower
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: Reputation: 30
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.
 
Old 08-16-2006, 07:14 AM   #6
Emmanuel_uk
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: Reputation: 53
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
 
Old 10-25-2006, 04:08 PM   #7
Emmanuel_uk
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: Reputation: 53
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,
 
Old 05-01-2007, 08:25 AM   #8
Emmanuel_uk
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: Reputation: 53
Question 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?
 
Old 05-01-2007, 09:07 PM   #9
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,686
Blog Entries: 33

Rep: Reputation: 288Reputation: 288Reputation: 288
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.
 
Old 05-02-2007, 02:21 AM   #10
Emmanuel_uk
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: Reputation: 53
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.
 
Old 05-06-2007, 06:52 AM   #11
Emmanuel_uk
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: Reputation: 53
Smile 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.
 
Old 05-06-2007, 08:38 AM   #12
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,686
Blog Entries: 33

Rep: Reputation: 288Reputation: 288Reputation: 288
Thanks dude, I' ll check that out for sure.

Cheers, good work!
 
Old 05-06-2007, 08:29 PM   #13
jagwah
LQ Newbie
 
Registered: Jun 2006
Location: Australia
Distribution: SimplyMEPIS 8.0, debian 5.0
Posts: 22

Rep: Reputation: 15
Thumbs up

Thanks, works a treat, seems to be fine with both MCC and CLI.
 
  


Reply

Tags
gui, urpmi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPMDrake + Urpmi VincentB Fedora 2 01-13-2005 02:36 PM
rpmdrake/urpmi install both fail with errors. Slovak Mandriva 3 11-06-2004 10:10 PM
RPMDrake or URPMI Dirty_Ink Mandriva 4 07-28-2004 04:43 PM
Does any one use URPMI/RPMDRAKE? brew1brew Mandriva 3 10-06-2003 09:20 PM
empty /var/cache/urpmi/rpms ??? christophe.dr Linux - Software 1 10-03-2003 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 10:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration