564
565
that's what overrides actually do.
566
567
>>> from canonical.database.sqlbase import sqlvalues
567
>>> from lp.soyuz.enums import PackagePublishingStatus
568
>>> x11_pub = SSPPH.select("""sourcepackagerelease = %s
569
... AND distroseries = %s
570
... AND status in (%s, %s)""" %
571
... sqlvalues(x11p, breezy,
572
... PackagePublishingStatus.PUBLISHED,
573
... PackagePublishingStatus.PENDING),
574
... orderBy=["-datecreated"])[0]
568
>>> x11_pub = SSPPH.select("""
569
... sourcepackagerelease = %s AND
570
... distroseries = %s AND
573
... x11p, breezy, active_publishing_status),
574
... orderBy=["-datecreated"])[0]
575
575
>>> print x11_pub.section.name
577
>>> ed_pub = SBPPH.select("""binarypackagerelease = %s
578
... AND distroarchseries = %s
579
... AND status in (%s, %s)""" %
580
... sqlvalues(ed, breezy_i386,
581
... PackagePublishingStatus.PUBLISHED,
582
... PackagePublishingStatus.PENDING),
583
... orderBy=["-datecreated"])[0]
577
>>> ed_pub = SBPPH.select("""
578
... binarypackagerelease = %s AND
579
... distroarchseries = %s AND
582
... ed, breezy_i386, active_publishing_status),
583
... orderBy=["-datecreated"])[0]
584
584
>>> print ed_pub.priority
586
586
>>> n = SourcePackageName.selectOneBy(name="archive-copier")
587
587
>>> ac = SourcePackageRelease.selectOneBy(sourcepackagenameID=n.id,
588
588
... version="0.3.6")
589
>>> ac_pub = SSPPH.select("""sourcepackagerelease = %s
590
... AND distroseries = %s
591
... AND status in (%s, %s)""" %
592
... sqlvalues(ac, breezy,
593
... PackagePublishingStatus.PUBLISHED,
594
... PackagePublishingStatus.PENDING),
595
... orderBy=["-datecreated"])[0]
589
>>> ac_pub = SSPPH.select("""
590
... sourcepackagerelease = %s AND
591
... distroseries = %s AND
594
... ac, breezy, active_publishing_status),
595
... orderBy=["-datecreated"])[0]
596
596
>>> print ac_pub.component.name