Aptsources - Augeas Documentation

# Aptsources

Parsing /etc/apt/sources.list

Summary

Aptsources | Parsing /etc/apt/sources.list
Utility variables/functions |
sep_ws |
eol |
comment |
empty |
word |
uri |
Keywords |
record |
Lens |
lns |
filter |

### Utility variables/functions

### sep_ws

> let sep_ws = Sep.space

### eol

> let eol = Util.del_str "\n"

### comment

> let comment = Util.comment

### empty

> let empty = Util.empty

### word

> let word = /[^][# \n\t]+/

### uri

> let uri = let protocol = /[a-z+]+:/ in let path = /\/[^] \t]*/ in let path_brack = /\[[^]]+\]\/?/ in protocol? . path | protocol . path_brack

### Keywords

### record

> let record = let option_sep = [ label "operation" . store /[+-]/]? . Sep.equal in let option = Build.key_value /arch|trusted/ option_sep (store Rx.word) in let options = [ label "options" . Util.del_str "[" . Sep.opt_space . Build.opt_list option Sep.space . Sep.opt_space . Util.del_str "]" . sep_ws ] in [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . options? . [ label "uri" . store uri ] . sep_ws . [ label "distribution" . store word ] . [ label "component" . sep_ws . store word ]* . del /[ \t]*(#.*)?/ "" . eol ]

### Lens

### lns

> let lns = ( comment | empty | record ) *

### filter

> let sep_ws = Sep.space

> let eol = Util.del_str "\n"

> let comment = Util.comment

> let empty = Util.empty

> let word = /[^][# \n\t]+/

> let uri = let protocol = /[a-z+]+:/ in let path = /\/[^] \t]*/ in let path_brack = /\[[^]]+\]\/?/ in protocol? . path | protocol . path_brack

> let record = let option_sep = [ label "operation" . store /[+-]/]? . Sep.equal in let option = Build.key_value /arch|trusted/ option_sep (store Rx.word) in let options = [ label "options" . Util.del_str "[" . Sep.opt_space . Build.opt_list option Sep.space . Sep.opt_space . Util.del_str "]" . sep_ws ] in [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . options? . [ label "uri" . store uri ] . sep_ws . [ label "distribution" . store word ] . [ label "component" . sep_ws . store word ]* . del /[ \t]*(#.*)?/ "" . eol ]

> let lns = ( comment | empty | record ) *

Close