Logo Search packages:      
Sourcecode: rapid-spring version File versions  Download package

def rapid::rapid::PackageSource::read_packages_gz (   self )
Reads global packages.gz into a dictionary of Packages.

      Contrary to versions.gz, packages.gz:
      - is normalised (i.e. every package occurs only once),
      - does not support '|' characters in tags (tags are '|' separated)

Definition at line 147 of file rapid.py.

                                :
            """ Reads global packages.gz into a dictionary of Packages.

                  Contrary to versions.gz, packages.gz:
                  - is normalised (i.e. every package occurs only once),
                  - does not support '|' characters in tags (tags are '|' separated)
            """
            def read_line(line):
                  row = line[:-1].split(',')
                  return (row[3], Package(tags         = psv(row[0]), hex  = row[1],
                                          dependencies = psv(row[2]), name = row[3]))

            if os.path.exists(self.packages_gz):
                  with closing(gzip.open(self.packages_gz)) as f:
                        return dict(map(read_line, f))
            return {}


Generated by  Doxygen 1.6.0   Back to index