Opened 8 years ago
#16312 new defect
RPM upgraid fails when VBoxSVC --auto-shutdown is running
| Reported by: | Joshua Megerman | Owned by: | |
|---|---|---|---|
| Component: | installer | Version: | VirtualBox 5.1.12 |
| Keywords: | rpm | Cc: | |
| Guest type: | other | Host type: | Linux |
Description
When trying to upgrate VirtualBox with yum/rpm, the first attempt fails if VBoxSvc --auto-shutdown is running. The preinstall script shuts down services, but only waits 1 second for VBoxSVC to terminate, when it takes closer to 10 (which is documented in the error message, but the script doesn't take into account!). Thus the upgrade fails, but works if you try again after the service terminates.
The solution is to chane the 'sleep 1' on line 103 of /usr/lib/virtualbox/routines.sh to 'sleep 10' (or do a loop checking ever second for 10 seconds, or something like that).
# yum update
Loaded plugins: aliases, auto-update-debuginfo, changelog, fastestmirror, filter-data, keys, list-data, merge-conf,
: priorities, ps, remove-with-leaves, rpm-warm-cache, show-leaves, verify
Loading mirror speeds from cached hostfile
* base: mirrors.centos.webair.com
* elrepo: mirrors.evowise.com
* epel: mirror.symnds.com
* extras: mirror.umd.edu
* nux-dextop: mirror.li.nux.ro
* updates: mirror.datto.com
Skipping filters plugin, no data
Resolving Dependencies
Skipping filters plugin, no data
--> Running transaction check
---> Package VirtualBox-5.1.x86_64 0:5.1.10_112026_el7-1 will be updated
---> Package VirtualBox-5.1.x86_64 0:5.1.12_112440_el7-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Updating:
VirtualBox-5.1 x86_64 5.1.12_112440_el7-1 virtualbox 75 M
Transaction Summary
===================================================================================================================
Upgrade 1 Package
Total download size: 75 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for virtualbox
VirtualBox-5.1-5.1.12_112440_el7-1.x86_64.rpm | 75 MB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
A copy of VirtualBox is currently running. Please close it and try again.
Please note that it can take up to ten seconds for VirtualBox (in particular
the VBoxSVC daemon) to finish running.
error: %pre(VirtualBox-5.1-5.1.12_112440_el7-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package VirtualBox-5.1-5.1.12_112440_el7-1.x86_64
Verifying : VirtualBox-5.1-5.1.12_112440_el7-1.x86_64 1/2
VirtualBox-5.1-5.1.10_112026_el7-1.x86_64 was supposed to be removed but is not!
Verifying : VirtualBox-5.1-5.1.10_112026_el7-1.x86_64 2/2
Failed:
VirtualBox-5.1.x86_64 0:5.1.10_112026_el7-1 VirtualBox-5.1.x86_64 0:5.1.12_112440_el7-1
Complete!

