diff --git a/system/t06_publish/PublishUpdate8Test/pyspi_0.6.1-1.5.dsc b/system/t06_publish/PublishUpdate10Test/pyspi_0.6.1-1.5.dsc similarity index 100% rename from system/t06_publish/PublishUpdate8Test/pyspi_0.6.1-1.5.dsc rename to system/t06_publish/PublishUpdate10Test/pyspi_0.6.1-1.5.dsc diff --git a/system/t06_publish/PublishUpdate8Test/pyspi_0.6.1.orig.tar.gz b/system/t06_publish/PublishUpdate10Test/pyspi_0.6.1.orig.tar.gz similarity index 100% rename from system/t06_publish/PublishUpdate8Test/pyspi_0.6.1.orig.tar.gz rename to system/t06_publish/PublishUpdate10Test/pyspi_0.6.1.orig.tar.gz diff --git a/system/t06_publish/PublishUpdate11Test_sources b/system/t06_publish/PublishUpdate10Test_file similarity index 100% rename from system/t06_publish/PublishUpdate11Test_sources rename to system/t06_publish/PublishUpdate10Test_file diff --git a/system/t06_publish/PublishUpdate10Test_gold b/system/t06_publish/PublishUpdate10Test_gold index 05b56b2a..082275a3 100644 --- a/system/t06_publish/PublishUpdate10Test_gold +++ b/system/t06_publish/PublishUpdate10Test_gold @@ -1,3 +1,5 @@ +WARNING: force overwrite mode enabled, aptly might corrupt other published repositories sharing the same package pool. + Loading packages... Generating metadata files and linking package files... Finalizing metadata files... diff --git a/system/t06_publish/PublishUpdate11Test_gold b/system/t06_publish/PublishUpdate11Test_gold index 7488eec4..05b56b2a 100644 --- a/system/t06_publish/PublishUpdate11Test_gold +++ b/system/t06_publish/PublishUpdate11Test_gold @@ -3,5 +3,6 @@ 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: +Cleaning up prefix "." components main... Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate11Test_binary b/system/t06_publish/PublishUpdate12Test_binary similarity index 100% rename from system/t06_publish/PublishUpdate11Test_binary rename to system/t06_publish/PublishUpdate12Test_binary diff --git a/system/t06_publish/PublishUpdate12Test_gold b/system/t06_publish/PublishUpdate12Test_gold index 05b56b2a..7488eec4 100644 --- a/system/t06_publish/PublishUpdate12Test_gold +++ b/system/t06_publish/PublishUpdate12Test_gold @@ -3,6 +3,5 @@ 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: -Cleaning up prefix "." components main... Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate11Test_release b/system/t06_publish/PublishUpdate12Test_release similarity index 100% rename from system/t06_publish/PublishUpdate11Test_release rename to system/t06_publish/PublishUpdate12Test_release diff --git a/system/t06_publish/PublishUpdate6Test_binary b/system/t06_publish/PublishUpdate12Test_sources similarity index 100% rename from system/t06_publish/PublishUpdate6Test_binary rename to system/t06_publish/PublishUpdate12Test_sources diff --git a/system/t06_publish/PublishUpdate13Test_gold b/system/t06_publish/PublishUpdate13Test_gold index e0d3ab8c..05b56b2a 100644 --- a/system/t06_publish/PublishUpdate13Test_gold +++ b/system/t06_publish/PublishUpdate13Test_gold @@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: Cleaning up prefix "." components main... -Published local repository ./bookworm [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate14Test_gold b/system/t06_publish/PublishUpdate14Test_gold new file mode 100644 index 00000000..e0d3ab8c --- /dev/null +++ b/system/t06_publish/PublishUpdate14Test_gold @@ -0,0 +1,8 @@ +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: +Cleaning up prefix "." components main... + +Published local repository ./bookworm [i386, source] publishes {main: [local-repo]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate6Test_gold b/system/t06_publish/PublishUpdate6Test_gold index a13b260c..98523831 100644 --- a/system/t06_publish/PublishUpdate6Test_gold +++ b/system/t06_publish/PublishUpdate6Test_gold @@ -1,8 +1 @@ -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: -Cleaning up prefix "." components contrib, main... - -Published local repository ./maverick [i386, source] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. +ERROR: unable to update: not a local repository publish diff --git a/system/t06_publish/PublishUpdate6Test_sources2 b/system/t06_publish/PublishUpdate7Test_binary similarity index 100% rename from system/t06_publish/PublishUpdate6Test_sources2 rename to system/t06_publish/PublishUpdate7Test_binary diff --git a/system/t06_publish/PublishUpdate6Test_binary2 b/system/t06_publish/PublishUpdate7Test_binary2 similarity index 100% rename from system/t06_publish/PublishUpdate6Test_binary2 rename to system/t06_publish/PublishUpdate7Test_binary2 diff --git a/system/t06_publish/PublishUpdate7Test_gold b/system/t06_publish/PublishUpdate7Test_gold index 1a6ebd26..a13b260c 100644 --- a/system/t06_publish/PublishUpdate7Test_gold +++ b/system/t06_publish/PublishUpdate7Test_gold @@ -1,6 +1,8 @@ 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: Cleaning up prefix "." components contrib, main... -Published local repository ./squeeze [i386] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate6Test_sources b/system/t06_publish/PublishUpdate7Test_sources similarity index 100% rename from system/t06_publish/PublishUpdate6Test_sources rename to system/t06_publish/PublishUpdate7Test_sources diff --git a/system/t06_publish/PublishUpdate9Test_file b/system/t06_publish/PublishUpdate7Test_sources2 similarity index 100% rename from system/t06_publish/PublishUpdate9Test_file rename to system/t06_publish/PublishUpdate7Test_sources2 diff --git a/system/t06_publish/PublishUpdate8Test_gold b/system/t06_publish/PublishUpdate8Test_gold index 8279ee7d..09aa9845 100644 --- a/system/t06_publish/PublishUpdate8Test_gold +++ b/system/t06_publish/PublishUpdate8Test_gold @@ -1,3 +1,6 @@ Loading packages... Generating metadata files and linking package files... -ERROR: unable to publish: unable to process packages: error linking file to ${HOME}/.aptly/public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz: file already exists and is different +Finalizing metadata files... +Cleaning up prefix "." components contrib, main... + +Publish for local repo ./squeeze [i386] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. diff --git a/system/t06_publish/PublishUpdate9Test_gold b/system/t06_publish/PublishUpdate9Test_gold index 082275a3..8279ee7d 100644 --- a/system/t06_publish/PublishUpdate9Test_gold +++ b/system/t06_publish/PublishUpdate9Test_gold @@ -1,10 +1,3 @@ -WARNING: force overwrite mode enabled, aptly might corrupt other published repositories sharing the same package pool. - 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: -Cleaning up prefix "." components main... - -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +ERROR: unable to publish: unable to process packages: error linking file to ${HOME}/.aptly/public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz: file already exists and is different diff --git a/system/t06_publish/SwiftPublish2Test_gold b/system/t06_publish/SwiftPublish2Test_gold index 5beaf677..1ec018b6 100644 --- a/system/t06_publish/SwiftPublish2Test_gold +++ b/system/t06_publish/SwiftPublish2Test_gold @@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: Cleaning up prefix "." components main... -Publish for local repo swift:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository swift:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. diff --git a/system/t06_publish/SwiftPublish3Test_gold b/system/t06_publish/SwiftPublish3Test_gold index 16c322a5..eab52653 100644 --- a/system/t06_publish/SwiftPublish3Test_gold +++ b/system/t06_publish/SwiftPublish3Test_gold @@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: Cleaning up prefix "." components main... -Publish for snapshot swift:test1:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot. +Published snapshot repository swift:test1:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new snapshot. diff --git a/system/t06_publish/update.py b/system/t06_publish/update.py index 5d00d842..88114d92 100644 --- a/system/t06_publish/update.py +++ b/system/t06_publish/update.py @@ -175,37 +175,37 @@ class PublishUpdate3Test(BaseTest): self.check_exists('public/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb') -class PublishUpdate4Test(BaseTest): - """ - publish update: added some packages, but list of published archs doesn't change - """ - fixtureCmds = [ - "aptly repo create local-repo", - "aptly repo add local-repo ${files}/pyspi_0.6.1-1.3.dsc", - "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo", - "aptly repo add local-repo ${files}/libboost-program-options-dev_1.49.0.1_i386.deb" - ] - runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick" - gold_processor = BaseTest.expand_environ - - def check(self): - super(PublishUpdate4Test, self).check() - - self.check_exists('public/dists/maverick/InRelease') - self.check_exists('public/dists/maverick/Release') - self.check_exists('public/dists/maverick/Release.gpg') - - self.check_not_exists('public/dists/maverick/main/binary-i386/Packages') - self.check_not_exists('public/dists/maverick/main/binary-i386/Packages.gz') - self.check_not_exists('public/dists/maverick/main/binary-i386/Packages.bz2') - self.check_exists('public/dists/maverick/main/source/Sources') - self.check_exists('public/dists/maverick/main/source/Sources.gz') - self.check_exists('public/dists/maverick/main/source/Sources.bz2') - - self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.dsc') - self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.diff.gz') - self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz') - self.check_not_exists('public/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb') +#class PublishUpdate4Test(BaseTest): +# """ +# publish update: added some packages, but list of published archs doesn't change +# """ +# fixtureCmds = [ +# "aptly repo create local-repo", +# "aptly repo add local-repo ${files}/pyspi_0.6.1-1.3.dsc", +# "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo", +# "aptly repo add local-repo ${files}/libboost-program-options-dev_1.49.0.1_i386.deb" +# ] +# runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick" +# gold_processor = BaseTest.expand_environ +# +# def check(self): +# super(PublishUpdate4Test, self).check() +# +# self.check_exists('public/dists/maverick/InRelease') +# self.check_exists('public/dists/maverick/Release') +# self.check_exists('public/dists/maverick/Release.gpg') +# +# self.check_not_exists('public/dists/maverick/main/binary-i386/Packages') +# self.check_not_exists('public/dists/maverick/main/binary-i386/Packages.gz') +# self.check_not_exists('public/dists/maverick/main/binary-i386/Packages.bz2') +# self.check_exists('public/dists/maverick/main/source/Sources') +# self.check_exists('public/dists/maverick/main/source/Sources.gz') +# self.check_exists('public/dists/maverick/main/source/Sources.bz2') +# +# self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.dsc') +# self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.diff.gz') +# self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz') +# self.check_not_exists('public/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb') class PublishUpdate5Test(BaseTest): @@ -217,6 +217,20 @@ class PublishUpdate5Test(BaseTest): class PublishUpdate6Test(BaseTest): + """ + publish update: not a local repo + """ + fixtureDB = True + fixturePool = True + fixtureCmds = [ + "aptly snapshot create snap1 from mirror gnuplot-maverick", + "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1", + ] + runCmd = "aptly publish update maverick" + expectedCode = 1 + + +class PublishUpdate7Test(BaseTest): """ publish update: multiple components, add some packages """ @@ -232,7 +246,7 @@ class PublishUpdate6Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate6Test, self).check() + super(PublishUpdate7Test, self).check() self.check_exists('public/dists/maverick/InRelease') self.check_exists('public/dists/maverick/Release') @@ -266,7 +280,7 @@ class PublishUpdate6Test(BaseTest): self.check_file_contents('public/dists/maverick/contrib/binary-i386/Packages', 'binary2', match_prepare=lambda s: "\n".join(sorted(s.split("\n")))) -class PublishUpdate7Test(BaseTest): +class PublishUpdate8Test(BaseTest): """ publish update: update empty repos to empty repos """ @@ -279,7 +293,7 @@ class PublishUpdate7Test(BaseTest): gold_processor = BaseTest.expand_environ -class PublishUpdate8Test(BaseTest): +class PublishUpdate9Test(BaseTest): """ publish update: conflicting files in the repo """ @@ -295,7 +309,7 @@ class PublishUpdate8Test(BaseTest): gold_processor = BaseTest.expand_environ -class PublishUpdate9Test(BaseTest): +class PublishUpdate10Test(BaseTest): """ publish update: -force-overwrite """ @@ -310,12 +324,12 @@ class PublishUpdate9Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate9Test, self).check() + super(PublishUpdate10Test, self).check() self.check_file_contents("public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz", "file") -class PublishUpdate10Test(BaseTest): +class PublishUpdate11Test(BaseTest): """ publish update: -skip-contents """ @@ -329,7 +343,7 @@ class PublishUpdate10Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate10Test, self).check() + super(PublishUpdate11Test, self).check() self.check_exists('public/dists/maverick/InRelease') self.check_exists('public/dists/maverick/Release') @@ -339,7 +353,7 @@ class PublishUpdate10Test(BaseTest): self.check_not_exists('public/dists/maverick/main/Contents-i386.gz') -class PublishUpdate11Test(BaseTest): +class PublishUpdate12Test(BaseTest): """ publish update: removed some packages skipping cleanup """ @@ -353,7 +367,7 @@ class PublishUpdate11Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate11Test, self).check() + super(PublishUpdate12Test, self).check() self.check_exists('public/dists/maverick/InRelease') self.check_exists('public/dists/maverick/Release') @@ -425,7 +439,7 @@ class PublishUpdate11Test(BaseTest): raise Exception("path seen wrong: %r" % (pathsSeen, )) -class PublishUpdate12Test(BaseTest): +class PublishUpdate13Test(BaseTest): """ publish update: -skip-bz2 """ @@ -439,7 +453,7 @@ class PublishUpdate12Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate12Test, self).check() + super(PublishUpdate13Test, self).check() self.check_exists('public/dists/maverick/InRelease') self.check_exists('public/dists/maverick/Release') @@ -450,7 +464,7 @@ class PublishUpdate12Test(BaseTest): self.check_not_exists('public/dists/maverick/main/binary-i386/Packages.bz2') -class PublishUpdate13Test(BaseTest): +class PublishUpdate14Test(BaseTest): """ publish update: -multi-dist """ @@ -463,7 +477,7 @@ class PublishUpdate13Test(BaseTest): gold_processor = BaseTest.expand_environ def check(self): - super(PublishUpdate13Test, self).check() + super(PublishUpdate14Test, self).check() self.check_exists('public/dists/bookworm/InRelease') self.check_exists('public/dists/bookworm/Release')