Fix bug with PoolPath field being overwritten on mirror update

While updating mirror, if package file is already in pool path,
field `PoolPath` was left as empty which results in package file
being unavailable later on while publishing.
This commit is contained in:
Andrey Smirnov
2017-08-11 20:05:55 +03:00
parent 587bfd742f
commit a584b2e058
7 changed files with 69 additions and 24 deletions
@@ -0,0 +1,13 @@
Loading packages...
Generating metadata files and linking package files...
Finalizing metadata files...
Signing file 'Release' with gpg, please enter your passphrase when prompted:
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
Snapshot wheezy has been successfully published.
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
Now you can add following line to apt sources:
deb http://your-server/ wheezy main
Don't forget to add your GPG key to apt with apt-key.
You can also use `aptly serve` to publish your repositories over HTTP quickly.
+15
View File
@@ -1001,3 +1001,18 @@ class PublishSnapshot36Test(BaseTest):
self.check_not_exists('public/dists/maverick/main/Contents-i386.gz')
self.check_exists('public/dists/maverick/main/binary-amd64/Release')
self.check_not_exists('public/dists/maverick/main/Contents-amd64.gz')
class PublishSnapshot37Test(BaseTest):
"""
publish snapshot: mirror with double mirror update
"""
fixtureGpg = True
fixtureCmds = [
"aptly -architectures=i386,amd64 mirror create -keyring=aptlytest.gpg -filter='$$Source (gnupg)' -with-udebs wheezy http://mirror.yandex.ru/debian/ wheezy main non-free",
"aptly mirror update -keyring=aptlytest.gpg wheezy",
"aptly mirror update -keyring=aptlytest.gpg wheezy",
"aptly snapshot create wheezy from mirror wheezy",
]
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec wheezy"
gold_processor = BaseTest.expand_environ