aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/src
AgeCommit message (Collapse)Author
2012-03-19[reltool] Update state and tables consistently for all types of config changesSiri Hansen
OTP-9794 OTP-9968 The main idea behind the data structure in reltool_server is that the state shall reflect what is explicitly configured, and the tables shall contain this configuration plus everything that is derived. In some cases, however, this was not the complete truth: * the application table was never read * the module table was never updated on undo * the state contained a lot more than what was explicitly configured This commit re-writes major parts of the reltool_server for the sake of unifying the way the state and tables are updated: * The list of applications in the state now only contains those applications and modules for which there are explicit settings in the configuration (given at startup or changed from the GUI) * When changing any bit of the configuration, the tables are always emptied and every part is derived again from the configuration found in the state * All configuration changes now cause a re-read of the file system, meaning that if something has changed in the file system it will be reflected in the result of the configuration change. This is the case even if no file system related configuration is changed (e.g. root dir or lib dirs) (*POSSIBLE INCOMPATIBILITY*) * Requests for applications and modules from the GUI now always read the tables, not the state * When loading a new configuration file via the GUI, the old configuration is completly scratched, and only the new is valid (*POSSIBLE INCOMPATIBILITY*) * The handling of escripts which include archives of applications is changed to always produce one #app record for the escript in addition to one for each inlined application. All modules are listed as parts of the inlined application where it belongs and not as part of the escript's #app record. This is a temporary solution which will be modified and improved. The following bugs are corrected by this commit: * Loading a config which contains an escript via the GUI menu did not produce the same #app record as when loading the same configuration at reltool start. Paths, version and label could differ. * Loading config with same escript (source) twice caused reltool to add same module twice in #app.mods * Loading config with same escript (inlined beam) twice caused reltool to fail saying module is included by two different applications * Loading config which in addition to an existing escript also adds another escript for which the name sorts before the existing one would cause reltool to fail saying "Application name clash"
2012-03-19[reltool] Add tests for sorting of applications in .rel and .script filesSiri Hansen
OTP-9794 Test cases create_release_sort and create_script_sort are added. The test are temporarily skipped since they detected quite a few bugs that will be corrected with OTP-9792. The following bug is corrected in this commit:' reltool_server did not recognize {App,InclApps} inside a 'rel' specification in the reltool config, e.g. {rel, "myrel", "1.0", [{myapp,[app2]}]}.
2012-03-19[reltool] Add test case for reltool_server:get_modSiri Hansen
OTP-9794 This test case revealed a bug that occurs when calling reltool_server:get_mod after reltool_server:undo_config. get_mod reads from the module table (ets) and not from the reltool_server state, while undo_config only changes the state. This bug has been corrected, so undo_config now updates both state and tables (it does the same as set_sys).
2012-03-19[reltool] Add more test cases and fix bugsSiri Hansen
OTP-9794 The following test cases are added for the inteface from GUI to reltool_server: * get_config * get_apps * set_app_and_undo * set_apps_and_undo * load_config_and_undo * reset_config_and_undo * save_config The following bugs were found and corrected: * If set_apps failed, then the state of reltool_server would not be reset to how it was before the failing operation - and every operation done afterwards would also (seem to) fail. * undo_config did not work after reset_config - since faulty #sys record was stored as old_sys. * undo_config did not work after set_app (used when changing the content of an application from the GUI) - since old_sys was not set. Also old_status was not set causing possible warnings to disappear. * undo_config did not work after set_apps (used e.g. when excluding or including an application from the GUI) - since old_sys was not set. Also old_status was not set causing possible warnings to disappear.
2011-07-01Merge branch 'siri/reltool/empty-radiobox/OTP-9384' into devSiri Hansen
* siri/reltool/empty-radiobox/OTP-9384: Do not add an empty radio box on the releases tab for the start_clean release
2011-06-30Do not add an empty radio box on the releases tab for the start_clean releaseSiri Hansen
First, the radiobox is changed to a listbox, since this will allow multiple selections. This is however for future use - for now a selection will only cause a printout in the erlang shell. Second, add kernel and stdlib to the list of applications in order to make the picture complete and avoid an empty list (radio) box for the start_clean release.
2011-06-22Offer to set safe configuration if reltool:start failsSiri Hansen
If a module is duplicated in the library directories visible to reltool, and the configuration does not point out which file to use, then reltool:start will fail. This commit adds a pop-up which asks if it should continue with a "safe" configuration: [{incl_cond,exclude}, {app,kernel,[{incl_cond,include}]}, {app,stdlib,[{incl_cond,include}]}, {app,sasl,[{incl_cond,include}]}]
2011-05-17Allow same module name in multiple applications if explicitely excludedSiri Hansen
Earlier, reltool expected all module names detected under the lib directories to have unique names. If this was not the case, the result was undefined - i.e. the beam file of the duplicated module might be included in multiple applications in the target area, or it might even be excluded from all applications. This commit adds awareness in reltool that a module might occur in multiple applications, and it is allowed as long as the module or it's application is explicitely excluded in all but one of the containing applications.
2011-03-21Allow app_file option to be keep | strip | all, as documentedSiri Hansen
This is the correction of the bug not allowing the values 'strip' or 'all' for the app_file option in reltool.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-07Fix erroneous typesKostis Sagonas
2011-03-07Eliminate two dialyzer warningsKostis Sagonas
2011-03-06Code cleanups and simplificationsKostis Sagonas
2011-03-06Fix a bug in the calculation of circular dependenciesKostis Sagonas
While at it, applied some cleanups and code modernizations suggested by tidier.
2011-03-06Use lists:foreach/2 when the return is not neededKostis Sagonas
2011-03-06Put files alphabeticallyKostis Sagonas
2011-03-06Fix two erroneous specs of reltool.erlKostis Sagonas
The reltool module contained two seriously erroneous specs which caused bogus warnings when dialyzing reltool and some correct code of users. These were fixed (specs for start_link/1 and eval_server/3). While at it, did some tidier cleanups and some cosmetic changes.
2010-05-19Improve lookup of erl filesHåkan Mattsson
Instead of looking up erl files that almost matched exact match is now required. For example a file named "junk_food.erl" will not longer match "food.erl".
2010-04-28Merge branch 'hawk/reltool' into devErlang/OTP
* hawk/reltool: Make some cleanups Ensure that {error, Reason} is returned even when server dies Introduced a new embedded_app_type option Removed spurious CDATA in documentation Automatically include applications that must be started Add app test SUITE Add app and appup files to reltool Add function to return status about the configuration Improved handling of applications explicitly included releases Created escript for simplified usage from makefiles OTP-8590 hawk/reltool
2010-04-22Make some cleanupsHåkan Mattsson
2010-04-19Ensure that {error, Reason} is returned even when server diesHåkan Mattsson
2010-04-19Introduced a new embedded_app_type optionHåkan Mattsson
It is for embedded systems where all included applications must be loaded from the boot script. If embedded_app_type is set to something else than undefined all included applications will be included in both the "rel" as well as in the "script".
2010-04-19Automatically include applications that must be startedHåkan Mattsson
Applications that are required to be started before other applications according to their app-file are now automatically included in the release. The kernel and stdlib applications are automatically included.
2010-04-19Add app test SUITEHåkan Mattsson
2010-04-19Add app and appup files to reltoolHåkan Mattsson
2010-04-19Add function to return status about the configurationHåkan Mattsson
It is called reltool:get_status/1. The API functions in reltool that may take PidOrOptions as input and actually gets Options does now print out the warnings.
2010-04-19Improved handling of applications explicitly included releasesHåkan Mattsson
Applications that are listed in a release are now automatically included.
2010-04-19Created escript for simplified usage from makefilesHåkan Mattsson
2010-03-17Merge branch 'hawk/escript-add-create-and-extract' into devErlang/OTP
* hawk/escript-add-create-and-extract: Add type info for record fields Remove the undocumented function escript:foldl/3 Make reltool independent of the function escript:foldl/3 Add functions to create and extract escripts Add function zip:foldl/3 to iterate over zip archives OTP-8521 hawk/escript-add-create-and-extract Added function zip:foldl/3 to iterate over zip archives. Added functions to create and extract escripts. See escript:create/2 and escript:extract/2. The undocumented function escript:foldl/3 has been removed. The same functionality can be achieved with the more flexible functions escript:extract/2 and zip:foldl/3. Record fields has been annotated with type info. Source files as been adapted to fit within 80 chars and trailing whitespace hasd been removed.
2010-03-16Add type info for record fieldsHåkan Mattsson
While at it, adapt the source files to fit within 80 chars and remove trailing whitespace.
2010-03-16Make reltool independent of the function escript:foldl/3Håkan Mattsson
The function is undocumented and is removed. The new implementation uses the newly introduced functions escript:extract/2 and zip:foldl/3. These new functions are documented (which implies that they are a part of the public API).
2010-03-15Update copyright headersBjörn Gustavsson
2010-02-10OTP-8057 Removed spurious documentation files.Håkan Mattsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP