Default distribution/component could be specified when creating repo. #12

This commit is contained in:
Andrey Smirnov
2014-03-26 21:24:09 +04:00
parent 7f2f435e2d
commit 0f8f43b9f0
38 changed files with 113 additions and 49 deletions
+4
View File
@@ -15,6 +15,8 @@ func aptlyRepoCreate(cmd *commander.Command, args []string) error {
} }
repo := debian.NewLocalRepo(args[0], cmd.Flag.Lookup("comment").Value.String()) repo := debian.NewLocalRepo(args[0], cmd.Flag.Lookup("comment").Value.String())
repo.DefaultDistribution = cmd.Flag.Lookup("distribution").Value.String()
repo.DefaultComponent = cmd.Flag.Lookup("component").Value.String()
err = context.collectionFactory.LocalRepoCollection().Add(repo) err = context.collectionFactory.LocalRepoCollection().Add(repo)
if err != nil { if err != nil {
@@ -43,6 +45,8 @@ Example:
} }
cmd.Flag.String("comment", "", "any text that would be used to described local repository") cmd.Flag.String("comment", "", "any text that would be used to described local repository")
cmd.Flag.String("distribution", "", "default distribution when publishing")
cmd.Flag.String("component", "main", "default component when publishing")
return cmd return cmd
} }
+2
View File
@@ -27,6 +27,8 @@ func aptlyRepoShow(cmd *commander.Command, args []string) error {
fmt.Printf("Name: %s\n", repo.Name) fmt.Printf("Name: %s\n", repo.Name)
fmt.Printf("Comment: %s\n", repo.Comment) fmt.Printf("Comment: %s\n", repo.Comment)
fmt.Printf("Default Distribution: %s\n", repo.DefaultDistribution)
fmt.Printf("Default Component: %s\n", repo.DefaultComponent)
fmt.Printf("Number of packages: %d\n", repo.NumPackages()) fmt.Printf("Number of packages: %d\n", repo.NumPackages())
withPackages := cmd.Flag.Lookup("with-packages").Value.Get().(bool) withPackages := cmd.Flag.Lookup("with-packages").Value.Get().(bool)
+2
View File
@@ -1,5 +1,7 @@
Name: repo10 Name: repo10
Comment: Repo10 Comment: Repo10
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Repo1 Comment: Repo1
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Repo2 Comment: Repo2
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
pyspi_0.6.1-1.3_source pyspi_0.6.1-1.3_source
+2
View File
@@ -1,5 +1,7 @@
Name: repo3 Name: repo3
Comment: Repo3 Comment: Repo3
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo4 Name: repo4
Comment: Repo4 Comment: Repo4
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,3 +1,5 @@
Name: repo5 Name: repo5
Comment: Repo5 Comment: Repo5
Default Distribution: squeeze
Default Component: main
Number of packages: 0 Number of packages: 0
+2
View File
@@ -1,5 +1,7 @@
Name: repo8 Name: repo8
Comment: Repo8 Comment: Repo8
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
pyspi_0.6.1-1.3_source pyspi_0.6.1-1.3_source
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,4 +1,6 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 0 Number of packages: 0
Packages: Packages:
@@ -1,3 +1,5 @@
Name: repo1 Name: repo1
Comment: Comment:
Default Distribution:
Default Component: main
Number of packages: 0 Number of packages: 0
@@ -1,3 +1,5 @@
Name: repo2 Name: repo2
Comment: Repository2 Comment: Repository2
Default Distribution: maverick
Default Component: non-free
Number of packages: 0 Number of packages: 0
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 5 Number of packages: 5
Packages: Packages:
nginx_1.2.1-2.2+wheezy2_all nginx_1.2.1-2.2+wheezy2_all
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 20 Number of packages: 20
Packages: Packages:
gcc-4.7-base_4.7.2-5_amd64 gcc-4.7-base_4.7.2-5_amd64
@@ -1,4 +1,6 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 0 Number of packages: 0
Packages: Packages:
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
pyspi_0.6.1-1.3_source pyspi_0.6.1-1.3_source
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
pyspi_0.6.1-1.3_source pyspi_0.6.1-1.3_source
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 2 Number of packages: 2
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,5 +1,7 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,4 +1,6 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 0 Number of packages: 0
Packages: Packages:
@@ -1,5 +1,7 @@
Name: local-repo Name: local-repo
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
@@ -1,5 +1,7 @@
Name: local-repo Name: local-repo
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 1 Number of packages: 1
Packages: Packages:
pyspi_0.6.1-1.3_source pyspi_0.6.1-1.3_source
@@ -1,5 +1,7 @@
Name: local-repo Name: local-repo
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+2
View File
@@ -1,3 +1,5 @@
Name: repo1 Name: repo1
Comment: Cool Comment: Cool
Default Distribution: squeeze
Default Component: main
Number of packages: 0 Number of packages: 0
+2
View File
@@ -1,5 +1,7 @@
Name: repo2 Name: repo2
Comment: Cool Comment: Cool
Default Distribution: wheezy
Default Component: contrib
Number of packages: 3 Number of packages: 3
Packages: Packages:
libboost-program-options-dev_1.49.0.1_i386 libboost-program-options-dev_1.49.0.1_i386
+9 -9
View File
@@ -10,7 +10,7 @@ class AddRepo1Test(BaseTest):
add package to local repo: .deb file add package to local repo: .deb file
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo1 repo1", "aptly repo create -comment=Repo1 -distribution=squeeze repo1",
] ]
runCmd = "aptly repo add repo1 ${files}/libboost-program-options-dev_1.49.0.1_i386.deb" runCmd = "aptly repo add repo1 ${files}/libboost-program-options-dev_1.49.0.1_i386.deb"
@@ -27,7 +27,7 @@ class AddRepo2Test(BaseTest):
add package to local repo: .dsc file add package to local repo: .dsc file
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo2 repo2", "aptly repo create -comment=Repo2 -distribution=squeeze repo2",
] ]
runCmd = "aptly repo add repo2 ${files}/pyspi_0.6.1-1.3.dsc ${files}/pyspi-0.6.1-1.3.stripped.dsc" runCmd = "aptly repo add repo2 ${files}/pyspi_0.6.1-1.3.dsc ${files}/pyspi-0.6.1-1.3.stripped.dsc"
@@ -47,7 +47,7 @@ class AddRepo3Test(BaseTest):
add package to local repo: directory add package to local repo: directory
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo3 repo3", "aptly repo create -comment=Repo3 -distribution=squeeze repo3",
] ]
runCmd = "aptly repo add repo3 ${files}" runCmd = "aptly repo add repo3 ${files}"
@@ -68,7 +68,7 @@ class AddRepo4Test(BaseTest):
add package to local repo: complex directory + remove add package to local repo: complex directory + remove
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo4 repo4", "aptly repo create -comment=Repo4 -distribution=squeeze repo4",
] ]
runCmd = "aptly repo add -remove-files repo4 " runCmd = "aptly repo add -remove-files repo4 "
@@ -121,7 +121,7 @@ class AddRepo5Test(BaseTest):
add package to local repo: some source files missing add package to local repo: some source files missing
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo5 repo5", "aptly repo create -comment=Repo5 -distribution=squeeze repo5",
] ]
runCmd = "aptly repo add repo5 " runCmd = "aptly repo add repo5 "
outputMatchPrepare = lambda self, s: s.replace(self.tempSrcDir, "") outputMatchPrepare = lambda self, s: s.replace(self.tempSrcDir, "")
@@ -151,7 +151,7 @@ class AddRepo6Test(BaseTest):
add package to local repo: missing file add package to local repo: missing file
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo6 repo6", "aptly repo create -comment=Repo6 -distribution=squeeze repo6",
] ]
runCmd = "aptly repo add repo6 no-such-file" runCmd = "aptly repo add repo6 no-such-file"
@@ -169,7 +169,7 @@ class AddRepo8Test(BaseTest):
add package to local repo: conflict in packages add package to local repo: conflict in packages
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo8 repo8", "aptly repo create -comment=Repo8 -distribution=squeeze repo8",
"aptly repo add repo8 ${files}/pyspi_0.6.1-1.3.dsc", "aptly repo add repo8 ${files}/pyspi_0.6.1-1.3.dsc",
] ]
runCmd = "aptly repo add repo8 ${testfiles}/pyspi_0.6.1-1.3.conflict.dsc" runCmd = "aptly repo add repo8 ${testfiles}/pyspi_0.6.1-1.3.conflict.dsc"
@@ -184,7 +184,7 @@ class AddRepo9Test(BaseTest):
add package to local repo: conflict in files add package to local repo: conflict in files
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo9 repo9", "aptly repo create -comment=Repo9 -distribution=squeeze repo9",
] ]
runCmd = "aptly repo add repo9 ${files}/pyspi_0.6.1-1.3.dsc" runCmd = "aptly repo add repo9 ${files}/pyspi_0.6.1-1.3.dsc"
outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "") outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "")
@@ -203,7 +203,7 @@ class AddRepo10Test(BaseTest):
add package to local repo: double import add package to local repo: double import
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Repo10 repo10", "aptly repo create -comment=Repo10 -distribution=squeeze repo10",
"aptly repo add repo10 ${files}", "aptly repo add repo10 ${files}",
] ]
runCmd = "aptly repo add repo10 ${files}/pyspi_0.6.1-1.3.dsc" runCmd = "aptly repo add repo10 ${files}/pyspi_0.6.1-1.3.dsc"
+7 -7
View File
@@ -7,7 +7,7 @@ class ImportRepo1Test(BaseTest):
""" """
fixtureDB = True fixtureDB = True
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo import wheezy-main repo1 nginx unpaper_0.4.2-1_amd64" runCmd = "aptly repo import wheezy-main repo1 nginx unpaper_0.4.2-1_amd64"
@@ -26,7 +26,7 @@ class ImportRepo2Test(BaseTest):
""" """
fixtureDB = True fixtureDB = True
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly -architectures=i386,amd64 repo import -with-deps wheezy-main repo1 dpkg_1.16.12_i386 userinfo_2.2-3_amd64" runCmd = "aptly -architectures=i386,amd64 repo import -with-deps wheezy-main repo1 dpkg_1.16.12_i386 userinfo_2.2-3_amd64"
@@ -45,7 +45,7 @@ class ImportRepo3Test(BaseTest):
""" """
fixtureDB = True fixtureDB = True
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo import -with-deps wheezy-contrib repo1 redeclipse" runCmd = "aptly repo import -with-deps wheezy-contrib repo1 redeclipse"
expectedCode = 1 expectedCode = 1
@@ -60,7 +60,7 @@ class ImportRepo4Test(BaseTest):
""" """
fixtureDB = True fixtureDB = True
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly -architectures=i386,amd64 repo import -dry-run -with-deps wheezy-contrib repo1 redeclipse-dbg" runCmd = "aptly -architectures=i386,amd64 repo import -dry-run -with-deps wheezy-contrib repo1 redeclipse-dbg"
@@ -78,7 +78,7 @@ class ImportRepo5Test(BaseTest):
""" """
fixtureDB = True fixtureDB = True
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo import wheezy-contrib repo1 'pyspi >> 0.6.1-1.3)'" runCmd = "aptly repo import wheezy-contrib repo1 'pyspi >> 0.6.1-1.3)'"
expectedCode = 1 expectedCode = 1
@@ -92,7 +92,7 @@ class ImportRepo6Test(BaseTest):
import to local repo: non-updated mirror import to local repo: non-updated mirror
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ wheezy", "aptly mirror create --ignore-signatures mirror1 http://mirror.yandex.ru/debian/ wheezy",
] ]
runCmd = "aptly repo import mirror1 repo1 nginx" runCmd = "aptly repo import mirror1 repo1 nginx"
@@ -115,7 +115,7 @@ class ImportRepo8Test(BaseTest):
import to local repo: no src import to local repo: no src
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo import wheezy-main repo1 pyspi" runCmd = "aptly repo import wheezy-main repo1 pyspi"
expectedCode = 1 expectedCode = 1
+13 -13
View File
@@ -6,8 +6,8 @@ class CopyRepo1Test(BaseTest):
copy in local repo: simple copy copy in local repo: simple copy
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo copy repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo copy repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -26,8 +26,8 @@ class CopyRepo2Test(BaseTest):
copy in local repo: simple copy w/deps copy in local repo: simple copy w/deps
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly -architectures=i386,amd64 repo copy -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly -architectures=i386,amd64 repo copy -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -46,8 +46,8 @@ class CopyRepo3Test(BaseTest):
copy in local repo: simple copy w/deps but w/o archs copy in local repo: simple copy w/deps but w/o archs
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo copy -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo copy -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -62,8 +62,8 @@ class CopyRepo4Test(BaseTest):
copy in local repo: dry run copy in local repo: dry run
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo copy -dry-run repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo copy -dry-run repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -82,8 +82,8 @@ class CopyRepo5Test(BaseTest):
copy in local repo: wrong dep copy in local repo: wrong dep
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo copy repo1 repo2 'pyspi >> 0.6.1-1.3)'" runCmd = "aptly repo copy repo1 repo2 'pyspi >> 0.6.1-1.3)'"
@@ -98,7 +98,7 @@ class CopyRepo6Test(BaseTest):
copy in local repo: same src and dest copy in local repo: same src and dest
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo copy repo1 repo1 pyspi" runCmd = "aptly repo copy repo1 repo1 pyspi"
expectedCode = 1 expectedCode = 1
@@ -109,7 +109,7 @@ class CopyRepo7Test(BaseTest):
copy in local repo: no dst copy in local repo: no dst
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo copy repo1 repo2 pyspi" runCmd = "aptly repo copy repo1 repo2 pyspi"
expectedCode = 1 expectedCode = 1
@@ -120,7 +120,7 @@ class CopyRepo8Test(BaseTest):
copy in local repo: no src copy in local repo: no src
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
] ]
runCmd = "aptly repo copy repo1 repo2 pyspi" runCmd = "aptly repo copy repo1 repo2 pyspi"
expectedCode = 1 expectedCode = 1
+2 -2
View File
@@ -14,9 +14,9 @@ class CreateRepo1Test(BaseTest):
class CreateRepo2Test(BaseTest): class CreateRepo2Test(BaseTest):
""" """
create local repo: regular repo with comment create local repo: regular repo with comment & publishing defaults
""" """
runCmd = "aptly repo create -comment=Repository2 repo2" runCmd = "aptly repo create -comment=Repository2 -distribution=maverick -component=non-free repo2"
def check(self): def check(self):
self.check_output() self.check_output()
+13 -13
View File
@@ -6,8 +6,8 @@ class MoveRepo1Test(BaseTest):
move in local repo: simple move move in local repo: simple move
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo move repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo move repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -26,8 +26,8 @@ class MoveRepo2Test(BaseTest):
move in local repo: simple move w/deps move in local repo: simple move w/deps
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly -architectures=i386,amd64 repo move -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly -architectures=i386,amd64 repo move -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -46,8 +46,8 @@ class MoveRepo3Test(BaseTest):
move in local repo: simple move w/deps but w/o archs move in local repo: simple move w/deps but w/o archs
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo move -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo move -with-deps repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -62,8 +62,8 @@ class MoveRepo4Test(BaseTest):
move in local repo: dry run move in local repo: dry run
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo move -dry-run repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo move -dry-run repo1 repo2 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -82,8 +82,8 @@ class MoveRepo5Test(BaseTest):
move in local repo: wrong dep move in local repo: wrong dep
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
"aptly repo add repo1 ${files}" "aptly repo add repo1 ${files}"
] ]
runCmd = "aptly repo move repo1 repo2 'pyspi >> 0.6.1-1.3)'" runCmd = "aptly repo move repo1 repo2 'pyspi >> 0.6.1-1.3)'"
@@ -98,7 +98,7 @@ class MoveRepo6Test(BaseTest):
move in local repo: same src and dest move in local repo: same src and dest
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo move repo1 repo1 pyspi" runCmd = "aptly repo move repo1 repo1 pyspi"
expectedCode = 1 expectedCode = 1
@@ -109,7 +109,7 @@ class MoveRepo7Test(BaseTest):
move in local repo: no dst move in local repo: no dst
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo1", "aptly repo create -comment=Cool -distribution=squeeze repo1",
] ]
runCmd = "aptly repo move repo1 repo2 pyspi" runCmd = "aptly repo move repo1 repo2 pyspi"
expectedCode = 1 expectedCode = 1
@@ -120,7 +120,7 @@ class MoveRepo8Test(BaseTest):
move in local repo: no src move in local repo: no src
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=squeeze repo2",
] ]
runCmd = "aptly repo move repo1 repo2 pyspi" runCmd = "aptly repo move repo1 repo2 pyspi"
expectedCode = 1 expectedCode = 1
+3 -3
View File
@@ -6,7 +6,7 @@ class RemoveRepo1Test(BaseTest):
remove from local repo: as dep remove from local repo: as dep
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool local-repo", "aptly repo create -comment=Cool -distribution=squeeze local-repo",
"aptly repo add local-repo ${files}" "aptly repo add local-repo ${files}"
] ]
runCmd = "aptly repo remove local-repo pyspi some" runCmd = "aptly repo remove local-repo pyspi some"
@@ -24,7 +24,7 @@ class RemoveRepo2Test(BaseTest):
remove from local repo: as dep with version, key remove from local repo: as dep with version, key
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool local-repo", "aptly repo create -comment=Cool -distribution=squeeze local-repo",
"aptly repo add local-repo ${files}" "aptly repo add local-repo ${files}"
] ]
runCmd = "aptly repo remove local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo remove local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
@@ -50,7 +50,7 @@ class RemoveRepo4Test(BaseTest):
remove from local repo: dry run remove from local repo: dry run
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool local-repo", "aptly repo create -comment=Cool -distribution=squeeze local-repo",
"aptly repo add local-repo ${files}" "aptly repo add local-repo ${files}"
] ]
runCmd = "aptly repo remove -dry-run local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386" runCmd = "aptly repo remove -dry-run local-repo 'pyspi (>> 0.6.1-1.3)' libboost-program-options-dev_1.49.0.1_i386"
+2 -2
View File
@@ -5,7 +5,7 @@ class ShowRepo1Test(BaseTest):
""" """
show local repo: regular show local repo: regular
""" """
fixtureCmds = ["aptly repo create -comment=Cool repo1"] fixtureCmds = ["aptly repo create -comment=Cool -distribution=squeeze repo1"]
runCmd = "aptly repo show repo1" runCmd = "aptly repo show repo1"
@@ -14,7 +14,7 @@ class ShowRepo2Test(BaseTest):
show local repo: -with-packages show local repo: -with-packages
""" """
fixtureCmds = [ fixtureCmds = [
"aptly repo create -comment=Cool repo2", "aptly repo create -comment=Cool -distribution=wheezy -component=contrib repo2",
"aptly repo add repo2 ${files}" "aptly repo add repo2 ${files}"
] ]
runCmd = "aptly repo show -with-packages repo2" runCmd = "aptly repo show -with-packages repo2"