Mailinglist Archive: zypp-devel (43 mails)

< Previous Next >
Re: [zypp-devel] separating rpm download and installation
  • From: Duncan Mac-Vicar Prett <dmacvicar@xxxxxxx>
  • Date: Tue, 24 Apr 2007 17:42:41 +0200
  • Message-id: <200704241742.42423.dmacvicar@xxxxxxx>

I think this can be solved in the following way.

As Michael stated once, our transaction object is just a pool object.

Instead of having commitas a method of target, we have to create a abstract 
class taking a pool and create different implementations of it. Having a pool 
commit that only logs is very useful for unit tests.

So we could have one that takes a Pool and a directory, and it just downloads 
(if you use Fetcher, and configure Fetcher with a cache directory, you get 
cached rpms for free), you can have another one that just logs, and another 
one that downloads and install.

As we dont want to replicate code in the Committer that downloads, and the one 
that downloads and install, we could find a pattern to make them chainable or 
composite (like Java Stream classes)

Duncan
-- 
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
References