Jump to content

Urpmi [solved]


Recommended Posts

I wanted to have a go of freemind, a mind-mapping tool written in java. As with other java stuff, the dependency stuff gets a bit complicated because my java isn't installed via rpm, it's installed manually from blackdown. So what to do now?

I try "urpmi freemind" and it asks me whether I want classpathx-jaf or geronimo-jaf. Actually I don't want either, but whichever I choose it wants to install a raft of other stuff (bouncycastle, gcj-tools, java-gcj-compat, jpackage, libgcj-devel, ..) totalling 50 MB. There must be an easier way. So I tried "urpmi --force freemind" thinking that it would force the install without the dependencies. But apparently it doesn't do that at all, it just doesn't check for a Y/n and goes ahead. I also tried "urpmi --allow-nodeps freemind" thinking that it would allow me to install with no deps but also no. I thought it was something like that which told urpmi to ignore the errors and just go ahead anyway, I'm sure I've read that here on mub I've just never had to try it before.

So my question is:

Can I install package X ignoring the dependencies on packages Y and Z, and if so how?

But now I'm looking more closely at this package and seeing whether it really does need this other stuff. I can see from rpm.pbone.net that it's got a jar inside, which looks like all I need, but I'm curious if I can get this information from Mandriva itself rather than from a website. Can I do something with urpmq to get the package information? (maybe pbone.net is offline, maybe the info there is outdated or for some reason doesn't match what my repositories say).

I tried "urpmq -l freemind" but it just said "no hdlist for medium contrib" (I use synthesis.hdlist) and gave no info. But it knows exactly where the package is, it could download it to the rpm cache and extract the information from there, couldn't it? Or isn't there some way to get the repository to extract the relevant info out of the hdlist file? I also tried "rpm -ql freemind" but that only works on packages which are already installed..

As a last resort I thought I could just download the freemind rpm, then do "urpmq -l freemind-0.xxx.rpm" but when I tried to just download it with "urpmi --no-install --allow-nodeps freemind" it still wants to download all the other packages as well! Arg!

So as a last last resort I allowed the urpmi to start, so it spat out the url of the freemind rpm. Then after a Ctrl-C to cancel it, using copy-paste I did a "wget ftp://....freemind-0.xxx.rpm" and then did a "urpmq -l freemind-0.xxx.rpm" and I could finally see the list of files inside the rpm.

Second question:

Is there an easier way to interrogate what's inside an rpm or get a full description of what an rpm is, if you're only using synthesis.hdlists?

Apologies in advance but there's a third bit. Now I've finally got the rpm, now I'd like to see what's in the jar. But I've no clue if it's even possible, I can't see any obvious options in rpm or urpmi. But I guess it must be possible to extract single files, right?

Is it possible to extract a file or files out of an rpm without installing it?

Thanks for any help - and sorry if these are answered elsewhere but I couldn't find any threads answering these questions... :unsure:

 

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

You can use urpmf, for example:

 

urpmf --name freemind

 

to find the package, and the urpmq command can interrogate so:

 

urpmq -i freemind

 

should give package info.

 

EDIT:

 

Maybe rpm2targz will do it, and then you could extract it.

Link to comment
Share on other sites

try rpm -i --nodps (maybe without internet connection)
Without an internet connection? But rpm can't go and get the file from the repository, that's why I was using urpmi.

 

the urpmq command can interrogate so:
urpmq -i freemind

should give package info.

But that's what I wrote above, it can't give info if I'm using the synthesis lists, that info has been stripped out. I'd like it to go and get the rpm and get the info out of there. Or query my repository to extract just that info from the hdlist file.
Link to comment
Share on other sites

1. From man urpmi:

 

--allow-nodeps

With this option, urpmi will ask the user on error whether it should

continue the installation without checking dependencies. By default,

urpmi exits immediately in this case.

 

2. So far as I know the description is only available from the hdlist file

 

3. Use the following procedure to extract the contents of an RPM package (cribbed from another post, I don't remember where):

 

rpm2cpio package.rpm | cpio -dimv

 

As the name implies, rpm2cpio takes an RPM package file and converts it to a cpio archive. The -i flag to the cpio command indicates that cpio is reading in the archive to extract files, and the -d flag tells cpio to construct directories as necessary. The -v flag tells cpio to list file names as files are extracted, and the -m flag tells cpio to retain previous file modification times when creating files.

 

Jim

Link to comment
Share on other sites

I did both.

# urpmq -i freemind
no hdlist for medium "Contrib Updates (Official2007.1-6)", only partial result for package freemind

Then it gives basic info like name and version number, but not the meat, like description or file list. I guess Mandriva expects everyone to use the hdlists all the time. Shouldn't be too hard to offer that info as a query service though, I'd have thought.

 

I tried rpm2targz, and got this:

$ rpm2targz
bash: rpm2targz: command not found
$ urpmq rpm2targz
No package named rpm2targz

So I checked rpm.pbone.net, and he said "Your search rpm2targz did not match any entry in database."

 

Re: rpm2cpio, thanks Jim I'll look at that. :) I'm not quite sure what you meant by your first answer, I've read the man and --allow-nodeps doesn't stop the dependencies being installed if there is no error. (contrary to what I originally thought it would do)

Link to comment
Share on other sites

Yeah, unfortunately, the synthesis lists don't have a lot of info, but should provide basic package info. I find using hdlists is better with rsync, then you just download updates to it, rather than the whole list each time you sync urpmi.

 

If rpm2targz is not available as an rpm, you could always use the source :)

Link to comment
Share on other sites

manually download the package from a repo ;)
Thanks ffi, that's brilliant advice, and is what I did in the end anyway. I was kind of hoping that my whizzy urpmi tool (which already knows where the repositories are and which packages are in which repositories) would save me a manual download. Urpmi has already got a boatload of options, so I figured this would be one of them :/

 

Yeah, unfortunately, the synthesis lists don't have a lot of info, but should provide basic package info.
They do, but once again I'd like to get the full info including file lists.

 

I find using hdlists is better with rsync, then you just download updates to it, rather than the whole list each time you sync urpmi.
Umm... I thought rsync always copied whole files, no? So if any part of a hdlist file has changed, then the whole file will be transferred. Which is the same as what urpmi does with all lists, whether http or ftp or whatever, it checks the checksum first and then only gets the file if it's changed.

 

Thanks again Jim for the rpm2cpio thingy, that worked a treat. Once you know what to search for, then it comes up in other places in mub too, I just didn't see it before. But it worked fine, I extracted all the files and then with a simple "jar -jar freemind.jar" then it all runs fine without the 50MB download! :thumbs:

Link to comment
Share on other sites

Thanks ffi, that's brilliant advice, and is what I did in the end anyway. I was kind of hoping that my whizzy urpmi tool (which already knows where the repositories are and which packages are in which repositories) would save me a manual download. Urpmi has already got a boatload of options, so I figured this would be one of them :/

I believe the whole point of urpmi, over rpm, is finding those depencies for you ;) but be thankful you are on on urpmi, apt would refuse to anything untill you had either uninstalled the app or satisfied the deps...

Edited by ffi
Link to comment
Share on other sites

I believe the whole point of urpmi, over rpm, is finding those depencies for you ;) but be thankful you are on on urpmi, apt would refuse to anything untill you had either uninstalled the app or satisfied the deps...

So what? This is the way apt works. You can STILL install anything you like in that system going one level down, by a simple "dpkg -i foo".

Like it or not, Debian's package management is by far the most advanced out there- the only regression is that building stray deb packages is very easy, but build of structured deb packages is as complex as with rpm ones...

Link to comment
Share on other sites

So what? This is the way apt works. You can STILL install anything you like in that system going one level down, by a simple "dpkg -i foo".

Like it or not, Debian's package management is by far the most advanced out there- the only regression is that building stray deb packages is very easy, but build of structured deb packages is as complex as with rpm ones...

yes off course you can but try to use apt again, you won't be able to untill you resolve the "broken" packages......I know it should just be just a matter of disabling a checkin apt but none the less it is very very annoying, but I decide when something is broken not the package manager and I decide if I want to continue not the package manager....

Link to comment
Share on other sites

Thanks ffi, that's brilliant advice, and is what I did in the end anyway. I was kind of hoping that my whizzy urpmi tool (which already knows where the repositories are and which packages are in which repositories) would save me a manual download. Urpmi has already got a boatload of options, so I figured this would be one of them :/

 

It does:

urpmi --no-install freemind

 

or if that fails:

wget $(urpmq --sources freemind)

Link to comment
Share on other sites

It does:

urpmi --no-install freemind

I guess you didn't read my original post above then. I wanted to download just that rpm without the other 50MB of stuff which urpmi wanted to download as well.

 

The --sources option for urpmq is good info though, thanks. That's much better than ctrl-c'ing the download and copy-pasting the url.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...