[bug-notifications] [pkgutil 0003701]: Upgrading pkgutil with -y fails and leaves system without pkgutil

Mantis Bug Tracker noreply at opencsw.org
Fri Jun 5 11:15:49 CEST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=3701 
====================================================================== 
Reported By:                skayser
Assigned To:                bonivart
====================================================================== 
Project:                    pkgutil
Issue ID:                   3701
Category:                   upgrade
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2009-05-31 17:12 CEST
Last Modified:              2009-06-05 11:15 CEST
====================================================================== 
Summary:                    Upgrading pkgutil with -y fails and leaves system
without pkgutil
Description: 
Just tried to upgrade pkgutil to 1.6 with -y (don't bother me ;).
Unfortunately, /var/opt/csw/pkgutil/admin is deleted when removing the old
version, so the pkgadd of 1.6 fails. Maybe find some way to keep the admin
file around?

# pkgutil -v
1.5
# pkgutil -yu pkgutil
Parsing catalog, may take a while...
Updated packages: CSWpkgutil-1.6,REV=2009.05.29
Total size:  108.5 KB
Fetching CSWpkgutil-1.6,REV=2009.05.29...
--2009-05-31 16:13:48-- 
http://csw.informatik.uni-erlangen.de/csw/current/i386/5.10/pkgutil-1.6,REV=2009.05.29-SunOS5.8-i386-CSW.pkg.gz
Resolving csw.informatik.uni-erlangen.de... 131.188.30.102
Connecting to csw.informatik.uni-erlangen.de|131.188.30.102|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 111094 (108K) [application/octet-stream]
Saving to:
`/var/opt/csw/pkgutil/packages/pkgutil-1.6,REV=2009.05.29-SunOS5.8-i386-CSW.pkg.gz'

100%[=======================================>] 111,094      178K/s   in
0.6s

2009-05-31 16:13:49 (178 KB/s) -
`/var/opt/csw/pkgutil/packages/pkgutil-1.6,REV=2009.05.29-SunOS5.8-i386-CSW.pkg.gz'
saved [111094/111094]

Removing old version of CSWpkgutil

Removal of <CSWpkgutil> was successful.
Installing CSWpkgutil-1.6,REV=2009.05.29
pkgadd: ERROR: unable to open admin file </var/opt/csw/pkgutil/admin>: No
such file or directory
====================================================================== 

---------------------------------------------------------------------- 
 (0006233) bonivart (manager) - 2009-06-01 09:51
 http://www.opencsw.org/mantis/view.php?id=3701#c6233 
---------------------------------------------------------------------- 
Thanks for reporting that, I usually don't use -y myself because I want to
see everything looking for bugs but of course there was one related to -y!
:-)

I'll see what I will do about this, I'm thinking two things, either keep
the admin file around somehow (not really nice if you permanently remove
the package) or simply checking for its existence before using it, the
latter would in practice temporarily disable -y until the admin file is
back again. 

---------------------------------------------------------------------- 
 (0006234) skayser (administrator) - 2009-06-01 11:59
 http://www.opencsw.org/mantis/view.php?id=3701#c6234 
---------------------------------------------------------------------- 
Your second option seems like a good option. Straight-forward and fully
sufficient in the seldom case of a pkgutil upgrade (with its admin file
removal). 

---------------------------------------------------------------------- 
 (0006239) bonivart (manager) - 2009-06-01 16:50
 http://www.opencsw.org/mantis/view.php?id=3701#c6239 
---------------------------------------------------------------------- 
I went with the second option, it seemed the simplest. I will release 1.6.1
shortly, hopefully not that many will use -y to upgrade to it... :-)

http://pkgutil.svn.sourceforge.net/viewvc/pkgutil/trunk/pkgutil?revision=55 

---------------------------------------------------------------------- 
 (0006271) dam (reporter) - 2009-06-05 10:00
 http://www.opencsw.org/mantis/view.php?id=3701#c6271 
---------------------------------------------------------------------- 
This is not good. If you upgrade a machine which receives updates only once
every few month you have almost always an update of pkgutil and also many
many packages. Just not using a removed admin file renders -y useless in
these scenarios. It would be better to copy the admin file somewhere on
pkgutil start, use it during pkgutil runtime, and remove it after that.
That way removing admin from the package wouldn't interfere with package
installation.

Additionally, there should be a special case which always updated pkgutil
first and restarts it, so in case of an error the error is fixable.
Currently using -y leaves a machine completely broken as packages are
downloaded, removed, but not installed as the admin file was missing. So
lots of packages are removed and not installed again. 

---------------------------------------------------------------------- 
 (0006272) bonivart (manager) - 2009-06-05 10:29
 http://www.opencsw.org/mantis/view.php?id=3701#c6272 
---------------------------------------------------------------------- 
At least for interactive it's no worse than having to confirm for pkgutil,
right? If you're running from cron or something it would halt.

I kept it on my todo-list but I wanted a quick fix for those like
Sebastian who ended up without pkgutil. 

---------------------------------------------------------------------- 
 (0006273) dam (reporter) - 2009-06-05 11:15
 http://www.opencsw.org/mantis/view.php?id=3701#c6273 
---------------------------------------------------------------------- 
It is worse. Because it deinstalls all upgradeable packages and instead of
installing the packages it throws errors. So you end up without all
packages to be upgraded and without trace which packages got deinstalled. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-31 17:12 skayser        New Issue                                    
2009-06-01 09:51 bonivart       Note Added: 0006233                          
2009-06-01 09:51 bonivart       Status                   new => assigned     
2009-06-01 09:51 bonivart       Assigned To               => bonivart        
2009-06-01 11:59 skayser        Note Added: 0006234                          
2009-06-01 16:50 bonivart       Note Added: 0006239                          
2009-06-05 10:00 dam            Note Added: 0006271                          
2009-06-05 10:29 bonivart       Note Added: 0006272                          
2009-06-05 11:15 dam            Note Added: 0006273                          
======================================================================




More information about the bug-notifications mailing list