Changeset View
Changeset View
Standalone View
Standalone View
bin/InstallDB.py
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Line(s) | |||||
256 | 256 | | |||
257 | 257 | | |||
258 | # get a global object | 258 | # get a global object | ||
259 | installdb = InstallDB() | 259 | installdb = InstallDB() | ||
260 | 260 | | |||
261 | # an additional function from portage.py | 261 | # an additional function from portage.py | ||
262 | def printInstalled(): | 262 | def printInstalled(): | ||
263 | """get all the packages that are already installed""" | 263 | """get all the packages that are already installed""" | ||
264 | host = target = portage.alwaysTrue | 264 | portage.printCategoriesPackagesAndVersions( installdb.getDistinctInstalled(), True, True, True) | ||
265 | portage.printCategoriesPackagesAndVersions( installdb.getDistinctInstalled(), portage.alwaysTrue, host, target ) | | |||
266 | 265 | | |||
267 | def main(): | 266 | def main(): | ||
268 | """ Testing the class""" | 267 | """ Testing the class""" | ||
269 | 268 | | |||
270 | # add two databases | 269 | # add two databases | ||
271 | tempdbpath1 = os.path.join( EmergeStandardDirs.emergeRoot(), "tmp", "temp1.db" ) | 270 | tempdbpath1 = os.path.join( EmergeStandardDirs.emergeRoot(), "tmp", "temp1.db" ) | ||
272 | tempdbpath2 = os.path.join( EmergeStandardDirs.emergeRoot(), "tmp", "temp2.db" ) | 271 | tempdbpath2 = os.path.join( EmergeStandardDirs.emergeRoot(), "tmp", "temp2.db" ) | ||
273 | 272 | | |||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |