Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(64)

Issue 12758044: Filter apt-config dump output for precise (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by sidnei.da.silva
Modified:
10 years, 9 months ago
Reviewers:
mp+179710, dimitern, rog
Visibility:
Public.

Description

Filter apt-config dump output for precise In precise, apt-config dump ignores the extra arguments and dumps all available config keys, so filter them with a regexp before returning them from the AptConfigProxy function. Fixes LP:1210551. https://code.launchpad.net/~sidnei/juju-core/apt-config-precise-host/+merge/179710 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Filter apt-config dump output for precise #

Total comments: 6

Patch Set 3 : Filter apt-config dump output for precise #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -6 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M utils/apt.go View 1 2 3 chunks +9 lines, -6 lines 0 comments Download
M utils/apt_test.go View 1 2 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 5
sidnei.da.silva
Please take a look.
10 years, 9 months ago (2013-08-12 13:59:45 UTC) #1
dimitern
LGTM with one comment https://codereview.appspot.com/12758044/diff/1/utils/apt.go File utils/apt.go (right): https://codereview.appspot.com/12758044/diff/1/utils/apt.go#newcode13 utils/apt.go:13: "launchpad.net/juju-core/log" You don't need this ...
10 years, 9 months ago (2013-08-12 14:04:06 UTC) #2
sidnei.da.silva
Please take a look.
10 years, 9 months ago (2013-08-12 14:23:33 UTC) #3
rog
LGTM with a possible simplification below. https://codereview.appspot.com/12758044/diff/6001/utils/apt.go File utils/apt.go (right): https://codereview.appspot.com/12758044/diff/6001/utils/apt.go#newcode69 utils/apt.go:69: aptLogger.Errorf("utils/apt: apt-config command ...
10 years, 9 months ago (2013-08-12 15:07:43 UTC) #4
sidnei.da.silva
10 years, 9 months ago (2013-08-12 15:34:55 UTC) #5
Please take a look.

https://codereview.appspot.com/12758044/diff/1/utils/apt.go
File utils/apt.go (right):

https://codereview.appspot.com/12758044/diff/1/utils/apt.go#newcode13
utils/apt.go:13: "launchpad.net/juju-core/log"
On 2013/08/12 14:04:06, dimitern wrote:
> You don't need this when you're using loggo. Please convert all instances of
> log.X to aptLogger.X.

Done.

https://codereview.appspot.com/12758044/diff/6001/utils/apt.go
File utils/apt.go (right):

https://codereview.appspot.com/12758044/diff/6001/utils/apt.go#newcode69
utils/apt.go:69: aptLogger.Errorf("utils/apt: apt-config command failed:
%v\nargs: %#v\n%s",
On 2013/08/12 15:07:44, rog wrote:
> We don't need the utils/apt: prefix here any more.

Done.

https://codereview.appspot.com/12758044/diff/6001/utils/apt.go#newcode72
utils/apt.go:72: }
On 2013/08/12 15:07:44, rog wrote:
> Alternatively, I think you may be able to replace all
> the below code with something like this:
> 
> return string(bytes.Join(aptProxyRE.FindAll(out, -1), []byte("\n")))
> 
> (You might need to use FindAllSubmatch if extra white
> space is a problem)

Done.

https://codereview.appspot.com/12758044/diff/6001/utils/apt.go#newcode77
utils/apt.go:77: line = strings.TrimSpace(line)
On 2013/08/12 15:07:44, rog wrote:
> We could probably make the regexp do this job too.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b