Module Apt
module Apt: sig
.. end
Apt command line parsing
include struct ... end
val space_re : Str.regexp
val parse_inst : Pervasives.in_channel -> (string * string, unit) ExtLib.Hashtbl.t
val parse_inst_from_cmd : string -> (string * string, unit) ExtLib.Hashtbl.t
val parse_inst_from_file : string -> (string * string, unit) ExtLib.Hashtbl.t
val parse_popcon : string -> int * string * int
type
apt_req_only = [ `Pkg of string ]
type
apt_req_pkg = [ `Pkg of string | `PkgDst of string * string | `PkgVer of string * string ]
type
apt_req =
| |
Install of apt_req_pkg list |
| |
Remove of apt_req_only list |
| |
Upgrade of string option |
| |
DistUpgrade of string option |
val parse_pkg_only : string -> [> `Pkg of Format822.name ]
val distro_re : Str.regexp
val version_re : Str.regexp
val parse_pkg_req : string option ->
Format822.name ->
[> `Pkg of Format822.name
| `PkgDst of Format822.name * string
| `PkgVer of Format822.name * Format822.version ]
val parse_request_apt : string -> apt_req
parse a string containing an apt-get command line
Returns a data structure containing the request
val parse_request_aptitude : string -> apt_req
module Pref: sig
.. end
for details on the apt_preferences format :
man apt_preferences
val parse_pref_labels : string -> (string * string) list
val general_re : Str.regexp
val parse_pref_package : 'a * string -> Pref.package_t
val pin_re : Str.regexp
val parse_pin : 'a * string -> Pref.pin_t
val parse_preferences_stanza : (string * ((Lexing.position * Lexing.position) * string)) list ->
Pref.apt_preferences
val preferences_parser : ((string * (Format822.loc * string)) list -> 'a) ->
'a list -> Format822.deb_parser -> 'a list
val parse_preferences_in : IO.input -> Pref.apt_preferences list
parse the apt_preferences file