Subversion Repositories DevTools

Rev

Rev 227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 295
Line 376... Line 376...
376
 
376
 
377
    # if we are not or cannot connect then return 0 as we have not found anything
377
    # if we are not or cannot connect then return 0 as we have not found anything
378
    return 0 if ( ! $self->_connectRM() );
378
    return 0 if ( ! $self->_connectRM() );
379
 
379
 
380
    # First get the pkg_id from the name
380
    # First get the pkg_id from the name
381
    my ($m_sqlstr ) = "SELECT pkg_id, pkg_name FROM PACKAGES WHERE pkg_name=?";
381
    my ($m_sqlstr ) = "SELECT pkg_id, pkg_name FROM RELEASE_MANAGER.PACKAGES WHERE pkg_name=?";
382
    my ($sth )  = $globals->{_RM_CONN}->prepare($m_sqlstr);
382
    my ($sth )  = $globals->{_RM_CONN}->prepare($m_sqlstr);
383
    if ( defined($sth) )
383
    if ( defined($sth) )
384
    {
384
    {
385
        if ( $sth->execute( $self->{_ARG_PKGNAME}) )
385
        if ( $sth->execute( $self->{_ARG_PKGNAME}) )
386
        {
386
        {
Line 414... Line 414...
414
        return 0;
414
        return 0;
415
    }
415
    }
416
 
416
 
417
    # Now get details using found pkg_id & version
417
    # Now get details using found pkg_id & version
418
    $m_sqlstr = "SELECT pkg_id, pv_id, pv_description, pv_overview, comments, pkg_label, dlocked, pkg_version, SRC_PATH, TO_CHAR(MODIFIED_STAMP, 'DD-MON-YYYY') AS MODIFIED_STAMP" .
418
    $m_sqlstr = "SELECT pkg_id, pv_id, pv_description, pv_overview, comments, pkg_label, dlocked, pkg_version, SRC_PATH, TO_CHAR(MODIFIED_STAMP, 'DD-MON-YYYY') AS MODIFIED_STAMP" .
419
                " FROM PACKAGE_VERSIONS" .
419
                " FROM RELEASE_MANAGER.PACKAGE_VERSIONS" .
420
                " WHERE pkg_id=? AND pkg_version=?";
420
                " WHERE pkg_id=? AND pkg_version=?";
421
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
421
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
422
    if ( defined($sth) )
422
    if ( defined($sth) )
423
    {
423
    {
424
        if ( $sth->execute( $self->{_DETAILS}{pkg_id}, $self->{_ARG_PKGVER} ) )
424
        if ( $sth->execute( $self->{_DETAILS}{pkg_id}, $self->{_ARG_PKGVER} ) )
Line 475... Line 475...
475
    # if we are not or cannot connect then return 0 as we have not found anything
475
    # if we are not or cannot connect then return 0 as we have not found anything
476
    return 0 if ( ! $self->_connectRM() );
476
    return 0 if ( ! $self->_connectRM() );
477
 
477
 
478
    # First get details from pv_id
478
    # First get details from pv_id
479
    my $m_sqlstr = "SELECT pkg_id, pv_id, pv_description, pv_overview, comments, pkg_label, dlocked, pkg_version, SRC_PATH, TO_CHAR(MODIFIED_STAMP, 'DD-MON-YYYY') AS MODIFIED_STAMP" .
479
    my $m_sqlstr = "SELECT pkg_id, pv_id, pv_description, pv_overview, comments, pkg_label, dlocked, pkg_version, SRC_PATH, TO_CHAR(MODIFIED_STAMP, 'DD-MON-YYYY') AS MODIFIED_STAMP" .
480
                   " FROM PACKAGE_VERSIONS" .
480
                   " FROM RELEASE_MANAGER.PACKAGE_VERSIONS" .
481
                   " WHERE pv_id=?";
481
                   " WHERE pv_id=?";
482
    my $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
482
    my $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
483
    if ( defined($sth) )
483
    if ( defined($sth) )
484
    {
484
    {
485
        if ( $sth->execute( $self->{_ARG_PV_ID} ) )
485
        if ( $sth->execute( $self->{_ARG_PV_ID} ) )
Line 521... Line 521...
521
        LogError("-x", "RmPkgInfo::_getPkgDetailsByPVID Unable to prepare SQL Statement [$m_sqlstr] : " . $globals->{_RM_CONN}->errstr);
521
        LogError("-x", "RmPkgInfo::_getPkgDetailsByPVID Unable to prepare SQL Statement [$m_sqlstr] : " . $globals->{_RM_CONN}->errstr);
522
        return 0;
522
        return 0;
523
    }
523
    }
524
 
524
 
525
    # now get pkgName from found pkg_id
525
    # now get pkgName from found pkg_id
526
    $m_sqlstr = "SELECT pkg_id, pkg_name FROM PACKAGES WHERE pkg_id=?";
526
    $m_sqlstr = "SELECT pkg_id, pkg_name FROM RELEASE_MANAGER.PACKAGES WHERE pkg_id=?";
527
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
527
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
528
    if ( defined($sth) )
528
    if ( defined($sth) )
529
    {
529
    {
530
        if ( $sth->execute( $self->{_DETAILS}{pkg_id} ) )
530
        if ( $sth->execute( $self->{_DETAILS}{pkg_id} ) )
531
        {
531
        {
Line 569... Line 569...
569
    # First get the pkg_id from the name
569
    # First get the pkg_id from the name
570
    my ($m_sqlstr );
570
    my ($m_sqlstr );
571
    if ( defined($self->{_ARG_WIP}) && $self->{_ARG_WIP} != 0 )
571
    if ( defined($self->{_ARG_WIP}) && $self->{_ARG_WIP} != 0 )
572
    {
572
    {
573
        LogDebug("RmPkgInfo::_getLatestPkgVersion Using Work In Progress View");
573
        LogDebug("RmPkgInfo::_getLatestPkgVersion Using Work In Progress View");
574
        $m_sqlstr = "SELECT pv.pkg_version FROM work_in_progress wip, package_versions pv, PACKAGES pkg WHERE ( wip.pv_id=pv.pv_id AND pv.pkg_id=pkg.pkg_id AND wip.rtag_id=? AND pkg.pkg_name=? )";
574
        $m_sqlstr = "SELECT pv.pkg_version FROM RELEASE_MANAGER.work_in_progress wip, RELEASE_MANAGER.package_versions pv, RELEASE_MANAGER.PACKAGES pkg WHERE ( wip.pv_id=pv.pv_id AND pv.pkg_id=pkg.pkg_id AND wip.rtag_id=? AND pkg.pkg_name=? )";
575
    }
575
    }
576
    else
576
    else
577
    {
577
    {
578
        LogDebug("RmPkgInfo::_getLatestPkgVersion Using Released View");
578
        LogDebug("RmPkgInfo::_getLatestPkgVersion Using Released View");
579
        $m_sqlstr = "SELECT pv.pkg_version FROM release_content rel, package_versions pv, PACKAGES pkg WHERE ( rel.pv_id=pv.pv_id AND pv.pkg_id=pkg.pkg_id AND rel.rtag_id=? AND pkg.pkg_name=? )";
579
        $m_sqlstr = "SELECT pv.pkg_version FROM RELEASE_MANAGER.release_content rel, RELEASE_MANAGER.package_versions pv, RELEASE_MANAGER.PACKAGES pkg WHERE ( rel.pv_id=pv.pv_id AND pv.pkg_id=pkg.pkg_id AND rel.rtag_id=? AND pkg.pkg_name=? )";
580
    }
580
    }
581
 
581
 
582
    my ($sth )  = $globals->{_RM_CONN}->prepare($m_sqlstr);
582
    my ($sth )  = $globals->{_RM_CONN}->prepare($m_sqlstr);
583
    if ( defined($sth) )
583
    if ( defined($sth) )
584
    {
584
    {
Line 639... Line 639...
639
    my ($DEVIiss )    = "-1";
639
    my ($DEVIiss )    = "-1";
640
 
640
 
641
    # if we are not or cannot connect then return 0 as we have not found anything
641
    # if we are not or cannot connect then return 0 as we have not found anything
642
    return 0 if ( ! $self->_connectRM() );
642
    return 0 if ( ! $self->_connectRM() );
643
 
643
 
644
    $m_sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE pv_id=?";
644
    $m_sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM RELEASE_MANAGER.CQ_ISSUES WHERE pv_id=?";
645
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
645
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
646
    if ( defined($sth) )
646
    if ( defined($sth) )
647
    {
647
    {
648
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
648
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
649
        {
649
        {
Line 801... Line 801...
801
    # if we are not or cannot connect then return 0 as we have not found anything
801
    # if we are not or cannot connect then return 0 as we have not found anything
802
    return 0 if ( ! $self->_connectRM() );
802
    return 0 if ( ! $self->_connectRM() );
803
 
803
 
804
    $m_sqlstr = "SELECT pkg.pkg_name, pv.pkg_version, rd.rtd_comments, rd.rtd_url, rd.mod_date, \n" .
804
    $m_sqlstr = "SELECT pkg.pkg_name, pv.pkg_version, rd.rtd_comments, rd.rtd_url, rd.mod_date, \n" .
805
                "usr.full_name, usr.user_email \n" .
805
                "usr.full_name, usr.user_email \n" .
806
                "FROM runtime_dependencies rd, package_versions pv, PACKAGES pkg, users usr \n".
806
                "FROM RELEASE_MANAGER.runtime_dependencies rd, RELEASE_MANAGER.package_versions pv, RELEASE_MANAGER.PACKAGES pkg, RELEASE_MANAGER.users usr \n".
807
                "WHERE pv.pkg_id = pkg.pkg_id \n" .
807
                "WHERE pv.pkg_id = pkg.pkg_id \n" .
808
                "AND rd.rtd_id = pv.pv_id \n" .
808
                "AND rd.rtd_id = pv.pv_id \n" .
809
                "AND rd.mod_user = usr.user_id \n" .
809
                "AND rd.mod_user = usr.user_id \n" .
810
                "AND rd.pv_id = ?\n" .
810
                "AND rd.pv_id = ?\n" .
811
                "ORDER BY UPPER(pkg.pkg_name) ASC";
811
                "ORDER BY UPPER(pkg.pkg_name) ASC";
Line 953... Line 953...
953
    my ($m_sqlstr);
953
    my ($m_sqlstr);
954
    my ($sth);
954
    my ($sth);
955
    my (@row);
955
    my (@row);
956
 
956
 
957
    # First we get the list of dependenciy pvid's and use them to create new objects
957
    # First we get the list of dependenciy pvid's and use them to create new objects
958
    $m_sqlstr = "select dpv_id from package_dependencies where pv_id=?";
958
    $m_sqlstr = "select dpv_id from RELEASE_MANAGER.package_dependencies where pv_id=?";
959
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
959
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
960
    if ( defined($sth) )
960
    if ( defined($sth) )
961
    {
961
    {
962
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
962
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
963
        {
963
        {
Line 1004... Line 1004...
1004
    my ($sth);
1004
    my ($sth);
1005
    my (@row);
1005
    my (@row);
1006
    my %result;
1006
    my %result;
1007
 
1007
 
1008
    # First we get the list of dependenciy pvid's
1008
    # First we get the list of dependenciy pvid's
1009
    $m_sqlstr = "SELECT pkg.PKG_NAME, pv.PKG_VERSION FROM PACKAGE_DEPENDENCIES pd, PACKAGE_VERSIONS pv, PACKAGES pkg WHERE pd.PV_ID=? AND pd.DPV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID";
1009
    $m_sqlstr = "SELECT pkg.PKG_NAME, pv.PKG_VERSION FROM RELEASE_MANAGER.PACKAGE_DEPENDENCIES pd, RELEASE_MANAGER.PACKAGE_VERSIONS pv, RELEASE_MANAGER.PACKAGES pkg WHERE pd.PV_ID=? AND pd.DPV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID";
1010
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
1010
    $sth = $globals->{_RM_CONN}->prepare($m_sqlstr);
1011
    if ( defined($sth) )
1011
    if ( defined($sth) )
1012
    {
1012
    {
1013
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
1013
        if ( $sth->execute( $self->{_DETAILS}{pv_id} ) )
1014
        {
1014
        {