Add -force-replace flag to repo aptly add to replace conflicting packages. #83

This commit is contained in:
Andrey Smirnov
2014-09-01 17:59:29 +04:00
parent de32595d29
commit 0130fc0392
8 changed files with 58 additions and 1 deletions
+1 -1
View File
@@ -203,8 +203,8 @@ class BaseTest(object):
raise
def check_cmd_output(self, command, gold_name, match_prepare=None, expected_code=0):
output = self.run_cmd(command, expected_code=expected_code)
try:
output = self.run_cmd(command, expected_code=expected_code)
self.verify_match(self.get_gold(gold_name), output, match_prepare)
except:
if self.captureResults:
@@ -0,0 +1,12 @@
Format: 1.0
Source: pyspi
Binary: python-at-spi
Architecture: any
Version: 0.6.1-1.3
Maintainer: Jose Carlos Garcia Sogo <jsogo@debian.org>
Homepage: http://people.redhat.com/zcerza/dogtail
Standards-Version: 3.7.3
Vcs-Svn: svn://svn.tribulaciones.org/srv/svn/pyspi/trunk
Build-Depends: debhelper (>= 5), cdbs, libatspi-dev, python-pyrex, python-support (>= 0.4), python-all-dev, libx11-dev
Files:
d41d8cd98f00b204e9800998ecf8427e 0 pyspi_0.6.1.orig.tar.gz
+3
View File
@@ -0,0 +1,3 @@
Loading packages...
[-] pyspi_0.6.1-1.3_source removed due to conflict with package being added
[+] pyspi_0.6.1-1.3_source added
+7
View File
@@ -0,0 +1,7 @@
Name: repo11
Comment: Repo11
Default Distribution: squeeze
Default Component: main
Number of packages: 1
Packages:
pyspi_0.6.1-1.3_source
+16
View File
@@ -216,3 +216,19 @@ class AddRepo10Test(BaseTest):
def check(self):
self.check_output()
self.check_cmd_output("aptly repo show -with-packages repo10", "repo_show")
class AddRepo11Test(BaseTest):
"""
add package to local repo: conflict in packages + -force-replace
"""
fixtureCmds = [
"aptly repo create -comment=Repo11 -distribution=squeeze repo11",
"aptly repo add repo11 ${files}/pyspi_0.6.1-1.3.dsc",
]
runCmd = "aptly repo add -force-replace repo11 ${testfiles}/pyspi_0.6.1-1.3.conflict.dsc"
outputMatchPrepare = lambda self, s: s.replace(os.path.join(os.path.dirname(inspect.getsourcefile(self.__class__)), self.__class__.__name__), "").replace(os.path.join(os.path.dirname(inspect.getsourcefile(BaseTest)), "files"), "")
def check(self):
self.check_output()
self.check_cmd_output("aptly repo show -with-packages repo11", "repo_show")