[Libguestfs] [PATCH v3 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux

Tomáš Golembiovský tgolembi at redhat.com
Wed Nov 7 14:01:51 UTC 2018


On Wed, 07 Nov 2018 13:32:45 +0100
Pino Toscano <ptoscano at redhat.com> wrote:

> On Wednesday, 7 November 2018 12:53:17 CET Tomáš Golembiovský wrote:
> > - support for Debian is missing
> >   I don't know how to install the package only when all it's dependencies are
> >   already installed.  
> 
> dpkg -i foo.deb

If it were as easy as this. :)

> 
> >   dpkg cannot be used to check that (simulate the install).  
> 
> dpkg --dry-run (the man page lists also --no-act, and --simulate)

The --dry-run does not seem to do much. It does not verify dependencies.
See below.

> 
> >   And attempting to install the package will leave it half-installed (dpkg
> >   cannot roll-back).  
> 
> `dpkg -i` performs a complete installation, doing all the steps needed,
> and leaving the package properly configured if the process is succesfull.

That is assuming everything is OK and the package can be installed. If
there are missing dependencies it leaves the package unpacked in the
system but in un-configured state. This would have to be fixed after next
boot of the guest.

See this:

> root at 8e59267e1b89:/# dpkg -l qemu-guest-agent                                        
> dpkg-query: no packages found matching qemu-guest-agent
> root at 8e59267e1b89:/# dpkg --simulate --refuse-downgrade --skip-same-version --install /var/tmp/qemu-guest-agent_1%3a2.8+dfsg-6+deb9u4_amd64.deb                            
> Selecting previously unselected package qemu-guest-agent.                            
> (Reading database ... 6498 files and directories currently installed.)               
> Preparing to unpack .../qemu-guest-agent_1%3a2.8+dfsg-6+deb9u4_amd64.deb ...
> root at 8e59267e1b89:/# echo $?
> 0
> root at 8e59267e1b89:/# dpkg --refuse-downgrade --skip-same-version --install /var/tmp/qemu-guest-agent_1%3a2.8+dfsg-6+deb9u4_amd64.deb                                       
> Selecting previously unselected package qemu-guest-agent.                            
> (Reading database ... 6498 files and directories currently installed.)
> Preparing to unpack .../qemu-guest-agent_1%3a2.8+dfsg-6+deb9u4_amd64.deb ...
> Unpacking qemu-guest-agent (1:2.8+dfsg-6+deb9u4) ...                                 
> dpkg: dependency problems prevent configuration of qemu-guest-agent:                 
>  qemu-guest-agent depends on libglib2.0-0 (>= 2.37.1); however:
>   Package libglib2.0-0 is not installed.
> 
> dpkg: error processing package qemu-guest-agent (--install):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  qemu-guest-agent
> root at 8e59267e1b89:/# dpkg -l qemu-guest-agent
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name            Version      Architecture Description
> +++-===============-============-============-====================================
> iU  qemu-guest-agen 1:2.8+dfsg-6 amd64        Guest-side qemu-system agent
> root at 8e59267e1b89:/# 

Sadly, dpkg cannot even roll-back in case of errors. 

So far I haven't found any way to check dependencies in advance.

Tomas

> 
> -- 
> Pino Toscano


-- 
Tomáš Golembiovský <tgolembi at redhat.com>




More information about the Libguestfs mailing list