Bug 89006 - Manifest files do not work
Manifest files do not work
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i686 Linux
high Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks: 87937
  Show dependency treegraph
 
Reported: 2003-04-16 10:26 EDT by James Olin Oden
Modified: 2007-03-27 00:03 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-16 13:45:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Olin Oden 2003-04-16 10:26:52 EDT
Description of problem:
You cannot provide rpm 4.2-0.69 with a manifest file.  It will complain
that the manifest file cannot be installed.

Version-Release number of selected component (if applicable): 4.2-0.69


How reproducible: Always


Steps to Reproduce:
1.  Create a manifest file.  Here is an example one:
       
      /tmp/test-rpm-1.0-1.noarch.rpm

2.  Run rpm using the manifest file:

      rpm -Uvh --package /tmp/list

   
Actual results:

   error: /tmp/list cannot be installed   


Expected results:

I expected it to install the rpm (well upgrade it (-;).

Additional info:

I have tried various options and nothing seems to work;
Also, I tried simply adding a comment to the file to make it
even more conspicously not an rpm (of course I would imagine the
fact that it did not have an rpm header would have made it so, but
want do I know (-;).
Comment 1 Jeff Johnson 2003-04-16 13:45:58 EDT
Yup, return codes got broken during an audit.

The important change is in lib/packages.c:
 /*@=boundswrite@*/
        (void) fstat(Fileno(fd), &st);
        /* if fd points to a socket, pipe, etc, st.st_size is *always* zero */
-       if (S_ISREG(st.st_mode) && st.st_size < sizeof(*l))
+       if (S_ISREG(st.st_mode) && st.st_size < sizeof(*l)) {
+           rc = RPMRC_NOTFOUND;
            goto exit;
+       }

but I've checked a larger change into CVS.
Comment 2 James Olin Oden 2003-04-16 13:59:57 EDT
I know this is after your fix, but I just found out it works fine if there
is more than one package in the manifest.  If it has one, though, bad things 
occur.

Thanks for the fix.
Comment 3 Jeff Johnson 2003-04-16 14:06:22 EDT
Adding 96 bytes of white space probably works then too, the
check is that the file is at least the size of a lead (96b).

Note You need to log in before you can comment on or make changes to this bug.