On Sunday 05 June 2022 10:01:07 Srinidhi B wrote:
But I'm not able to get started with a basic library. I've tried to go through the existing implementations. Most of the implementations start with calling `getZypp()` to acquire the lock. I'm not able to figure out what should be the next step.
Is there any guide, blog post, document, or (newer) example that would help me understand the process?
Should I be using libzypp directly or should I use PackageKit? I'm more comfortable writing in C rather than C++.
Hi Srinidhi, there is no such doc and it would be outdated in a while, as a major rewrite is going on. Basically I would not recommend using libzypp directly, because new features will introduce new rules. You code may easily be outdated/wrong in while or on specific systems. I know, currently zypper provides only XML output for parsing command output like 'list-updates', but I would nevertheless recommend to us this. More flexible command output for parsing query output is planned (similar to rpms --query-format), but we need some time and resources for this. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres (he/him/his), Engineering & Innovation, ma@suse.com +------------------------------------------------------------------+ SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany, (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman +------------------------------------------------------------------+