~romaimperator/keryx/devel

« back to all changes in this revision

Viewing changes to libkeryx/definitions/dpkg/__init__.py

  • Committer: Chris Oliver
  • Date: 2009-10-01 04:40:03 UTC
  • Revision ID: excid3@gmail.com-20091001044003-qf5jpqwwg023aajm
Filtered out some of the entries acting up

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
            raise OSError, "Aptitude is not installed on this machine."
100
100
 
101
101
 
102
 
    def UpdateInternet(self):
 
102
    def OnUpdateInternet(self):
103
103
        """Update package list from the internet"""
104
104
        # Get project's repo relationships
105
105
        rels = self.session.query(Relation). \
160
160
#                     'size': '10504', 
161
161
#                     'original-maintainer': 'Michael Meskes <meskes@debian.org>'}
162
162
 
163
 
#                    name, version, section, \
164
 
#                    installed_size, maintainer, original_maintainer, \
165
 
#                    architecture, replaces, provides, depends, recommends, \
166
 
#                    suggests, conflicts, filename, size, md5sum, sha256, \
167
 
#                    shortdesc, longdesc, homepage, bugs, origin, task
168
 
 
169
 
                    package = Package(val, ver[1], p.get("section"),
170
 
                            p.get("installed-size"), p.get("maintainer"),
171
 
                            p.get("original-maintinare"), p.get("architecture"),
172
 
                            p.get("replaces"), p.get("provides"), 
173
 
                            p.get("depends"), p.get("recommends"),
174
 
                            p.get("suggests"), p.get("conflicts"),
175
 
                            p.get("filename"), p.get("size"),
176
 
                            p.get("md5sum"), p.get("sha256"),
177
 
                            p.get("description")[0], p.get("description")[1:],
178
 
                            p.get("homepage"), p.get("bugs"),
179
 
                            p.get("origin"), p.get("task")                                     
180
 
                            )
 
163
                    # TODO: Test for type being a list, if so, " ".join()
 
164
                    # Use " ".join() when multiple lines might exist
 
165
                    package = Package(unicode(val), unicode(ver[1]), 
 
166
                        unicode(p.get("section","")),
 
167
                        unicode(p.get("installed-size","")), 
 
168
                        unicode(" ".join(p.get("maintainer","")), errors='ignore'),
 
169
                        unicode(" ".join(p.get("original-maintainer","")), errors='ignore'), 
 
170
                        unicode(p.get("architecture",""), errors='ignore'),
 
171
                        unicode(p.get("replaces",""), errors='ignore'),
 
172
                        )
181
173
                    self.session.add(package)
182
174
        
183
175
####################