~camicrisystems/cube-server/v4

« back to all changes in this revision

Viewing changes to src/repository-manager.vala

  • Committer: camicrisystems at gmail
  • Date: 2017-08-20 06:47:47 UTC
  • Revision ID: camicrisystems@gmail.com-20170820064747-t41kmm7ibe5up6gt
Added EqualFunc equals to Package.
Use Package.equals on every ArrayList creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
                _section_map.clear();
112
112
                foreach ( string key in _base_mgr.section_configuration_file.configuration_map.keys )
113
113
                {                       
114
 
                        _section_map[key] = new ArrayList<Package>();
 
114
                        _section_map[key] = new ArrayList<Package>(Package.equals);
115
115
                }
116
116
        }
117
117
 
314
314
        }
315
315
 
316
316
        public void mark_packages()
317
 
        {               
 
317
        {
318
318
                //Check for upgradable packages
319
319
                int progress_ctr = 0;
320
320
                foreach ( string key in _installed_packages.keys )
541
541
 
542
542
        public Package[] get_upgradable_packages()
543
543
        {
544
 
                ArrayList<Package> pkgs = new ArrayList<Package>();
 
544
                ArrayList<Package> pkgs = new ArrayList<Package>(Package.equals);
545
545
                foreach ( string p in _upgradable_packages )
546
546
                        pkgs.add ( _available_packages[p] );
547
547
                return pkgs.to_array();
549
549
 
550
550
        public Package[] get_downloaded_packages()
551
551
        {
552
 
                ArrayList<Package> pkgs = new ArrayList<Package>();
 
552
                ArrayList<Package> pkgs = new ArrayList<Package>(Package.equals);
553
553
                foreach ( string p in _downloaded_packages )
554
554
                        pkgs.add ( _available_packages[p] );
555
555
                return pkgs.to_array();