Subversion Repositories DevTools

Rev

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

Rev 7155 Rev 7163
Line 81... Line 81...
81
     * @attribute
81
     * @attribute
82
     */
82
     */
83
    public static String mGenericMachtype = System.getenv("GBE_MACHTYPE");
83
    public static String mGenericMachtype = System.getenv("GBE_MACHTYPE");
84
 
84
 
85
    /**
85
    /**
86
     * build dependencies by package alias
86
     * primary package version key pv_id in database
87
     * 
87
     * 
88
     * @attribute
88
     * @attribute
89
     */
89
     */
90
    public Vector<String> mDependencyCollection = new Vector<String>();
90
    public int mId;
91
 
91
 
-
 
92
    public class PkgDependency {
-
 
93
        String alias;
-
 
94
        Integer pvId;
-
 
95
        Package pkg;
-
 
96
        
-
 
97
        public PkgDependency( String alias, Integer pvId)
-
 
98
        {
-
 
99
            this.alias = alias;
-
 
100
            this.pvId = pvId;
-
 
101
            pkg = null;
-
 
102
        }
-
 
103
       
-
 
104
        //  Assist in debugging
-
 
105
        public String toString()
-
 
106
        {
-
 
107
            String pkgData = "";
-
 
108
            if (pkg != null)
-
 
109
                pkgData = " {" + pkg.mId + ":" + pkg.mAlias +"}";
-
 
110
      
-
 
111
            return Integer.toString(pvId) + ":" + alias  + pkgData;
-
 
112
        }
-
 
113
    }
-
 
114
    
92
    /**
115
    /**
-
 
116
     * Package dependencies
-
 
117
     * A triplet of alias, pvId and Package
93
     * primary package version key pv_id in database
118
     *  alias and pvId are read from the database
-
 
119
     *  Package is located during planning
94
     * 
120
     * 
95
     * @attribute
-
 
96
     */
121
     */
97
    public int mId;
122
    public Vector<PkgDependency> mDependencyCollection = new Vector<PkgDependency>();
98
 
123
    
99
    /**
124
    /**
100
     * indication of the nature of change
125
     * indication of the nature of change
101
     * 
126
     * 
102
     * @attribute
127
     * @attribute
103
     */
128
     */
Line 187... Line 212...
187
     * @attribute
212
     * @attribute
188
     */
213
     */
189
    int mNoBuildReason = 0;
214
    int mNoBuildReason = 0;
190
 
215
 
191
    /**
216
    /**
192
     * build dependencies by package
-
 
193
     * Calculated from information in mDependencyCollection
-
 
194
     * 
-
 
195
     * @attribute
-
 
196
     */
-
 
197
    Vector<Package> mPackageDependencyCollection = new Vector<Package>();
-
 
198
 
-
 
199
    /**
-
 
200
     * used for escrow build purposes set true when a package has been processed
217
     * used for escrow build purposes set true when a package has been processed
201
     * 
218
     * 
202
     * @attribute
219
     * @attribute
203
     */
220
     */
204
    boolean mProcessed = false;
221
    boolean mProcessed = false;
Line 235... Line 252...
235
     * @attribute
252
     * @attribute
236
     */
253
     */
237
    public int mTestBuildInstruction = 0;
254
    public int mTestBuildInstruction = 0;
238
 
255
 
239
    /**
256
    /**
240
     * build dependencies by pv_id (-1 or not used for planned dependencies)
-
 
241
     * 
-
 
242
     * @attribute
-
 
243
     */
-
 
244
    public Vector<Integer> mDependencyIDCollection = new Vector<Integer>();
-
 
245
 
-
 
246
    /**
-
 
247
     * unique pkg_id in the database used for querying package version existence
257
     * unique pkg_id in the database used for querying package version existence
248
     * in the database in daemon mode
258
     * in the database in daemon mode
249
     * 
259
     * 
250
     * @attribute
260
     * @attribute
251
     */
261
     */
Line 543... Line 553...
543
        mBuildTime = base.mBuildTime;
553
        mBuildTime = base.mBuildTime;
544
        mHasAutomatedUnitTests = base.mHasAutomatedUnitTests;
554
        mHasAutomatedUnitTests = base.mHasAutomatedUnitTests;
545
        mSeqId = base.mSeqId;
555
        mSeqId = base.mSeqId;
546
        
556
        
547
        mBuildFailureEmailCollection = new Vector<String>(base.mBuildFailureEmailCollection);
557
        mBuildFailureEmailCollection = new Vector<String>(base.mBuildFailureEmailCollection);
548
        mPackageDependencyCollection = new Vector<Package>(base.mPackageDependencyCollection);
-
 
549
        mDependencyIDCollection = new Vector<Integer>(base.mDependencyIDCollection);
-
 
550
        mDependencyCollection = new Vector<String>(base.mDependencyCollection);
558
        mDependencyCollection = new Vector<PkgDependency>(base.mDependencyCollection);
551
        mBuildStandardCollection = new Vector<BuildStandard>( base.mBuildStandardCollection);
559
        mBuildStandardCollection = new Vector<BuildStandard>( base.mBuildStandardCollection);
552
        
-
 
553
    }
560
    }
554
    
561
    
555
    /** Generate a nice text string useful for debugging
562
    /** Generate a nice text string useful for debugging
556
     * 
563
     * 
557
     */
564
     */
Line 1429... Line 1436...
1429
                // Mark this package as potentially having a circular dependency
1436
                // Mark this package as potentially having a circular dependency
1430
                // Will now drill down and see if we hit a marker
1437
                // Will now drill down and see if we hit a marker
1431
                mBreadCrumb = 1;
1438
                mBreadCrumb = 1;
1432
                
1439
                
1433
                // Recurse down the dependencies and sub dependencies
1440
                // Recurse down the dependencies and sub dependencies
1434
                for (Iterator<String> it2 = mDependencyCollection.iterator(); it2.hasNext();)
1441
                for (Iterator<PkgDependency> it2 = mDependencyCollection.iterator(); it2.hasNext();)
1435
                {
1442
                {
1436
                    String dependencyAlias = it2.next();
1443
                    PkgDependency depEntry = it2.next();
1437
                    
1444
                    
1438
                    // Scan the collection looking for the specified package alias
1445
                    // Scan the collection looking for the specified package alias
1439
                    for (Iterator<Package> it = packageCollection.iterator(); it.hasNext();)
1446
                    for (Iterator<Package> it = packageCollection.iterator(); it.hasNext();)
1440
                    {
1447
                    {
1441
                        Package dependency = it.next();
1448
                        Package dependency = it.next();
1442
 
1449
 
1443
                        if ( dependency.mAlias.compareTo( dependencyAlias ) == 0 )
1450
                        if ( dependency.mAlias.compareTo( depEntry.alias ) == 0 )
1444
                        {
1451
                        {
1445
                            dependency.detectCircularDependency(alias, packageCollection, this);
1452
                            dependency.detectCircularDependency(alias, packageCollection, this);
1446
                            break;
1453
                            break;
1447
                        }
1454
                        }
1448
                    }
1455
                    }
Line 1724... Line 1731...
1724
 
1731
 
1725
    }
1732
    }
1726
 
1733
 
1727
    /**
1734
    /**
1728
     *  Add a package dependency
1735
     *  Add a package dependency
1729
     *  UTF Use
-
 
1730
     *  @param p - The package to add as a dependent
1736
     *  @param p - The package to add as a dependent. Uses data from the provided package
1731
     *  @return - The current package to allow chaining of calls
1737
     *  @return - The current package to allow chaining of calls
1732
     */
1738
     */
1733
    public Package addDependency(Package p) {
1739
    public Package addDependency(Package p) {
1734
        mDependencyCollection.add(p.mAlias);
1740
        mDependencyCollection.add(new PkgDependency(p.mAlias, p.mId ));
-
 
1741
        return this;
-
 
1742
    }
-
 
1743
    
-
 
1744
    /**
-
 
1745
     *  Add a package dependency
-
 
1746
     *  @param alias - Alias of the dependent package
-
 
1747
     *  @param pvId  - pvId of the dependent package
-
 
1748
     *  @return - The current package to allow chaining of calls
-
 
1749
     */
-
 
1750
    public Package addDependency(String alias, Integer pvId) {
1735
        mDependencyIDCollection.add(p.mId);
1751
        mDependencyCollection.add(new PkgDependency(alias, pvId ));
1736
        return this;
1752
        return this;
1737
    }
1753
    }
1738
 
1754
 
1739
    /** Clear the packages list of dependencies
1755
    /** Clear the packages list of dependencies
1740
     *  UTF use
1756
     *  UTF use
1741
     *  @return - The current package to allow chaining of calls
1757
     *  @return - The current package to allow chaining of calls
1742
     */
1758
     */
1743
    public Package resetDependencies() {
1759
    public Package resetDependencies() {
1744
        mDependencyCollection.clear();
1760
        mDependencyCollection.clear();
1745
        mDependencyIDCollection.clear();
-
 
1746
        return this;
1761
        return this;
1747
    }
1762
    }
1748
 
1763
 
1749
}
1764
}