+2012-11-29 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Maintain consistent internal vs. external installation records.
+
+ * src/pkginst.cpp (pkgInstall): Set "installed" attribute on internal
+ package reference, to "yes", after installation; CLI didn't need this,
+ but GUI will do so, for any package revisited in a single session.
+
+ * src/pkgunst.cpp (pkgRemove): Similarly, negate "installed" attribute
+ after package removal.
+
2012-11-17 Keith Marshall <keithmarshall@users.sourceforge.net>
Refactor to consolidate three instances of duplicate code.
pkgRegister( sysroot, pkg, tarname, pkgfile );
}
else
- {
- /* Here we have a "real" (physical) package to install;
+ { /* Here we have a "real" (physical) package to install;
* for the time being, we assume it is packaged in our
* standard "tar" archive format.
*/
if( install.IsOk() )
install.Process();
}
+ /* Update the internal record of installed state; although no
+ * running CLI instance will return to any point where it needs
+ * this, we may have been called from the GUI, and it requires
+ * consistency here, if the user revisits this package within
+ * any single active session.
+ */
+ pkg->SetAttribute( installed_key, value_yes );
+
/* Whether we just installed a virtual package or a real package,
* we may now run its post-install script, (if any).
*/
sysroot->SetAttribute( modified_key, value_yes );
}
}
+ /* Update the internal record of installed state; although no
+ * running CLI instance will return to any point where it needs
+ * this, we may have been called from the GUI, and it requires
+ * consistency here, if the user revisits this package within
+ * any single active session.
+ */
+ pkg->SetAttribute( installed_key, value_no );
+
/* After package removal has been completed, we invoke any
* post-remove script which may be associated with the package.
*/