Definition in file aptcache.h.
Go to the source code of this file.
Functions | |
| gboolean | apt_init (const gchar *sourcelist, const gchar *suite_codename, gboolean verbose) |
| initialise the apt cache | |
| gint | check_pkg_name (gconstpointer a, gconstpointer b) |
| gboolean | aptcache_lookup (const gchar *pkg) |
| void | lu_clear_caches (void) |
| gchar * | lu_get_sourcepkg (const gchar *binary) |
| gboolean apt_init | ( | const gchar * | sourcelist, | |
| const gchar * | suite_codename, | |||
| gboolean | verbose | |||
| ) |
initialise the apt cache
When installed this uses the emdebian cache for the current arch.
| gboolean aptcache_lookup | ( | const gchar * | pkg | ) |
lookup the package name against the cache.
Definition at line 257 of file aptcache.cc.
00258 { 00259 GList * available = NULL; 00260 00261 available = g_list_find_custom (apt_list, pkg, check_pkg_name); 00262 if (g_list_length (available)) 00263 return TRUE; 00264 return FALSE; 00265 }
| gint check_pkg_name | ( | gconstpointer | a, | |
| gconstpointer | b | |||
| ) |
compare package names.
Definition at line 248 of file aptcache.cc.
00249 { 00250 gchar * test, * avail; 00251 test = (gchar*)a; 00252 avail = (gchar*)b; 00253 return g_strcmp0 (test, avail); 00254 }
| void lu_clear_caches | ( | void | ) |
clear the source package table
Definition at line 140 of file aptcache.cc.
00141 { 00142 g_hash_table_destroy (src_table); 00143 }
| gchar* lu_get_sourcepkg | ( | const gchar * | binary | ) |
get the equivalent source package name for the supplied binary
Definition at line 268 of file aptcache.cc.
00269 { 00270 gchar * src; 00271 00272 src = NULL; 00273 src = (gchar*)g_hash_table_lookup (src_table, binary); 00274 return src; 00275 }
1.5.6