]>
git.ipfire.org Git - pakfire.git/blob - python/pakfire/api.py
2 ###############################################################################
4 # Pakfire - The IPFire package management system #
5 # Copyright (C) 2011 Pakfire development team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
26 Pakfire
= base
.Pakfire
28 def install(requires
, **pakfire_args
):
29 pakfire
= Pakfire(**pakfire_args
)
31 return pakfire
.install(requires
)
33 def resolvdep(requires
, **pakfire_args
):
34 pakfire
= Pakfire(**pakfire_args
)
36 return pakfire
.resolvdep(requires
)
38 def localinstall(files
, **pakfire_args
):
39 pakfire
= Pakfire(**pakfire_args
)
41 return pakfire
.localinstall(files
)
43 def remove(what
, **pakfire_args
):
44 pakfire
= Pakfire(**pakfire_args
)
46 return pakfire
.remove(what
)
48 def update(pkgs
, check
=False, excludes
=None, allow_vendorchange
=False, allow_archchange
=False, **pakfire_args
):
49 pakfire
= Pakfire(**pakfire_args
)
51 return pakfire
.update(pkgs
, check
=check
, excludes
=excludes
,
52 allow_vendorchange
=allow_vendorchange
, allow_archchange
=allow_archchange
)
54 def info(patterns
, **pakfire_args
):
55 # Create pakfire instance.
56 pakfire
= Pakfire(**pakfire_args
)
58 return pakfire
.info(patterns
)
60 def search(pattern
, **pakfire_args
):
61 # Create pakfire instance.
62 pakfire
= Pakfire(**pakfire_args
)
64 return pakfire
.search(pattern
)
66 def groupinstall(group
, **pakfire_args
):
67 pakfire
= Pakfire(**pakfire_args
)
69 return pakfire
.groupinstall(group
)
71 def grouplist(group
, **pakfire_args
):
72 pakfire
= Pakfire(**pakfire_args
)
74 return pakfire
.grouplist(group
)
76 def _build(pkg
, resultdir
, **kwargs
):
77 pakfire
= Pakfire(**kwargs
)
79 return pakfire
._build
(pkg
, resultdir
, **kwargs
)
81 def build(pkg
, **kwargs
):
82 return Pakfire
.build(pkg
, **kwargs
)
84 def shell(pkg
, **kwargs
):
85 return Pakfire
.shell(pkg
, **kwargs
)
87 def dist(pkgs
, resultdirs
=None, **pakfire_args
):
88 pakfire
= Pakfire(**pakfire_args
)
90 return pakfire
.dist(pkgs
, resultdirs
=resultdirs
)
92 def provides(patterns
, **pakfire_args
):
93 # Create pakfire instance.
94 pakfire
= Pakfire(**pakfire_args
)
96 return pakfire
.provides(patterns
)
98 def requires(patterns
, **pakfire_args
):
99 # Create pakfire instance.
100 pakfire
= Pakfire(**pakfire_args
)
102 return pakfire
.requires(requires
)
104 def repo_create(path
, input_paths
, type="binary", **pakfire_args
):
105 pakfire
= Pakfire(**pakfire_args
)
107 return pakfire
.repo_create(path
, input_paths
, type=type)
109 def repo_list(**pakfire_args
):
110 pakfire
= Pakfire(**pakfire_args
)
112 return pakfire
.repo_list()
114 def clean_all(**pakfire_args
):
115 pakfire
= Pakfire(**pakfire_args
)
117 return pakfire
.clean_all()
119 def check(**pakfire_args
):
120 pakfire
= Pakfire(**pakfire_args
)
122 return pakfire
.check()