bugfix: fix regular expression for apt

This commit is contained in:
Christoph Hartmann 2015-10-25 22:32:50 +01:00
parent b7777d265e
commit 24e23f3db4

View file

@ -81,7 +81,7 @@ class AptRepository < Vulcano.resource(1)
active = false if raw_line != line
# eg.: deb http://archive.ubuntu.com/ubuntu/ wily main restricted
parse_repo = /^\s*(\S+)\s+"+(\S+)"+\s+(\S+)\s+(.*)$/.match(line)
parse_repo = /^\s*(\S+)\s+"?([^ "\t\r\n\f]+)"?\s+(\S+)\s+(.*)$/.match(line)
# check if we got any result and the second param is an url
next if parse_repo.nil? || !parse_repo[2] =~ HTTP_URL_RE