From: "Guillaume Cottenceau" <[EMAIL PROTECTED]>
> "Thomas Backlund" <[EMAIL PROTECTED]> writes:
>
> > When you press Install, save list of selected packages to temporary
file.
> > If install was successful, just delete the file.
>
> It's even not necessary to use a file, the main "rpmdrake"
> doesn't get closed when the packages are being installed.
>
> > if not, read selected packages from file back to the list.
> > (I suppose it will also need to verify if the package(s) got installed,
and
> > if so remove it from the selected list.)
>
> Yes, the problem is not to get back the selected list, it's that
> the package db may have changed, so the dependencies must be
> re-processed somehow if possible.
>

The dependencies are calculated when doing the initial selection,
are they not?
So when you read the selected list back, shouldn't : 'rpm -q packagename'
for every package in the list be sufficient to tell the system if the
package is installed, and if not, select the package for install.

An if you need some additional way to make sure that rpmdrake
knows that a package is installed, how about this:
----------
# list of selected files when starting install
package1
package2
package3
package4
package5
package6
package7
package8
package9
----------

and then when the install fails, run 'rpm -q packagename'
for every package listed, and add OK for every package
that got installed
----------
# list of selected files when starting install
package1    OK
package2    OK
package3    OK
package4
package5    OK
package6    OK
package7
package8
package9    OK
----------

so ven rpmdrake rereads the selected list, finds that package4, 7 and 8
is not installed it adds them to the selection. If then lets say package4
depends on package2, rpmdrake checks the list above, and if the package2
has OK then rpmdrake knows that dependencies are satisfied, if no OK,
add package2 to selected items.

Something like this should work, shouldn't it?




*** Tämä viesti on VirusTarkistettu INRITEL OY:n postipalvelimella!! *** 


Reply via email to