289. WebpinPackageSearch

YaST API to api.opensuse-community.org

289.1. Authors

  • Lukas Ocilka <locilka@suse.cz>

  • Katarina Machalkova <kmachalkova@suse.cz>

289.2. Summary of Module Globals

List of Global Functions

List of Global Variables

    289.3. Global Functions

    289.3.1. GetBaseSearchURL

    Returns base search URL

    Return value

    • string

    289.3.2. MatchesCurrentArchitecture

    Returns whether the current architecture matches the list of architectures got as a parameter. The current architecture is backward compatible, so also dependencies are taken into account.

    Function parameters

    • list <string> archs_to_check

    Return value

    • boolean - whether they match the current architecture

    Example 146. 

    	// current architecture is "i386"
    	MatchesCurrentArchitecture (["noarch", "ppc", "i386"]) -> true
    	MatchesCurrentArchitecture (["noarch"]) -> true
    	MatchesCurrentArchitecture (["x86_64"]) -> false
    	MatchesCurrentArchitecture (["ppc"]) -> false


    289.3.3. PrepareOneClickInstallDescription

    Writes XML configuration file for OnleClickInstall client.

    Function parameters

    • list <map> packages_to_install

    • string save_to_file

    Return value

    • boolean - if successful

    See also:

    • SearchForPackages() for the format of <map> package_to_install

    289.3.4. SearchForPackages

    Searches for packages using Webpin XML API.

    Function parameters

    • string search_for

    • string distribution

    • map <string, boolean> search_in

    Return value

    • list <map>

    Example 147. 

       SearchForPackages (
    	"desktop",
    	nil,
    	$[
    	    "name" : true,
    	    "description" : true,
    	    "contents" : false,
       	]
       )
       ->
       [
         ...
         $[
            "archs":[
                "ppc"
            ],
            "checksum":"e0cbdbf03ce47dfd5c5f885b86706ddfa023d8dc",
            "distro":"openSUSE_110",
            "name":"xfce4-desktop",
            "priority":"5",
            "repoURL":"http://download.opensuse.org/distribution/11.0/repo/oss/suse",
            "summary":"Desktop manager for the Xfce Desktop Environment",
            "version":"4.4.2"
         ],
         ...
       ]


    289.3.5. SetBaseSearchURL

    Sets base search URL WARNING: Use this only if you know what you are doing!

    Function parameters

    • string new_base_url

    Return value

    • void

    289.4. Global Variables

    289.5. Module Requirements

    289.5.1. Module Imports

    • Arch
    • Directory
    • FileUtils
    • HTTP
    • SuSERelease
    • URL
    • XML

    289.5.2. Module Includes