00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00024 #define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
00025
00026 #include <debian-installer/package.h>
00027 #include <debian-installer/packages.h>
00028
00029 #include <stdbool.h>
00030
00031 typedef struct di_system_package di_system_package;
00032
00041 struct di_system_package
00042 {
00043 di_package p;
00044 int installer_menu_item;
00045 char *subarchitecture;
00046 char *kernel_version;
00047 };
00048
00049 void di_system_package_destroy (di_system_package *package);
00050
00051 di_packages *di_system_packages_alloc (void);
00052 di_packages_allocator *di_system_packages_allocator_alloc (void);
00053
00054 bool di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture);
00055
00056 extern const di_parser_fieldinfo *di_system_package_parser_fieldinfo[];
00057
00058 di_parser_info *di_system_package_parser_info (void);
00059 di_parser_info *di_system_packages_parser_info (void);
00060 di_parser_info *di_system_packages_status_parser_info (void);
00061
00068 static inline di_package *di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
00069 {
00070 return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
00071 }
00072
00079 static inline di_packages *di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
00080 {
00081 return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
00082 }
00083
00090 static inline di_packages *di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
00091 {
00092 return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
00093 }
00094
00101 static inline int di_system_packages_write_file (di_packages *packages, const char *file)
00102 {
00103 return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
00104 }
00105
00112 static inline int di_system_packages_status_write_file (di_packages *packages, const char *file)
00113 {
00114 return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
00115 }
00116
00117 di_slist *di_system_packages_resolve_dependencies_array_permissive (di_packages *packages, di_package **array, di_packages_allocator *allocator);
00118 void di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel);
00119
00121 #endif