Done: - YUMParser class using RepomdFileReader to get a list of files to parse and calling corresponding *FileReaders to do the job. YUMParser also defines callbacks which recieve data from parsers and use CacheStore to put it into database. - primary.xml.gz parser almost complete, the rest are just stubs. Pending: - patch parser - suse-primary extensions (are there any docs about these?) - filelists (both from filelists.xml.gz and primary.xml.gz) [easy] - other.xml [easy] - groups - patterns, products CacheStore API needed for: - storing resolvable details (attributes other than NVRAD) - inserting filelist entries - changelog entries My previous estimate was too optimistic :O( I'd say i need five more days to have all YUMParser jobs done. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
I will just write a "diff" against the last status: Jan Kupec wrote:
Done:
- I separated things that several metadata files have in common from PrimaryFileReader into FileReaderBase class.
- YUMParser class using RepomdFileReader to get a list of files to parse and calling corresponding *FileReaders to do the job. YUMParser also defines callbacks which recieve data from parsers and use CacheStore to put it into database. - primary.xml.gz parser almost complete, the rest are just stubs.
Pending:
- patch parser Made some progress here: need to parse <atoms> yet.
- suse-primary extensions (are there any docs about these?) - filelists (both from filelists.xml.gz and primary.xml.gz) [easy] - other.xml [easy] - groups - patterns, products
CacheStore API needed for:
- storing resolvable details (attributes other than NVRAD)
Duncan provided one.
- inserting filelist entries - changelog entries
My previous estimate was too optimistic :O( I'd say i need five more days to have all YUMParser jobs done.
This time the estimate is (hopefully) right, but so far i spent only something like two and a half day on the parser (i have been busy sorting yast2maintainers bugs and fixing some important bugs of mine). So, optimistically, the parser will be ready by the end of the week. Jano PS: Question for Michael: I see a lot of classes in libzypp are designed following a certain pattern with public API separated from implementation. Is it the Bridge pattern? I have not found time to learn much about it so far. Should i design YUMParser's classes that way? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, May 15, Jan Kupec wrote:
PS: Question for Michael:
I see a lot of classes in libzypp are designed following a certain pattern with public API separated from implementation. Is it the Bridge pattern? I have not found time to learn much about it so far. Should i
Some are sort of Bridge (e.g. Resolvables, Sources, Capabilites). Other simply use 'Body/Handle' or PIMPL, to keep data and implementation details out of the public interface, to implement cheap copy or copy on write.
design YUMParser's classes that way?
It's always a good idea to decouple interface and implementation. Look e.g. at the yum::PrimaryFileReader: PrimaryFileReader( const Pathname &primary_file, const ProcessPackage & callback, const ProgressData::ReceiverFnc & progress ); This is actually the complete public interface. A filename, a callback processing the parded data and optional progressreport. If you'd move all the rest of the class to a separate implementation class, you could drop a lot of compiletime dependencies (e.g. the whole xml::Reader stuff). Then you can add/remove additional data/calbacks, whatever you need, without breaking binary compatibility. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Jan Kupec
-
Michael Andres