コード例 #1
0
    def stayClearOfLiveSuites(self):
        # in both lenny (sticky) and squeeze (live)
        DUP_PKG = ('libcaca', '0.99.beta17-1')
        self.assertHasLivePackage(*DUP_PKG)

        archiver.add_suite(self.conf, self.session, 'lenny', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'lenny')
        self.assertHasLivePackage(*DUP_PKG)
コード例 #2
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def stayClearOfLiveSuites(self):
        # in both lenny (sticky) and squeeze (live)
        DUP_PKG = ('libcaca', '0.99.beta17-1')
        self.assertHasLivePackage(*DUP_PKG)

        archiver.add_suite(self.conf, self.session, 'lenny', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'lenny')
        self.assertHasLivePackage(*DUP_PKG)
コード例 #3
0
    def countsReferences(self):
        DUP_PKG = ("2utf", "1.04")  # in both hamm and slink

        archiver.add_suite(self.conf, self.session, "hamm", self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.add_suite(self.conf, self.session, "slink", self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, "hamm")
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, "slink")
        self.assertLacksStickyPackage(*DUP_PKG)
コード例 #4
0
    def countsReferences(self):
        DUP_PKG = ('2utf', '1.04')  # in both hamm and slink

        archiver.add_suite(self.conf, self.session, 'hamm', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.add_suite(self.conf, self.session, 'slink', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'hamm')
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'slink')
        self.assertLacksStickyPackage(*DUP_PKG)
コード例 #5
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def countsReferences(self):
        DUP_PKG = ('2utf', '1.04')  # in both hamm and slink

        archiver.add_suite(self.conf, self.session, 'hamm', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.add_suite(self.conf, self.session, 'slink', self.archive)
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'hamm')
        self.assertHasStickyPackage(*DUP_PKG)

        archiver.remove_suite(self.conf, self.session, 'slink')
        self.assertLacksStickyPackage(*DUP_PKG)
コード例 #6
0
    def addsStickySuites(self):
        SUITES = ['hamm', 'slink']
        PACKAGES = [('3dchess', '0.8.1-3'),  # hamm
                    ('ed', '0.2-16'),        # hamm
                    ('WMRack', '1.0b3-1')]   # slink, pkg w/ weird naming

        for suite in SUITES:
            archiver.add_suite(self.conf, self.session, suite, self.archive)

        for suite in SUITES:
            self.assertHasStickySuite(suite)
            s = db_storage.lookup_db_suite(self.session, suite, sticky=True)
            rel_info = DEBIAN_RELEASES[suite]
            self.assertEqual(s.version, rel_info['version'])
            self.assertEqual(s.release_date, rel_info['date'])

        for pkg in PACKAGES:
            self.assertHasStickyPackage(*pkg)
コード例 #7
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def addsStickySuites(self):
        SUITES = ['hamm', 'slink']
        PACKAGES = [('3dchess', '0.8.1-3'),  # hamm
                    ('ed', '0.2-16'),        # hamm
                    ('WMRack', '1.0b3-1')]   # slink, pkg w/ weird naming

        for suite in SUITES:
            archiver.add_suite(self.conf, self.session, suite, self.archive)

        for suite in SUITES:
            self.assertHasStickySuite(suite)
            s = db_storage.lookup_db_suite(self.session, suite, sticky=True)
            rel_info = DEBIAN_RELEASES[suite]
            self.assertEqual(s.version, rel_info['version'])
            self.assertEqual(s.release_date, rel_info['date'])

        for pkg in PACKAGES:
            self.assertHasStickyPackage(*pkg)
コード例 #8
0
    def removesStickySuite(self):
        SARGE_PACKAGES = [('asm', '1.5.2-1'), ('zziplib', '0.12.83-4')]
        stats_file = os.path.join(self.conf['cache_dir'], 'stats.data')

        # to test stats.data cleanup
        self.conf['stages'] = self.TEST_STAGES.union(
            set([updater.STAGE_STATS]))
        archiver.add_suite(self.conf, self.session, 'sarge', self.archive)
        self.assertHasStickySuite('sarge')
        for pkg in SARGE_PACKAGES:
            self.assertHasStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertTrue('debian_sarge.sloccount' in stats)

        archiver.remove_suite(self.conf, self.session, 'sarge')
        self.assertLacksStickySuite('sarge')
        for pkg in SARGE_PACKAGES:
            self.assertLacksStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertFalse('debian_sarge.sloccount' in stats)
コード例 #9
0
    def addsStickySuites(self):
        SUITES = ["hamm", "slink"]
        PACKAGES = [
            ("3dchess", "0.8.1-3"),  # hamm
            ("ed", "0.2-16"),  # hamm
            ("WMRack", "1.0b3-1"),
        ]  # slink, pkg w/ weird naming

        for suite in SUITES:
            archiver.add_suite(self.conf, self.session, suite, self.archive)

        for suite in SUITES:
            self.assertHasStickySuite(suite)
            s = db_storage.lookup_db_suite(self.session, suite, sticky=True)
            rel_info = DEBIAN_RELEASES[suite]
            self.assertEqual(s.version, rel_info["version"])
            self.assertEqual(s.release_date, rel_info["date"])

        for pkg in PACKAGES:
            self.assertHasStickyPackage(*pkg)
コード例 #10
0
    def removesStickySuite(self):
        SARGE_PACKAGES = [("asm", "1.5.2-1"), ("zziplib", "0.12.83-4")]
        stats_file = self.conf["cache_dir"] / "stats.data"

        # to test stats.data cleanup
        self.conf["stages"] = self.TEST_STAGES.union(set([updater.STAGE_STATS
                                                          ]))
        archiver.add_suite(self.conf, self.session, "sarge", self.archive)
        self.assertHasStickySuite("sarge")
        for pkg in SARGE_PACKAGES:
            self.assertHasStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertTrue("debian_sarge.sloccount" in stats)

        archiver.remove_suite(self.conf, self.session, "sarge")
        self.assertLacksStickySuite("sarge")
        for pkg in SARGE_PACKAGES:
            self.assertLacksStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertFalse("debian_sarge.sloccount" in stats)
コード例 #11
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def removesStickySuite(self):
        SARGE_PACKAGES = [('asm', '1.5.2-1'), ('zziplib', '0.12.83-4')]
        stats_file = os.path.join(self.conf['cache_dir'], 'stats.data')

        # to test stats.data cleanup
        self.conf['stages'] = self.TEST_STAGES.union(
            set([updater.STAGE_STATS]))
        archiver.add_suite(self.conf, self.session, 'sarge', self.archive)
        self.assertHasStickySuite('sarge')
        for pkg in SARGE_PACKAGES:
            self.assertHasStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertTrue('debian_sarge.sloccount' in stats)

        archiver.remove_suite(self.conf, self.session, 'sarge')
        self.assertLacksStickySuite('sarge')
        for pkg in SARGE_PACKAGES:
            self.assertLacksStickyPackage(*pkg)
        stats = statistics.load_metadata_cache(stats_file)
        self.assertFalse('debian_sarge.sloccount' in stats)
コード例 #12
0
    def guessAreaForSectionlessPkgs(self):
        sectionless_pkg = ('tripwire', '1.2-15')

        archiver.add_suite(self.conf, self.session, 'slink', self.archive)
        p = db_storage.lookup_package(self.session, *sectionless_pkg)
        self.assertEqual('non-free', p.area)
コード例 #13
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def canAddPkgsWSpecialFiles(self):
        pkg_w_pipe = ('freewrl', '0.20.a1-3')

        archiver.add_suite(self.conf, self.session, 'potato', self.archive)
        self.assertHasStickyPackage(*pkg_w_pipe)
コード例 #14
0
ファイル: test_archiver.py プロジェクト: chr7stos/debsources
    def guessAreaForSectionlessPkgs(self):
        sectionless_pkg = ('tripwire', '1.2-15')

        archiver.add_suite(self.conf, self.session, 'slink', self.archive)
        p = db_storage.lookup_package(self.session, *sectionless_pkg)
        self.assertEqual('non-free', p.area)
コード例 #15
0
    def guessAreaForSectionlessPkgs(self):
        sectionless_pkg = ("tripwire", "1.2-15")

        archiver.add_suite(self.conf, self.session, "slink", self.archive)
        p = db_storage.lookup_package(self.session, *sectionless_pkg)
        self.assertEqual("non-free", p.area)
コード例 #16
0
    def canAddPkgsWSpecialFiles(self):
        pkg_w_pipe = ("freewrl", "0.20.a1-3")

        archiver.add_suite(self.conf, self.session, "potato", self.archive)
        self.assertHasStickyPackage(*pkg_w_pipe)
コード例 #17
0
    def canAddPkgsWSpecialFiles(self):
        pkg_w_pipe = ('freewrl', '0.20.a1-3')

        archiver.add_suite(self.conf, self.session, 'potato', self.archive)
        self.assertHasStickyPackage(*pkg_w_pipe)