~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/doc/gina.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-12 18:11:42 UTC
  • mfrom: (13901.2.2 perm-845803)
  • Revision ID: launchpad@pqm.canonical.com-20110912181142-fnn8de7d1cq3ra9r
[r=julian-edwards][bug=845803] Remove call to
        canSetEnabledRestrictedFamilies

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
Get the current counts of stuff in the database:
9
9
 
10
10
    >>> from canonical.launchpad.database.emailaddress import EmailAddress
 
11
    >>> from lp.soyuz.interfaces.publishing import active_publishing_status
11
12
    >>> from lp.soyuz.model.publishing import (
12
13
    ...     BinaryPackagePublishingHistory,
13
14
    ...     SourcePackagePublishingHistory)
564
565
that's what overrides actually do.
565
566
 
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
 
571
    ...     status in %s
 
572
    ...     """ % sqlvalues(
 
573
    ...         x11p, breezy, active_publishing_status),
 
574
    ...     orderBy=["-datecreated"])[0]
575
575
    >>> print x11_pub.section.name
576
576
    net
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
 
580
    ...     status in %s
 
581
    ...     """ % sqlvalues(
 
582
    ...         ed, breezy_i386, active_publishing_status),
 
583
    ...     orderBy=["-datecreated"])[0]
584
584
    >>> print ed_pub.priority
585
585
    Extra
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
 
592
    ...     status in %s
 
593
    ...     """ % sqlvalues(
 
594
    ...         ac, breezy, active_publishing_status),
 
595
    ...     orderBy=["-datecreated"])[0]
596
596
    >>> print ac_pub.component.name
597
597
    universe
598
598
 
720
720
 
721
721
    >>> transaction.commit()
722
722
 
723
 
There is now a number of source publications in PENDING status for the
 
723
There is now a number of source publications in PUBLISHED status for the
724
724
targetted distroseries, 'lenny'.
725
725
 
726
726
    >>> lenny_sources = SSPPH.select("distroseries = %s" % sqlvalues(lenny))
728
728
    12
729
729
 
730
730
    >>> print set([pub.status.name for pub in lenny_sources])
731
 
    set(['PENDING'])
 
731
    set(['PUBLISHED'])
732
732
 
733
733
As mentioned before, lenny/i386 is empty, no binaries were imported.
734
734
Also, the number of binaries published in the whole debian distribution