RPM Community Forums

Mailing List Message of <rpm-users>

Re: Detection of "bad" packages

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 01 Aug 2011 - 13:46:58 CEST
Message-id: <189EF788-365A-4CD0-A2E1-8050FAD4AB16@mac.com>

On Aug 1, 2011, at 7:31 AM, Jeff Johnson wrote:

> 
> On Aug 1, 2011, at 4:42 AM, Michael Baudisch wrote:
> 
>> Hello,
>> i do some tests with RPM and somehow "bad" packages. When I pass a "bad" test package to RPM I observered that there's an error like "error: open of blablabla failed".  The package is a plain text file  with .rpm extension containing only "blablabla".
>> But when I put this "blablabla" in squared brackets ("[Blablabla]") there's no error.
>> So, what is the magic that does RPM not detect/report a corrupt package? Are there other circumstances under which RPM does not detect/report a "bad" package? Thanks for help in advance.
>> 
> 
> What rpm version?
> 
> All input arguments that are not *.rpm packages
> are treated as a manifest of *.rpm packages.
> 

What may not be clear here is this:
	Technically there are no "bad packages": everything that isn't a package
	is treated as a manifest. Manifests are checked for non-printable characters.

> The manifest is split on white space and each item is added
> at that position in the argument list.
> 

The items can actually be glob patterns: so adding square brackets
turns a string into a character range.

> Not reporting is not the same as not detecting.
> Did rpm actually attempt to install anything?
> 

Arguments that don't exist are silently skipped.

Consider this
	touch empty
	rpm -Uvh empty

This is semantically equivalent to an invocation with no arguments: the file is empty.

But there are differences in behavior because there is an augment: the mani9fest,
but the manifest is empty, and so one sees different behavior.

73 de Jeff
Received on Mon Aug 1 13:47:09 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.