Home Wiki > openSUSE:YaST: Code Organization
Sign up | Login

openSUSE:YaST: Code Organization

tagline: From openSUSE

Organization in git repository

  • CONTRIBUTING.md same file describing contribution to project. For new project just copy existing one. Changes are done automatic for all projects
  • README.md description of project TODO link to template
  • MAINTAINER email contact to current maintainer of module
  • RPMNAME name of rpm source package. Needed for building package into rpm
  • doc/ contains documentation. New documentation should use Markdown format
  • testsuite/ old deprecated test suite. For new tests see test directory. Used to prevent regressions.
  • src/ contains source codes for module separated into subdirectories. For new Yast modules the most important subdirectories are lib and clients.
    • clients/ scripts that is executed by Yast. Client can be executed by calling /usr/sbin/yast2 <client_name>. There is some special prefix or suffix that mark special clients needed for installation. inst_* is for clients used in installation wizard work-flow. *_proposal is for clients that is showed on summary page by proposal client TODO link to documentation about methods in such client. *_auto is for clients used by autoinstallation. *_finish is for clients writting configuration at the end of installation.
    • lib/ contains ruby code without any Yast magic. Content of this directory is added to ruby load path.
    • modules/ singleton modules connected to Yast component system. Place for functionality shared between modules. Filenames must follow rails convention for naming ruby modules like network_interfaces.rb for NetworkInterfaces module. All modules must live below Yast namespace so e.g. Yast::YAPI::Network module is possible.
    • include/ old deprecated way how to share code which is then directly included. For new code use common ruby modules in lib directory.
    • desktop/ includes desktop files needed for entry in yast control center
    • servers_non_y2/ agent implementations
    • scrconf/ agent configurations, instantiating the implementations and binding them to mount points
    • fillup/ templates for /etc/sysconfig configuration files processed by fillup
    • autoyast-rnc/ XML schema for AutoYaST profiles
    • data/ YCP data structures used when readed by .target.yast2 agent. See more in the YaST2 Core documentation.