Presentation is loading. Please wait.

Presentation is loading. Please wait.

and what the developer saw there

Similar presentations


Presentation on theme: "and what the developer saw there"— Presentation transcript:

1 and what the developer saw there
Through the yum API, and what the developer saw there Paul Nasrat Software Engineer - Red Hat, Inc.

2 Summary Main text Introduction yum-utils yum shell yum plugins yum API

3 Introduction RPM Basic network awareness and dependency solving Yup
YellowDog updater Duke University heavy use Yum Needs of Duke (particularly physics) Seth Vidal - YellowDog updater modified Recent yum development Larger team of contributors RPM metadata, urlgrabber, sqlite caching Hooks for third parties (shell, plugins, API)

4 Extending yum Why? Tool automation Build automation Quality Assurance
Who? System Administrators Packagers OS Developers How? Python Yum 2.3.x +

5 Yum-utils - repoquery Replaces rpm -q and rpmdb-fedora for metadata repositories repoquery --requires demo-requirer repoquery –-provides demo-provider repoquery –-whatprovides RPM style queryformat repoquery –queryformat ‘%{name}.%{arch}’ demo

6 Yum utils yumdownloader Download packages Resolve dependencies
Supports source rpm retrieval yum-builddep Install build dependencies for a package

7 yum shell Simple cli interface for advanced users
Not a scripting language – no logic control, error handling yum shell > help commands: clean, config, exit, groupinfo, groupinstall, grouplist, groupremove, groupupdate, info, install, list, localinstall, makecache, provides, quit, remove, repo, run, search, transaction, update > repo disable * > repo enable yum-demo > install yum-shell-demo > transaction solve > transaction run

8 RPM core concepts Header object Tags and values
Python dictionary like. Transaction based “Workhorse of RPM” Transaction set Flags – A transaction set can be modified or setup with various flags Test only

9 yum plugins Hook and slot based extensibility Configuration
Command line option addition Pre/post repository setup Pre/post download Pre/post Versioned API that plugins require Conduit for access to transaction information

10 yum plugin - example # tsflags by Panu Matilainen requires_api_version = '2.1' def init_hook(conduit): parser = conduit.getOptParser() parser.add_option('--tsflags', dest='tsflags') def postreposetup_hook(conduit): opts, args = conduit.getCmdLine() conf = conduit.getConf() if opts.tsflags: flags = opts.tsflags.split(',') conf.setConfigOption('tsflags', flags)

11 Yum api Why? Alternative front ends Plugins insufficient
Stand alone applications How? rpmUtils module – rpm-python wrapper yum module - YumBase What? yum-utils Fedora Core 5 - anacoda pup

12 Yum API YumBase This is a primary structure and base class. It houses the objects and methods needed to perform most things in yum. It is almost an abstract class in that you will need to add your own class above it for most real use. Handles configuration setup Repository setup Dummy log routines Callbacks RPM Callbacks urlgrabber progress bar

13 Future plans Yum everywhere in Fedora Anaconda Pup
System-config-packages replacement Applet replacement Provide a stack of components for graphical yum front ends Speaking with yumex developers Speed and memory footprint improvements

14 Further information yum-devel list RPM metadata list

15 Thanks and questions... Seth Vidal – primary developer Jeremy Katz
Adrian Likins Matthew Miller Michael Stenner Icon Riabitsev Ryan Tomayko Robert G. Brown Hollis Blanchard Grigory Bakunov Menno Smits Gijs Hollestelle Terje Rosten


Download ppt "and what the developer saw there"

Similar presentations


Ads by Google