From: Tomas Mlcoch Date: Mon, 24 Feb 2014 12:49:48 +0000 (+0100) Subject: DeltaRepo: Implemented apply_resolved_path X-Git-Tag: upstream/0.10.0~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b58d31ef7fa94e5b3dbeff49efb790ea288585d;p=services%2Fcreaterepo_c.git DeltaRepo: Implemented apply_resolved_path --- diff --git a/deltarepo/deltarepo.py b/deltarepo/deltarepo.py index c375a50..44fff41 100755 --- a/deltarepo/deltarepo.py +++ b/deltarepo/deltarepo.py @@ -31,7 +31,7 @@ def parse_options(): #parser.add_option("-l", "--list-datatypes", action="store_true", # help="List datatypes for which delta is supported.") parser.add_argument("-o", "--outputdir", action="store", metavar="DIR", - help="Output directory.", default="./") + help="Output directory.", default=None) parser.add_argument("-d", "--database", action="store_true", help="Force database generation") parser.add_argument("--ignore-missing", action="store_true", diff --git a/deltarepo/deltarepo/applicator.py b/deltarepo/deltarepo/applicator.py index fcd675d..081a02b 100644 --- a/deltarepo/deltarepo/applicator.py +++ b/deltarepo/deltarepo/applicator.py @@ -357,7 +357,7 @@ class DeltaRepoApplicator(LoggingInterface): # Final move if os.path.exists(self.final_path): - self._warning("Destination dir already exists! Removing %s" % \ + self._debug("Destination dir already exists! Removing %s" % \ self.final_path) shutil.rmtree(self.final_path) self._debug("Moving %s -> %s" % (self.new_repodata_path, self.final_path)) diff --git a/deltarepo/deltarepo/updater_common.py b/deltarepo/deltarepo/updater_common.py index 3e5306d..b8514c4 100644 --- a/deltarepo/deltarepo/updater_common.py +++ b/deltarepo/deltarepo/updater_common.py @@ -2,6 +2,7 @@ import shutil import os import pprint import os.path +import time import librepo import tempfile import createrepo_c as cr @@ -533,61 +534,53 @@ class Updater(LoggingInterface): def apply_resolved_path(self, resolved_path): # TODO: Make it look better (progressbar, etc.) - counter = 0 + counter = 1 tmpdir = tempfile.mkdtemp(prefix="deltarepos-", dir="/tmp") - targetrepo = tempfile.mkdtemp(prefix="targetrepo", dir=tmpdir) - self._debug("Using temporary dir for downloading: {0}".format(tmpdir)) + tmprepo = tempfile.mkdtemp(prefix="targetrepo", dir=tmpdir) + prevrepo = self.localrepo.path + + self._debug("Using temporary directory: {0}".format(tmpdir)) for link in resolved_path: # Download repo - print("Downloading delta repo {0}".format(link.deltarepourl)) + self._info("{0:2}/{1:<2} Downloading delta repo {2}".format( + counter, len(resolved_path), link.deltarepourl)) dirname = "deltarepo_{0:02}".format(counter) destdir = os.path.join(tmpdir, dirname) os.mkdir(destdir) repo = Updater.DownloadedRepo(link.deltarepourl) repo.download(destdir) - counter += 1 # Apply repo - da = DeltaRepoApplicator(self.localrepo.path, + self._info("{0:2}/{1:<2} Applying delta repo".format( + counter, len(resolved_path))) + da = DeltaRepoApplicator(prevrepo, destdir, - out_path=targetrepo, + out_path=tmprepo, logger=self.logger, ignore_missing=True) da.apply() - # def update(self, target_contenthash, target_contenthash_type="sha256"): - # """Transform the localrepo to the version specified - # by the target_contenthash""" - # - # if not self.localrepo.contenthash or not self.localrepo.contenthash_type: - # raise DeltaRepoError("content hash is not specified in localrepo") - # - # if self.localrepo.contenthash_type != target_contenthash_type: - # raise DeltaRepoError("Contenthash type mishmash - LocalRepo {0}, " - # "Target: {1}".format(self.localrepo.contenthash_type, - # target_contenthash_type)) - # - # resolved_path = self.updatesolver.resolve_path(self.localrepo.contenthash, - # target_contenthash, - # target_contenthash_type) - # - # if not resolved_path: - # raise DeltaRepoError("Path \'{0}\'->\'{1}\' ({2}) cannot " - # "be resolved".format(self.localrepo.contenthash, - # target_contenthash, - # target_contenthash_type)) - # - # self.apply_resolved_path(resolved_path) - - #def update_to_current(self, originrepo): - # target_contenthash_type = self.localrepo.contenthash_type - # _, target_contenthash = self.find_repo_contenthash(originrepo, - # target_contenthash_type) - # if not target_contenthash: - # raise DeltaRepoError("Cannot determine contenthash ({0}) " - # "of originrepo".format(target_contenthash_type)) - # - # self.update(target_contenthash, - # target_contenthash_type=target_contenthash_type) - # + counter += 1 + prevrepo = tmprepo + + # Move updated repo to the final destination + dirname = os.path.dirname(self.localrepo.path) + basename = ".deltarepo-repodata-{0}-{1}".format(time.time(), os.getpid()) + targettmprepodata = os.path.join(dirname, basename) + originaltmprepodata = targettmprepodata+"-original" + tmprepodata = os.path.join(tmprepo, "repodata") + originalrepodatapath = os.path.join(self.localrepo.path, "repodata") + + self._debug("Final move to {0}".format(self.localrepo.path)) + + self._debug("Copying {0} -> {1}".format(tmprepodata, targettmprepodata)) + shutil.copytree(tmprepodata, targettmprepodata) + self._debug("Moving {0} -> {1}".format(originalrepodatapath, originaltmprepodata)) + shutil.move(originalrepodatapath, originaltmprepodata) + self._debug("Moving {0} -> {1}".format(targettmprepodata, originalrepodatapath)) + shutil.move(targettmprepodata, originalrepodatapath) + self._debug("Removing {0}".format(originaltmprepodata)) + shutil.rmtree(originaltmprepodata) + self._debug("Removing {0}".format(tmpdir)) + shutil.rmtree(tmpdir) diff --git a/deltarepo/example/test.sh b/deltarepo/example/test.sh index 130aff5..12239f0 100755 --- a/deltarepo/example/test.sh +++ b/deltarepo/example/test.sh @@ -5,4 +5,4 @@ mkdir test/ cp -r repos/repo1 test/ cp -r repos/repo3 test/ -../repoupdater.py test/repo1/ --verbose --repo file://`pwd`/test/repo3/ --drmirror file://`pwd`/deltarepos/ +../repoupdater.py test/repo1/ $@ --repo file://`pwd`/test/repo3/ --drmirror file://`pwd`/deltarepos/ diff --git a/deltarepo/example/test/repo1/foobar-1 b/deltarepo/example/test/repo1/foobar-1 deleted file mode 100644 index 76fc659..0000000 --- a/deltarepo/example/test/repo1/foobar-1 +++ /dev/null @@ -1 +0,0 @@ -a content \ No newline at end of file diff --git a/deltarepo/example/test/repo1/gen.sh b/deltarepo/example/test/repo1/gen.sh deleted file mode 100755 index c3eb7a0..0000000 --- a/deltarepo/example/test/repo1/gen.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -MY_DIR=`dirname $0` - -if [[ -z "$CREATEREPO" ]] -then - CREATEREPO="createrepo_c" -fi - -if [[ -z "$MODIFYREPO" ]] -then - MODIFYREPO="modifyrepo_c" -fi - -pushd "$MY_DIR" -$CREATEREPO $EXTRAARGS --pkglist pkglist --groupfile group.xml --revision "1st repo" --content "A content tag" . -$MODIFYREPO --mdtype="foobar" foobar-1 repodata/ -popd diff --git a/deltarepo/example/test/repo1/group.xml b/deltarepo/example/test/repo1/group.xml deleted file mode 100644 index 068519c..0000000 --- a/deltarepo/example/test/repo1/group.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/deltarepo/example/test/repo1/pkglist b/deltarepo/example/test/repo1/pkglist deleted file mode 100644 index 8f68735..0000000 --- a/deltarepo/example/test/repo1/pkglist +++ /dev/null @@ -1,2 +0,0 @@ -../packages/Archer-3.4.5-6.x86_64.rpm -../packages/fake_bash-1.1.1-1.x86_64.rpm diff --git a/deltarepo/example/test/repo1/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar-1.gz b/deltarepo/example/test/repo1/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar-1.gz deleted file mode 100644 index f2aeb44..0000000 Binary files a/deltarepo/example/test/repo1/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar-1.gz and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/0e43813b2bf4a47abcafa39072c0bc3279b8ec65ab34b929a6cd234f5b0e3e4f-other.sqlite.bz2 b/deltarepo/example/test/repo1/repodata/0e43813b2bf4a47abcafa39072c0bc3279b8ec65ab34b929a6cd234f5b0e3e4f-other.sqlite.bz2 deleted file mode 100644 index a4bef99..0000000 Binary files a/deltarepo/example/test/repo1/repodata/0e43813b2bf4a47abcafa39072c0bc3279b8ec65ab34b929a6cd234f5b0e3e4f-other.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-group.xml.gz b/deltarepo/example/test/repo1/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-group.xml.gz deleted file mode 100644 index 6a703ab..0000000 Binary files a/deltarepo/example/test/repo1/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-group.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/4b4a98a3883ca24ecda5cb105f9c162dfdfc6d074379e7c9e8311f9fde249407-primary.xml.gz b/deltarepo/example/test/repo1/repodata/4b4a98a3883ca24ecda5cb105f9c162dfdfc6d074379e7c9e8311f9fde249407-primary.xml.gz deleted file mode 100644 index 86817d1..0000000 Binary files a/deltarepo/example/test/repo1/repodata/4b4a98a3883ca24ecda5cb105f9c162dfdfc6d074379e7c9e8311f9fde249407-primary.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/64e015b633e6cac5193a0a44403162cf90c39bb29cd8cb1df8e5ca0f2ec56436-filelists.sqlite.bz2 b/deltarepo/example/test/repo1/repodata/64e015b633e6cac5193a0a44403162cf90c39bb29cd8cb1df8e5ca0f2ec56436-filelists.sqlite.bz2 deleted file mode 100644 index 2d4d227..0000000 Binary files a/deltarepo/example/test/repo1/repodata/64e015b633e6cac5193a0a44403162cf90c39bb29cd8cb1df8e5ca0f2ec56436-filelists.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/a5ad5ae1f43eae9e8e1b3fb6ee93e2cf8950708e0b3db8af3ee68f31dd0a38c2-other.xml.gz b/deltarepo/example/test/repo1/repodata/a5ad5ae1f43eae9e8e1b3fb6ee93e2cf8950708e0b3db8af3ee68f31dd0a38c2-other.xml.gz deleted file mode 100644 index 9a27fee..0000000 Binary files a/deltarepo/example/test/repo1/repodata/a5ad5ae1f43eae9e8e1b3fb6ee93e2cf8950708e0b3db8af3ee68f31dd0a38c2-other.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-group.xml b/deltarepo/example/test/repo1/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-group.xml deleted file mode 100644 index 068519c..0000000 --- a/deltarepo/example/test/repo1/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-group.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/deltarepo/example/test/repo1/repodata/a81604899900f2f58ead1e4a1d903700efe7acf64f684d6e16c9ae5be16094a7-primary.sqlite.bz2 b/deltarepo/example/test/repo1/repodata/a81604899900f2f58ead1e4a1d903700efe7acf64f684d6e16c9ae5be16094a7-primary.sqlite.bz2 deleted file mode 100644 index c1172b1..0000000 Binary files a/deltarepo/example/test/repo1/repodata/a81604899900f2f58ead1e4a1d903700efe7acf64f684d6e16c9ae5be16094a7-primary.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/fac6a651423edc252a488b74995641ec4514e6bca12864032c019dcce9614d81-filelists.xml.gz b/deltarepo/example/test/repo1/repodata/fac6a651423edc252a488b74995641ec4514e6bca12864032c019dcce9614d81-filelists.xml.gz deleted file mode 100644 index 664319b..0000000 Binary files a/deltarepo/example/test/repo1/repodata/fac6a651423edc252a488b74995641ec4514e6bca12864032c019dcce9614d81-filelists.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo1/repodata/repomd.xml b/deltarepo/example/test/repo1/repodata/repomd.xml deleted file mode 100644 index 4b75af0..0000000 --- a/deltarepo/example/test/repo1/repodata/repomd.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - 1st repo - - A content tag - - - 4b4a98a3883ca24ecda5cb105f9c162dfdfc6d074379e7c9e8311f9fde249407 - 9276f812675ba0193df682253ece4b14faa8a1dda77a14217aa95a4a53f96caf - - 1392910623 - 1060 - 3916 - - - fac6a651423edc252a488b74995641ec4514e6bca12864032c019dcce9614d81 - 50c5f1c5645a8e52c16845c321d6b0fcf3bd6ea2227d5d49b1d8f0b585da31ed - - 1392910623 - 370 - 630 - - - a5ad5ae1f43eae9e8e1b3fb6ee93e2cf8950708e0b3db8af3ee68f31dd0a38c2 - db841078c111c4ae9c59ee996f6234d2dd4bf4f61a01892565bdaf6fb1c0879e - - 1392910623 - 438 - 939 - - - a81604899900f2f58ead1e4a1d903700efe7acf64f684d6e16c9ae5be16094a7 - 84d58ab2442be220c192439c5f528eb11997cd0d5bbd075e634ecb912870d3e8 - - 1392910623 - 2376 - 21504 - 10 - - - 64e015b633e6cac5193a0a44403162cf90c39bb29cd8cb1df8e5ca0f2ec56436 - 4d0dfa0564f4e57953ea58f1d5c28c4bd94b18e2ebf26c640c7c4a3051ec838a - - 1392910623 - 927 - 7168 - 10 - - - 0e43813b2bf4a47abcafa39072c0bc3279b8ec65ab34b929a6cd234f5b0e3e4f - 54719f2eeae2623c331373f79fe6ed61c9ef81ad861446f566ff31ab7eeff71f - - 1392910623 - 933 - 6144 - 10 - - - 06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752 - d2d2acf640179223bf9e1eb43c5fbf854c4e50ffb6733bc3a9279d3ff7de9be1 - - 1392910623 - 29 - 9 - - - a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5 - - 1392910623 - 140 - - - 46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b - a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5 - - 1392910623 - 141 - 140 - - diff --git a/deltarepo/example/test/repo3/comps.xml b/deltarepo/example/test/repo3/comps.xml deleted file mode 100644 index 068519c..0000000 --- a/deltarepo/example/test/repo3/comps.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/deltarepo/example/test/repo3/foobar b/deltarepo/example/test/repo3/foobar deleted file mode 100644 index 76fc659..0000000 --- a/deltarepo/example/test/repo3/foobar +++ /dev/null @@ -1 +0,0 @@ -a content \ No newline at end of file diff --git a/deltarepo/example/test/repo3/gen.sh b/deltarepo/example/test/repo3/gen.sh deleted file mode 100755 index 7cf5482..0000000 --- a/deltarepo/example/test/repo3/gen.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -MY_DIR=`dirname $0` - -if [[ -z "$CREATEREPO" ]] -then - CREATEREPO="createrepo_c" -fi - -if [[ -z "$MODIFYREPO" ]] -then - MODIFYREPO="modifyrepo_c" -fi - -pushd "$MY_DIR" -$CREATEREPO $EXTRAARGS --pkglist pkglist --groupfile comps.xml --revision "3th repo" --content "Content tag 123456" . -$MODIFYREPO foobar repodata/ -popd diff --git a/deltarepo/example/test/repo3/pkglist b/deltarepo/example/test/repo3/pkglist deleted file mode 100644 index b0436ea..0000000 --- a/deltarepo/example/test/repo3/pkglist +++ /dev/null @@ -1,5 +0,0 @@ -../packages/Archer-3.4.5-6.x86_64.rpm -../packages/balicek-utf8-1.1.1-1.x86_64.rpm -../packages/empty-0-0.x86_64.rpm -../packages/fake_bash-1.1.1-1.x86_64.rpm -../packages/super_kernel-6.0.1-2.x86_64.rpm diff --git a/deltarepo/example/test/repo3/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar.gz b/deltarepo/example/test/repo3/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar.gz deleted file mode 100644 index f2aeb44..0000000 Binary files a/deltarepo/example/test/repo3/repodata/06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752-foobar.gz and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/07125d910a68f01ac92f37921aa7fb4edd20a05e493c7b9123fd4cd43ed27b45-other.xml.gz b/deltarepo/example/test/repo3/repodata/07125d910a68f01ac92f37921aa7fb4edd20a05e493c7b9123fd4cd43ed27b45-other.xml.gz deleted file mode 100644 index ffd75b3..0000000 Binary files a/deltarepo/example/test/repo3/repodata/07125d910a68f01ac92f37921aa7fb4edd20a05e493c7b9123fd4cd43ed27b45-other.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-comps.xml.gz b/deltarepo/example/test/repo3/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-comps.xml.gz deleted file mode 100644 index 6a703ab..0000000 Binary files a/deltarepo/example/test/repo3/repodata/46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b-comps.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/5b18db33715f9cbdd50e72b14af24476bad7b065bfe0cf56f45bbebd6dd92b08-primary.sqlite.bz2 b/deltarepo/example/test/repo3/repodata/5b18db33715f9cbdd50e72b14af24476bad7b065bfe0cf56f45bbebd6dd92b08-primary.sqlite.bz2 deleted file mode 100644 index a75baa0..0000000 Binary files a/deltarepo/example/test/repo3/repodata/5b18db33715f9cbdd50e72b14af24476bad7b065bfe0cf56f45bbebd6dd92b08-primary.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/609eca035393772a53575fa2792c238277034760e616e11fbaaf0517e1ea877f-other.sqlite.bz2 b/deltarepo/example/test/repo3/repodata/609eca035393772a53575fa2792c238277034760e616e11fbaaf0517e1ea877f-other.sqlite.bz2 deleted file mode 100644 index 4bd13d7..0000000 Binary files a/deltarepo/example/test/repo3/repodata/609eca035393772a53575fa2792c238277034760e616e11fbaaf0517e1ea877f-other.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/7946a0f6e1676a33f763e12eddf0ce805c15a81d5de9d93ca81537eda34ccef4-filelists.sqlite.bz2 b/deltarepo/example/test/repo3/repodata/7946a0f6e1676a33f763e12eddf0ce805c15a81d5de9d93ca81537eda34ccef4-filelists.sqlite.bz2 deleted file mode 100644 index 885dde0..0000000 Binary files a/deltarepo/example/test/repo3/repodata/7946a0f6e1676a33f763e12eddf0ce805c15a81d5de9d93ca81537eda34ccef4-filelists.sqlite.bz2 and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-comps.xml b/deltarepo/example/test/repo3/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-comps.xml deleted file mode 100644 index 068519c..0000000 --- a/deltarepo/example/test/repo3/repodata/a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5-comps.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/deltarepo/example/test/repo3/repodata/e6c1900810fb1155e7a29c59df839e9d20a369b5fb2cad87d880f664fa815e3f-filelists.xml.gz b/deltarepo/example/test/repo3/repodata/e6c1900810fb1155e7a29c59df839e9d20a369b5fb2cad87d880f664fa815e3f-filelists.xml.gz deleted file mode 100644 index d9d311b..0000000 Binary files a/deltarepo/example/test/repo3/repodata/e6c1900810fb1155e7a29c59df839e9d20a369b5fb2cad87d880f664fa815e3f-filelists.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/f209787b500f81fc59f7babcfaa122db99cbe3c0817edd7336febc96b95ece33-primary.xml.gz b/deltarepo/example/test/repo3/repodata/f209787b500f81fc59f7babcfaa122db99cbe3c0817edd7336febc96b95ece33-primary.xml.gz deleted file mode 100644 index e00345a..0000000 Binary files a/deltarepo/example/test/repo3/repodata/f209787b500f81fc59f7babcfaa122db99cbe3c0817edd7336febc96b95ece33-primary.xml.gz and /dev/null differ diff --git a/deltarepo/example/test/repo3/repodata/repomd.xml b/deltarepo/example/test/repo3/repodata/repomd.xml deleted file mode 100644 index aa4d77c..0000000 --- a/deltarepo/example/test/repo3/repodata/repomd.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - 3th repo - - Content tag 123456 - - - f209787b500f81fc59f7babcfaa122db99cbe3c0817edd7336febc96b95ece33 - a09ebfe06c2ab1200ef8f05bb380f9540f1d06e6a1407f16c7f325eb20a86109 - - 1392910626 - 1740 - 8069 - - - e6c1900810fb1155e7a29c59df839e9d20a369b5fb2cad87d880f664fa815e3f - fb32b1e587f0a2499ea15fb2224d0dec9ce615f2661ba4757b3ea18ce56ccc76 - - 1392910626 - 560 - 1217 - - - 07125d910a68f01ac92f37921aa7fb4edd20a05e493c7b9123fd4cd43ed27b45 - cb344434c4f54eca225b3db0202163bd61f7524e3f18df4812f82c9377b0350e - - 1392910626 - 743 - 1863 - - - 5b18db33715f9cbdd50e72b14af24476bad7b065bfe0cf56f45bbebd6dd92b08 - 711c7cd2ab9c93a5a7349c8a1b225a6794fc87fa66232329f33273ce7e117a0c - - 1392910626 - 3439 - 23552 - 10 - - - 7946a0f6e1676a33f763e12eddf0ce805c15a81d5de9d93ca81537eda34ccef4 - ba39a46626a7b413d775ce685d52a81e536d748fa56af0558ecc8d109f48b55c - - 1392910626 - 1217 - 7168 - 10 - - - 609eca035393772a53575fa2792c238277034760e616e11fbaaf0517e1ea877f - d30994831b79ac3cb8a819c4f17cac0b9ae95f093539ffc216845f9f9216cd42 - - 1392910626 - 1322 - 6144 - 10 - - - 06d8204d74de57ed4050a72280d25d2e73dabf8298f94e415d12d3b847682752 - d2d2acf640179223bf9e1eb43c5fbf854c4e50ffb6733bc3a9279d3ff7de9be1 - - 1392910626 - 29 - 9 - - - a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5 - - 1392910626 - 140 - - - 46b296e6f4193dcf5cdc11f10be8472a7085c6d45f05a09da5ef4e4c80c8828b - a5e176f8963047438fee997c4cad6a5388ef85d0b22d72a48712cc91bf2821c5 - - 1392910626 - 141 - 140 - - diff --git a/deltarepo/repocontenthash.py b/deltarepo/repocontenthash.py index 480741d..e3a76e5 100755 --- a/deltarepo/repocontenthash.py +++ b/deltarepo/repocontenthash.py @@ -77,7 +77,7 @@ def setup_logging(quiet, verbose): def print_contenthashes(args, logger): # Print content hash from the repomd.xml - localrepo = LocalRepo.from_path(args.path, calculate_contenthash=False) + localrepo = LocalRepo.from_path(args.path, calc_contenthash=False) if localrepo.repomd_contenthash and localrepo.repomd_contenthash_type: print("R {0} {1}".format(localrepo.repomd_contenthash_type, localrepo.repomd_contenthash)) @@ -90,7 +90,7 @@ def print_contenthashes(args, logger): def check(args, logger): # Get type and value of content hash in repomd - localrepo = LocalRepo.from_path(args.path, calculate_contenthash=False) + localrepo = LocalRepo.from_path(args.path, calc_contenthash=False) if not localrepo.repomd_contenthash or not localrepo.repomd_contenthash_type: if args.missing_contenthash_in_repomd_is_ok: return True diff --git a/deltarepo/repoupdater.py b/deltarepo/repoupdater.py index 7eef5f1..6bdccde 100755 --- a/deltarepo/repoupdater.py +++ b/deltarepo/repoupdater.py @@ -122,7 +122,6 @@ def update_with_deltas(args, drmirros, localrepo, originrepo, logger): # Resolve path resolved_path = updatesolver.resolve_path(source_contenthash, target_contenthash) - print(resolved_path) # TODO check cost, if bigger then cost of downloading # origin repo then download origin repo