Merge lp:~sergiusens/snappy/go1.5 into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Sergio Schvezov on 2015-07-31
Status: Rejected
Rejected by: Sergio Schvezov on 2015-09-08
Proposed branch: lp:~sergiusens/snappy/go1.5
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 31 lines (+9/-1)
2 files modified
clickdeb/deb.go (+8/-0)
helpers/helpers.go (+1/-1)
To merge this branch: bzr merge lp:~sergiusens/snappy/go1.5
Reviewer Review Type Date Requested Status
Snappy Developers 2015-07-31 Pending
Review via email: mp+266557@code.launchpad.net

Commit message

Workaround and/or fix go 1.5 issues

To post a comment you must log in.

Unmerged revisions

626. By Sergio Schvezov on 2015-07-31

New go vet issue (missing return for fmt.Errorf)

625. By Sergio Schvezov on 2015-07-31

hardlinks tar'ed up as regular files explicitly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'clickdeb/deb.go'
2--- clickdeb/deb.go 2015-05-28 14:48:08 +0000
3+++ clickdeb/deb.go 2015-07-31 13:40:21 +0000
4@@ -335,6 +335,14 @@
5 return err
6 }
7
8+ // FIXME: our current implementation does not tar hard links correctly
9+ // and just duplicates the contents, this is just a workaround for
10+ // go 1.5
11+ if hdr.Typeflag == tar.TypeLink {
12+ hdr.Typeflag = tar.TypeReg
13+ hdr.Size = info.Size()
14+ }
15+
16 // tar.FileInfoHeader does include the fact that its a
17 // char/block device, but does not set major/minor :/
18 if helpers.IsDevice(st.Mode()) {
19
20=== modified file 'helpers/helpers.go'
21--- helpers/helpers.go 2015-07-01 21:09:59 +0000
22+++ helpers/helpers.go 2015-07-31 13:40:21 +0000
23@@ -490,7 +490,7 @@
24 // of atime/mtime and permissions
25 output, err := exec.Command("cp", "-va", src, dst).CombinedOutput()
26 if err != nil {
27- fmt.Errorf("Failed to copy %s to %s (%s)", src, dst, output)
28+ return fmt.Errorf("Failed to copy %s to %s (%s)", src, dst, output)
29 }
30 }
31 return nil

Subscribers

People subscribed via source and target branches