~mvo/snapd/+git/snapd-mvo:sanity-check-fuse-2

Last commit made on 2019-08-23
Get this branch:
git clone -b sanity-check-fuse-2 https://git.launchpad.net/~mvo/snapd/+git/snapd-mvo

Branch merges

Branch information

Name:
sanity-check-fuse-2
Repository:
lp:~mvo/snapd/+git/snapd-mvo

Recent commits

bbe45c5... by Maciej Borzecki

Merge remote-tracking branch 'upstream/master' into sanity-check-fuse-2

f229903... by Michael Vogt

Merge pull request #7312 from mvo5/deluser-userdel

tests: use user-tool to remove test user in the non-home test

d3ffdd7... by Paweł Stołowski

Merge pull request #7306 from stolowski/config-set-sort-keys

overlord/configstate: sort patch keys to have deterministic order with snap set

db52981... by Samuele Pedroni

many: generalize assertstate.Batch to asserts.Batch, have assertstate.AddBatch

This generalizes assertstate.Batch to asserts.Batch which grows a bit more functionality. To achieve the same result, assertstate.AddBatch subsuming assertstate.Batch.Precheck/Commit is introduced.

doFetch in assertstate is also switched to use asserts.Batch which can be built by fetching for convenience.

The fallback code for dealing with receiving unsupported format assertions, which should not happen except for bugs, is reorganized.

All now unused bits in assertstate are dropped.

e3c1e64... by Maciej Borzecki

Merge pull request #7273 from bboozzoo/bboozzoo/gadget-rename-to-layout

gadget, overlord/devicestate: rename Position/Layout

7966d04... by Michael Vogt

mkversion.sh: fix version from git checkouts

* mkversion.sh: fix version from git checkouts

The mkversion script is used during the build of the snapd snap.
Today its a bit naive and just uses "git describe" there to
generate the version number. The downside of this is that for
pre-releases like 2.41~pre1 we may end up with a version number
lower than the version in debian/changelog if the pre release
does not have a git tag. We historically don't tag pre/rc
releases and doing so would be a bit messy (IMO) so we need
a less naive approach to generate the version number.

This PR changes the mkversion.sh script to use something
similar to what a packaging recipe does to construct a version.

On the current master this will yield:
 2.41~pre1+git906.g45df4b1
instead of
 2.40+git872.gf9b531f

Which is what we want.

* mkversion.sh: use dpkg-parsechangelog only when it is available

583fe12... by Michael Vogt

Merge pull request #7315 from chipaca/download-leave-partial

store, image, cmd: make 'snap download' leave partials

3c22539... by Michael Vogt

Merge remote-tracking branch 'upstream/master' into deluser-userdel

db08846... by John Lenton

store: tiny refactor to make the code simpler

Thanks to @anonymouse64 for the discussion.

ebbb57e... by John Lenton

store, image, cmd: make 'snap download' leave partials

Without this change, a network error during a 'snap download' will
remove the .partial file.

While this is probably OK for snapd, as it's the simpler & safer
route¹, it's not OK for 'snap download'; the .partial should be left
so that a following 'snap download' will resume, as the user can see
and remove the file if needed.

So, this change adds a LeavePartialOnError to store.DownloadOptions,
exports it through image.DownloadOptions, and sets that to true in
cmd_download.

Also note, it explicitly makes sure it doesn't leave _empty_ partial
files, as those would just be noise.

----

1. We might want to revisit what we do in snapstate so that there also
we can resume, but it needs careful consideraiton of available space
and removing stale partial files, which is one of the hard problems.