PDA

View Full Version : RPM-Support broken in 3.2.4?


chrroe
14-Mar-2011, 07:47 AM
Hi,

I wanted to update BC from version 3.1.4 to 3.2.4 on a SLES 10 SP2 32-bit machine. Everything went fine until the point when I tried to open an RPM-Archive.
In the Log pane an error is displayed:

Unable to load xxx.rpm: List index out of bounds (4)

I tried several RPM files but even the bcompare-3.2.4.13298.i386.rpm makes BC throw that error. Actually I'm not able to open any RPM-file.

Under version 3.1.4 everything works as expected.

Can anyone reproduce that?

Bye
Christoph

David
14-Mar-2011, 08:10 AM
Christoph,

I am able to repeat this error. However, I only see it on the first attempt to open a rpm. When I attempt to open the file again, it opens with no problems.

Can you see if trying to open again works for you? Meanwhile I will track down why the error is occurring on the first attempt.

Thanks

David Jenkins
Scooter Software

chrroe
14-Mar-2011, 09:13 AM
Hello David,

thanks for that light-speed response. Reopening the files seems to be a half-way work-around.
Notice: The RPMs I want to compare are all in the same folder, so I use the folder viewer with right pane empty to select the files.

When I select two RPM files with the mouse and use the context menu to choose "Open in New View" the error persists, even using the Retry button in the "Folder Not Available" dialog.

What works is:
Select the first RPM, then press F7 (Compare To...) and then select the second RPM.

BTW:
Can you figure out which the last working version of BC was in the meantime?

Bye
Christoph

David
14-Mar-2011, 10:18 AM
Christoph,

I have corrected the error that I am seeing here locally. We do a shell command to query the rpm and then parse the results. For some reason on the first open there is an additional empty line that comes back from the shell command. I have added code to watch for the empty string.

However, the code that does the parsing has not changed much since the original rpm handling code was put it. I had to go all the way back to version 3.1.2 to find a version that didn't show the error on my build distro.

I do not see any obvious code changes from 3.1.2 to 3.1.3 that ought to cause this. Nor is it something that has been noticed here in previous testing. I am thinking that it is some subtle behavior between BC and the shell that causes the empty string to show up i.e. there might not be a specific version of BC where it shows up on all linux distros.

So assuming that we are seeing the same error then I have a fix in place for it. But you might have to go back to 3.1.2 to get a version that doesn't exhibit the error.

David

chrroe
15-Mar-2011, 12:32 PM
We do a shell command to query the rpm and then parse the results

Have you evaluated to use rpmlib (http://http://www.rpm.org/max-rpm/s1-rpm-rpmlib-functions.html) in order to access the contents?

Bye
Christoph

Craig
15-Mar-2011, 03:38 PM
Have you evaluated to use rpmlib (http://http://www.rpm.org/max-rpm/s1-rpm-rpmlib-functions.html) in order to access the contents?

Since Linux developers in general have questionable policies towards availability and backwards compatibility we try to avoid using external libraries whenever possible.