diff --git a/.travis.yml b/.travis.yml index 0b18d927d..f4a11e766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ -language: - - cpp - - python +language: cpp python: - 3.5 @@ -12,7 +10,7 @@ services: notifications: irc: - - "chat.freenode.net#calamares" + - "$IRC_NOTIFY_CHANNEL" install: - docker build -t calamares . diff --git a/calamares.desktop b/calamares.desktop index f90321523..c4346f679 100644 --- a/calamares.desktop +++ b/calamares.desktop @@ -66,7 +66,7 @@ Comment[ja]=Calamares — システムインストーラー Name[lt]=Calamares Icon[lt]=calamares GenericName[lt]=Sistemos diegimas į kompiuterį -Comment[lt]=Calamares — sistemos diegyklė +Comment[lt]=Calamares — Sistemos diegimo programa Name[nb]=Calamares Icon[nb]=calamares GenericName[nb]=Systeminstallatør diff --git a/lang/calamares_lt.ts b/lang/calamares_lt.ts index eab33bca6..a8843f071 100644 --- a/lang/calamares_lt.ts +++ b/lang/calamares_lt.ts @@ -240,7 +240,7 @@ Išvestis: Cancel installation without changing the system. - Atsisakyti diegimo, nieko nekeisti sistemoje. + Atsisakyti diegimo, nieko sistemoje nekeičiant. @@ -277,7 +277,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> - %1 diegimo programa, siekdama įdiegti %2, ketina atlikti pakeitimus diske.<br/><strong>Negalėsite atšaukti šių pakeitimų.</strong> + %1 diegimo programa, siekdama įdiegti %2, ketina atlikti pakeitimus diske.<br/><strong>Šių pakeitimų atšaukti nebegalėsite.</strong> @@ -369,12 +369,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. - Šis kompiuteris netenkina kai kurių %1 diegimui rekomenduojamų reikalavimų.<br/>Diegti galite, bet kai kurios funkcijos gali būti išjungtos. + Šis kompiuteris netenkina kai kurių %1 diegimui rekomenduojamų reikalavimų.<br/>Diegimą galima tęsti, tačiau kai kurios funkcijos gali būti išjungtos. This program will ask you some questions and set up %2 on your computer. - Programa užduos klausimus ir padės įsidiegti %2. + Programa užduos kelis klausimus ir padės įsidiegti %2. @@ -908,12 +908,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Format - Suženklinti + Formatuoti Warning: Formatting the partition will erase all existing data. - Įspėjimas: suženklinant skaidinį, sunaikinami visi jame esantys duomenys. + Įspėjimas: Formatuojant skaidinį, sunaikinami visi jame esantys duomenys. @@ -1058,22 +1058,22 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Format partition %1 (file system: %2, size: %3 MB) on %4. - Suženklinti skaidinį %1 (failų sistema: %2, dydis: %3 MB) diske %4. + Formatuoti skaidinį %1 (failų sistema: %2, dydis: %3 MB) diske %4. Format <strong>%3MB</strong> partition <strong>%1</strong> with file system <strong>%2</strong>. - Suženklinti <strong>%3MB</strong> skaidinį <strong>%1</strong> su failų sistema <strong>%2</strong>. + Formatuoti <strong>%3MB</strong> skaidinį <strong>%1</strong> su failų sistema <strong>%2</strong>. Formatting partition %1 with file system %2. - Suženklinamas skaidinys %1 su %2 failų sistema. + Formatuojamas skaidinys %1 su %2 failų sistema. The installer failed to format partition %1 on disk '%2'. - Diegimo programai nepavyko suženklinti „%2“ disko skaidinio %1. + Diegimo programai nepavyko formatuoti „%2“ disko skaidinio %1. @@ -1237,7 +1237,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. <a href="%1">view license agreement</a> - <a href="%1">žiūrėti licenciją</a> + <a href="%1">žiūrėti licencijos sutartį</a> @@ -1578,7 +1578,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. &Delete - Ša&linti + Iš&trinti diff --git a/lang/calamares_tr_TR.ts b/lang/calamares_tr_TR.ts index 0503b8518..a378d0b6e 100644 --- a/lang/calamares_tr_TR.ts +++ b/lang/calamares_tr_TR.ts @@ -2230,12 +2230,12 @@ Sistem güç kaynağına bağlı değil. Password is too short - + Şifre çok kısa Password is too long - + Şifre çok uzun diff --git a/src/modules/netinstall/README.md b/src/modules/netinstall/README.md index 5d199a559..6478a844e 100644 --- a/src/modules/netinstall/README.md +++ b/src/modules/netinstall/README.md @@ -6,6 +6,7 @@ At installation time, the user is presented with the choice to install groups of Calamares will then invoke the correct backend to install the packages. ## Configuration of the packages + Every distribution can choose which groups to display and which packages should be in the groups. The *netinstall.conf* file should have this format: @@ -48,7 +49,8 @@ If you set both *hidden* and *selected* for a group, you are basically creating which will always be installed in the user's system. ## Configuration of the module -Here is the set of instructions to have the module work in your Calamares. As of July 2016, this has been successfully + +Here is the set of instructions to have the module work in your Calamares. As of July 2016, this has been successfully tested using the live installation of Chakra Fermi. First, if the module is used, we need to require a working Internet connection, otherwise the module will be @@ -63,7 +65,8 @@ If not present, add the **packages** job in the **exec** list. This is the job t to install packages. Make sure it is configured to use the correct package manager for your distribution; this is configured in src/modules/packages/packages.conf. -The exec list should be: +The **exec** list in *settings.conf* should contain the following items in +order (it's ok for other jobs to be listed inbetween them, though): - unpackfs - networkcfg @@ -74,10 +77,10 @@ structure; **networkcfg** set ups a working network in the chroot; and finally * in the chroot. ## Common issues + If launching the package manager command returns you negative exit statuses and nothing is actually invoked, this is likely an error in the setup of the chroot; check that the parameter **rootMountPoint** is set to the correct value in the Calamares configuration. If the command is run, but exits with error, check that the network is working in the chroot. Make sure /etc/resolv.conf exists and that it's not empty. - diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 610fb7b42..a5c428e23 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -26,9 +26,16 @@ drawNestedPartitions: false # Show/hide partition labels on manual partitioning page. alwaysShowPartitionLabels: true -# Default filesystem type, pre-selected in the "Create Partition" dialog. -# The filesystem type selected here is also used for automated install -# modes (Erase, Replace and Alongside). +# Default filesystem type, used when a "new" partition is made. +# +# When replacing a partition, the existing filesystem inside the +# partition is retained. In other cases, e.g. Erase and Alongside, +# as well as when using manual partitioning and creating a new +# partition, this filesystem type is pre-selected. Note that +# editing a partition in manual-creation mode will not automatically +# change the filesystem type to this default value -- it is not +# creating a new partition. +# # Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs # If nothing is specified, Calamares defaults to "ext4". defaultFileSystemType: "ext4" diff --git a/src/modules/testmodule.py b/src/modules/testmodule.py index d115694eb..a25c7bc5d 100755 --- a/src/modules/testmodule.py +++ b/src/modules/testmodule.py @@ -18,6 +18,15 @@ # # You should have received a copy of the GNU General Public License # along with Calamares. If not, see . +""" +Testing tool to run a single Python module; optionally a +global configuration and module configuration can be read +from YAML files. Give a full path to the module-directory, +and also full paths to the configuration files. An empty +configuration file name, or "-" (a single dash) is used +to indicate that no file should be read -- useful to load +a module configuratioon file without a global configuration. +""" import argparse import os @@ -57,26 +66,10 @@ class Job: print("Job set progress to {}%.".format(progress * 100)) -def main(): - """ +def test_module(moduledir, globalconfigfilename, moduleconfigfilename, lang): + print("Testing module in: " + moduledir) - - :return: - """ - parser = argparse.ArgumentParser() - parser.add_argument("moduledir", - help="Dir containing the Python module.") - parser.add_argument("globalstorage_yaml", nargs="?", - help="A yaml file to initialize GlobalStorage.") - parser.add_argument("configuration_yaml", nargs="?", - help="A yaml file to initialize the Job.") - parser.add_argument("--lang", "-l", nargs="?", default=None, - help="Set translation language.") - args = parser.parse_args() - - print("Testing module in: " + args.moduledir) - - confpath = os.path.join(args.moduledir, "module.desc") + confpath = os.path.join(moduledir, "module.desc") with open(confpath) as f: doc = yaml.load(f) @@ -87,27 +80,33 @@ def main(): # Parameter None creates a new, empty GlobalStorage libcalamares.globalstorage = libcalamares.GlobalStorage(None) libcalamares.globalstorage.insert("testing", True) - if args.lang: - libcalamares.globalstorage.insert("locale", args.lang) - libcalamares.globalstorage.insert("localeConf", {"LANG": args.lang}) + if lang: + libcalamares.globalstorage.insert("locale", lang) + libcalamares.globalstorage.insert("localeConf", {"LANG": lang}) # if a file for simulating globalStorage contents is provided, load it - if args.globalstorage_yaml: - with open(args.globalstorage_yaml) as f: + if globalconfigfilename: + with open(globalconfigfilename) as f: gs_doc = yaml.load(f) for key, value in gs_doc.items(): libcalamares.globalstorage.insert(key, value) + print("Global configuration '" + globalconfigfilename + "' loaded.") + else: + print("No global configuration loaded.") cfg_doc = dict() - if args.configuration_yaml: - with open(args.configuration_yaml) as f: + if moduleconfigfilename: + with open(moduleconfigfilename) as f: cfg_doc = yaml.load(f) + print("Local configuration '" + moduleconfigfilename + "' loaded.") + else: + print("No module configuration loaded.") - libcalamares.job = Job(args.moduledir, doc, cfg_doc) + libcalamares.job = Job(moduledir, doc, cfg_doc) - scriptpath = os.path.abspath(args.moduledir) + scriptpath = os.path.abspath(moduledir) sys.path.append(scriptpath) - import main + import main # Assumed to import main from module itself print("Output from module:") print(main.run()) @@ -115,5 +114,33 @@ def main(): return 0 +def munge_filename(filename): + """ + Maps files "" (empty) and "-" (just a dash) to None, + to simplify processing elsewhere. + """ + if not filename or filename == "-": + return None + return filename + + +def main(): + parser = argparse.ArgumentParser(description=globals()["__doc__"]) + parser.add_argument("moduledir", + help="Dir containing the Python module.") + parser.add_argument("globalstorage_yaml", nargs="?", + help="A yaml file to initialize GlobalStorage.") + parser.add_argument("configuration_yaml", nargs="?", + help="A yaml file to initialize the Job.") + parser.add_argument("--lang", "-l", nargs="?", default=None, + help="Set translation language.") + args = parser.parse_args() + + return test_module(args.moduledir, + munge_filename(args.globalstorage_yaml), + munge_filename(args.configuration_yaml), + args.lang) + + if __name__ == "__main__": sys.exit(main())