27 bool operator() (
const std::string& a,
const std::string& b)
const {
28 return stricmp(a.c_str(), b.c_str()) < 0;
131 std::set<string> _packages_to_unpack;
135 std::set<string> _packages_pre_unpacked;
139 std::set<string> _packages_being_unpacked;
143 std::set<string> _packages_unpacked;
147 std::set<string> _packages_to_remove;
151 std::set<string> _packages_being_removed;
155 std::set<string> _packages_removed;
159 std::set<string> _files_to_unpack;
163 std::set<string> _files_being_unpacked;
167 std::set<string> _files_unpacked;
171 std::set<string, case_insensitive_cmp> _files_to_remove;
175 std::set<string> _files_being_removed;
179 std::set<string> _files_removed;
182 std::set<string> _packages_cannot_process;
186 std::set<string, case_insensitive_cmp> _files_that_conflict;
190 std::set<string> _existing_module_packages;
214 {
return _files_done; }
220 {
return _files_total; }
226 {
return _bytes_done; }
232 {
return _bytes_total; }
249 {
return _packages_cannot_process; }
258 {
return _files_that_conflict; }
278 void read_manifest(std::set<string>& mf,
const string& pkgname);
298 void prepare_manifest(std::set<string>& mf,
const string& pkgname);
305 void activate_manifest(
const string& pkgname);
312 void remove_manifest(
const string& pkgname);
330 void replace_file(
const string&
dst_pathname,
bool overwrite);
359 void unwind_replace_file(
const string&
dst_pathname,
bool overwrite);
378 bool already_installed(
const control& ctrl,
const std::set<string> &mf);
382 void update_existing_modules();
385 void unwind_existing_modules();
387 class cannot_process;
389 class file_info_not_found;
390 class riscos_info_not_found;
const std::set< string, case_insensitive_cmp > & files_that_conflict() const
Get the set of destination pathnames that conflict with files already on the system.
Definition: unpack.h:257
The state in which old versions of files are backed up and replaced with new versions.
Definition: unpack.h:59
The state in which state_pre_remove is being backed out.
Definition: unpack.h:80
virtual ~unpack()
Destroy unpack object.
Definition: unpack.cc:178
The state in which state_pre_unpack is being backed out.
Definition: unpack.h:82
The state in which state_unpack is being backed out.
Definition: unpack.h:78
static const size_type npos
A null value for use in place of a byte count.
Definition: unpack.h:41
The state in which backups are deleted, and the states of packages to be removed are changed to statu...
Definition: unpack.h:66
size_type files_total() const
Get total number of files to process.
Definition: unpack.h:219
A class for unpacking and removing sets of packages.
Definition: unpack.h:33
void log_to(pkg::log *use_log)
Set the log to add the unpack messages to.
Definition: unpack.cc:181
The state in which files are unpacked from their zip archives and moved to temporary locations...
Definition: unpack.h:56
state_type
An enumeration for describing the state of the unpack operation.
Definition: unpack.h:44
A class for automatically creating and deleting directories.
Definition: auto_dir.h:20
The state in which the states of packages to be unpacked are changed to status::state_unpacked.
Definition: unpack.h:69
The state in which an error has occurred and an attempt has been made to back out changes...
Definition: unpack.h:85
A class to represent the content of a RiscPkg control file.
Definition: control.h:24
size_type files_done() const
Get number of files processed.
Definition: unpack.h:213
A mixin class to represent a cooperative thread.
Definition: thread.h:12
Class to log actions that occur in LibPkg.
Definition: log.h:189
size_type bytes_done() const
Get number of bytes processed.
Definition: unpack.h:225
A class for representing the collection of package database tables.
Definition: pkgbase.h:22
The state in which state_replace is being backed out.
Definition: unpack.h:76
unsigned long long size_type
A type for representing byte counts.
Definition: unpack.h:38
size_type bytes_total() const
Get total number of bytes to process.
Definition: unpack.h:231
Comparison that does not take into account the case of the string.
Definition: unpack.h:26
const char * dst_pathname
Definition: path_table.cc:20
The state in which all operations have been successfully completed.
Definition: unpack.h:72
The state in which old versions of files that do not have replacements are backed up then removed...
Definition: unpack.h:62
unpack(pkgbase &pb, const std::set< string > &packages)
Construct unpack object.
Definition: unpack.cc:150
const char * src_pathname
Definition: path_table.cc:19
The state in which the states of packages to be removed are changed to status::state_half_unpacked.
Definition: unpack.h:53
An interface class to represent a zip file.
Definition: zipfile.h:20
void poll()
Poll this thread.
Definition: unpack.cc:186
const std::set< string > & packages_cannot_process() const
Get the set of packages that cannot be processed.
Definition: unpack.h:248
The state in which state_remove is being backed out.
Definition: unpack.h:74
bool operator()(const std::string &a, const std::string &b) const
Definition: unpack.h:27
string message() const
Get error message.
Definition: unpack.h:239
The state in which the states of packages to be unpacked are changed to status::state_half_unpacked.
Definition: unpack.h:49
state_type state() const
Get current state of the unpack operation.
Definition: unpack.h:207