Bug 82024 - Need way to show partially installed packages
Need way to show partially installed packages
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rpm (Show other bugs)
2.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-16 09:40 EST by James Olin Oden
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-08 17:52:51 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-01-16 09:40:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Tekelec)

Description of problem:
If an RPM fails in the %post script it will still show up in 
queries of the RPM database as being installed.  There is nothing
to show that though it was installed, it was not properly installed.
Under Solaris packages such as these are called partial packages
and one can detect there existance by simply typing:

   pkginfo -p

Which will list all the partial packages.  I believe (and know 
for my company) it would be very usefull to be able to do something
simular with systems managed by RPM.  

There is an incomplete workaround for this, in that one can check
for duplicate rpm names to find such partially installed packages.
The problem with this approach is it only works when one has upgraded
the package, and not if this is the initial install of a package.


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


How reproducible:
Always

Steps to Reproduce:
N/A

Additional info:
Comment 1 Jeff Johnson 2003-01-20 12:49:27 EST
FWIW, the script I posted works even in the case of
a initial install, as that package is fully, not partially,
installed. Yes, payload unpacking may exit, but that is
detectable with --verify, and blocking signals during
payload unpacking is certainly an option.

OTOH, blocking signals leads to lack of responsiveness,
and causes those with short attention spans to start blasting
with "kill -9", creating a worse problem than before.
Comment 2 James Olin Oden 2003-01-20 14:29:28 EST
Jeff,  I am not getting the results you say I should.

For example I create a partial package from the following spec:
   Summary:        Partial Package
   Name:           partial
   Version:        1.0
   Release:        1
   Group:          Broken/Tools
   Copyright:      No Importante
   Vendor:         Nadia
   BuildArchitectures:     noarch
   Provides:               %{name} = %{version}

   %description
   A partial package.

   %post
   exit 1

   %files

I build it with:

   rpmbuild -ba partial.spec

I install it (not upgrade) with:

   rpm -ivh partial-1.0-1.noarch.rpm

It installs but fails in the post sections (on purpose of course).
I run:

   rpm -V partial

This gives no output and returns 0.  Secondly if I do:

   rpm -qa --qf "%{NAME}\n" | grep partial

I get one instance shown of partial (which would make the 
sort uniq hack invalid).
Comment 3 Jeff Johnson 2003-01-20 14:37:49 EST
If failing %post is your definition of "partial install",
then the answer is
   Fix your packaging
THere are bigger problems than busted %post that need to be solved.
Comment 4 James Olin Oden 2003-01-20 14:56:41 EST
Look, I was doing this as a test case for a very real problem.  Just because
the kernel panic's does not mean that there is a bug in the kernel.  Sometimes
this is true, but often it may mean that something in the kernel's environment
(i.e. the hardware) has gone way south and the only right thing to do is panic.
In the same way, as one is doing error checking inside your post script, you 
may come across cases that the only right thing to do is exit with an error.
Furthmore, if you come accross a system that you are upgrading, and you can
see that the present instance of a package on the system is partially installed
you had better not simply upgrade anyway, but instead stop with a meaningful
error message that will give someone a clue.

Furthermore, the multiple instance method of checking for partial packages
does not allow for one to legitamitly have multiple instances of a particular
package (of the same name) installed.  There are more examples of this 
than just the kernel RPM's.

Lastly, though there may be bigger problems.  It is a problem.  No need to get
your feathers ruffled.  If RedHat cannot fix it anytime soon, well we will
have to cope, but it is a problem.  It would be real nice to see it in AS 3.0,
though.
Comment 5 Jeff Johnson 2003-01-20 15:05:07 EST
In fact, the package with "exit 1" in %post is completely
installed with --install. Yes, any side effects from running
%post that occur after the exit are not performed.

Otherwise, the check I gave is adequate for detecting duplicately
named packages, which occur in practice only for the kernel.

This behavior is not going to change in the near future. not
because my feathres are ruffled, but because my marching orders
are different.

Comment 7 Paul Nasrat 2006-08-08 17:52:51 EDT
RHEL 2.1 is in maintenance mode, this will not be addressed in it.

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