Bug 89006 - Manifest files do not work
Summary: Manifest files do not work
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: i686
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 87937
TreeView+ depends on / blocked
 
Reported: 2003-04-16 14:26 UTC by James Olin Oden
Modified: 2007-03-27 04:03 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-04-16 17:45:58 UTC
Embargoed:


Attachments (Terms of Use)

Description James Olin Oden 2003-04-16 14:26:52 UTC
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 17:45:58 UTC
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 17:59:57 UTC
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 18:06:22 UTC
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.