Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--archinstall/__main__.py2
-rw-r--r--archinstall/lib/general.py11
-rw-r--r--archinstall/lib/installer.py16
-rw-r--r--archinstall/lib/user_interaction.py4
-rw-r--r--docs/archinstall/Application.rst2
-rw-r--r--docs/archinstall/Profile.rst2
-rw-r--r--docs/examples/python.rst2
-rw-r--r--docs/installing/guided.rst6
-rw-r--r--docs/installing/python.rst2
-rw-r--r--examples/guided.py19
-rw-r--r--profiles/awesome.py2
-rw-r--r--profiles/gnome.py2
-rw-r--r--profiles/kde.py2
-rw-r--r--profiles/xorg.py2
15 files changed, 43 insertions, 33 deletions
diff --git a/README.md b/README.md
index c2f053b2..8d574369 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Or simply `git clone` the repo as it has no external dependencies *(but there ar
Or run the pre-compiled binary attached in every release as `archinstall-v[ver].tar.gz`.
There's also `PKGBUILD`'s for all the above scenarios.
-And they're also availale as Arch Linux packages over at the unofficial mirror [https://archlinux.life](https://archlinux.life/).
+And they're also available as Arch Linux packages over at the unofficial mirror [https://archlinux.life](https://archlinux.life/).
## Running the [guided](examples/guided.py) installer
diff --git a/archinstall/__main__.py b/archinstall/__main__.py
index fd536258..6cd9d482 100644
--- a/archinstall/__main__.py
+++ b/archinstall/__main__.py
@@ -21,7 +21,7 @@ def find_examples():
def run_as_a_module():
"""
- Ssince we're running this as a 'python -m archinstall' module OR
+ Since we're running this as a 'python -m archinstall' module OR
a nuitka3 compiled version of the project.
This function and the file __main__ acts as a entry point.
"""
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index ff834241..2dd3e5ab 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -100,9 +100,9 @@ class sys_command():#Thread):
self.exec_dir = f'{self.cwd}/{os.path.basename(self.cmd[0])}_workingdir'
if not self.cmd[0][0] == '/':
- # "which" doesn't work as it's a builin to bash.
+ # "which" doesn't work as it's a builtin to bash.
# It used to work, but for whatever reason it doesn't anymore. So back to square one..
-
+
#log('Worker command is not executed with absolute path, trying to find: {}'.format(self.cmd[0]), origin='spawn', level=5)
#log('This is the binary {} for {}'.format(o.decode('UTF-8'), self.cmd[0]), origin='spawn', level=5)
self.cmd[0] = locate_binary(self.cmd[0])
@@ -247,9 +247,10 @@ class sys_command():#Thread):
with open(f'{self.cwd}/trace.log', 'wb') as fh:
fh.write(self.trace_log)
-def prerequisit_check():
- if not os.path.isdir('/sys/firmware/efi'):
- raise RequirementError('Archinstall only supports machines in UEFI mode.')
+
+def prerequisite_check():
+ if not os.path.isdir("/sys/firmware/efi"):
+ raise RequirementError("Archinstall only supports machines in UEFI mode.")
return True
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index e6c2e300..99d8f2b9 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -137,12 +137,14 @@ class Installer():
if self.partition.filesystem == 'btrfs':
#if self.partition.encrypted:
self.base_packages.append('btrfs-progs')
-
+
self.pacstrap(self.base_packages)
self.genfstab()
- with open(f'{self.mountpoint}/etc/fstab', 'a') as fstab:
- fstab.write('\ntmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0\n') # Redundant \n at the start? who knoes?
+ with open(f"{self.mountpoint}/etc/fstab", "a") as fstab:
+ fstab.write(
+ "\ntmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0\n"
+ ) # Redundant \n at the start? who knows?
## TODO: Support locale and timezone
#os.remove(f'{self.mountpoint}/etc/localtime')
@@ -182,7 +184,7 @@ class Installer():
entry.write('initrd /initramfs-linux.img\n')
## blkid doesn't trigger on loopback devices really well,
## so we'll use the old manual method until we get that sorted out.
-
+
if self.partition.encrypted:
for root, folders, uids in os.walk('/dev/disk/by-uuid'):
@@ -191,7 +193,7 @@ class Installer():
if not os.path.basename(real_path) == os.path.basename(self.partition.real_device): continue
entry.write(f'options cryptdevice=UUID={uid}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n')
-
+
self.helper_flags['bootloader'] = True
return True
break
@@ -202,7 +204,7 @@ class Installer():
if not os.path.basename(real_path) == os.path.basename(self.partition.path): continue
entry.write(f'options root=PARTUUID={uid} rw intel_pstate=no_hwp\n')
-
+
self.helper_flags['bootloader'] = True
return True
break
@@ -228,7 +230,7 @@ class Installer():
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} useradd -m -G wheel {user}'))
if password:
self.user_set_pw(user, password)
-
+
if groups:
for group in groups:
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} gpasswd -a {user} {group}'))
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 0d3a12f5..29dfaed2 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -170,7 +170,7 @@ def select_mirror_regions(mirrors, show_top_mirrors=True):
:rtype: dict
"""
- # TODO: Support multiple options and country ycodes, SE,UK for instance.
+ # TODO: Support multiple options and country codes, SE,UK for instance.
regions = sorted(list(mirrors.keys()))
selected_mirrors = {}
@@ -205,7 +205,7 @@ def select_mirror_regions(mirrors, show_top_mirrors=True):
selected_mirrors[selected_mirror] = mirrors[selected_mirror]
else:
RequirementError("Selected region does not exist.")
-
+
return selected_mirrors
raise RequirementError("Selecting mirror region require a least one region to be given as an option.") \ No newline at end of file
diff --git a/docs/archinstall/Application.rst b/docs/archinstall/Application.rst
index 72722362..c6eb0d4d 100644
--- a/docs/archinstall/Application.rst
+++ b/docs/archinstall/Application.rst
@@ -4,7 +4,7 @@ archinstall.Application
=======================
This class enables access to pre-programmed application configurations.
-This is not to be confused with :ref:`archinstall.Profile` which is for pre-prgrammed profiles for a wider set of installation sets.
+This is not to be confused with :ref:`archinstall.Profile` which is for pre-programmed profiles for a wider set of installation sets.
.. autofunction:: archinstall.Application
diff --git a/docs/archinstall/Profile.rst b/docs/archinstall/Profile.rst
index 0f57c68c..a4c1f3bb 100644
--- a/docs/archinstall/Profile.rst
+++ b/docs/archinstall/Profile.rst
@@ -4,7 +4,7 @@ archinstall.Profile
===================
This class enables access to pre-programmed profiles.
-This is not to be confused with :ref:`archinstall.Application` which is for pre-prgrammed application profiles.
+This is not to be confused with :ref:`archinstall.Application` which is for pre-programmed application profiles.
Profiles in general is a set or group of installation steps.
Where as applications are a specific set of instructions for a very specific application.
diff --git a/docs/examples/python.rst b/docs/examples/python.rst
index 2f7c9301..04f2f43a 100644
--- a/docs/examples/python.rst
+++ b/docs/examples/python.rst
@@ -8,7 +8,7 @@ The way the library is invoked in module mode is limited to executing scripts un
It's there for important to place any script or profile you wish to invoke in the examples folder prior to building and installing.
-Pre-requisits
+Pre-requisites
-------------
We'll assume you've followed the `installing.python.manual`_ method.
diff --git a/docs/installing/guided.rst b/docs/installing/guided.rst
index a9b5ab3b..19aee62c 100644
--- a/docs/installing/guided.rst
+++ b/docs/installing/guided.rst
@@ -3,14 +3,14 @@
Guided installation
===================
-This is the installer you'll encounter on the *(currently)* inofficial Arch Linux Archinstall ISO found on `archlinux.life <https://archlinux.life>`_.
+This is the installer you'll encounter on the *(currently)* unofficial Arch Linux Archinstall ISO found on `archlinux.life <https://archlinux.life>`_.
You'll obviously need a physical machine or a virtual machine and have a basic understanding of how ISO-files work, where and how to mount them in order to boot the installer.
It runs you through a set of questions in order to determine what the system should look like. Then the guided installer performs the required installation steps for you. Some additional steps might show up depending on your chosen input at some of the steps - those steps should be self explanatory and won't be covered here.
.. note::
- There are some limitations with the installer, such as that it will not configure WiFi during the installation proceedure. And it will not perform a post-installation network configuration either. So you need to read up on `Arch Linux networking <https://wiki.archlinux.org/index.php/Network_configuration>`_ to get that to work.
+ There are some limitations with the installer, such as that it will not configure WiFi during the installation procedure. And it will not perform a post-installation network configuration either. So you need to read up on `Arch Linux networking <https://wiki.archlinux.org/index.php/Network_configuration>`_ to get that to work.
Features
--------
@@ -18,7 +18,7 @@ Features
The guided installer currently supports:
* *(optional)* Setting up disk encryption
- * *(optional)* Installing some simpel desktop environments
+ * *(optional)* Installing some simple desktop environments
* Choosing between a super-user or root based user setup
Installation steps
diff --git a/docs/installing/python.rst b/docs/installing/python.rst
index ae80e76e..ca34b1af 100644
--- a/docs/installing/python.rst
+++ b/docs/installing/python.rst
@@ -3,7 +3,7 @@
Python library
==============
-Archinstall shipps on `PyPi <https://pypi.org/>`_ as `archinstall <pypi.org/project/archinstall/>`_.
+Archinstall ships on `PyPi <https://pypi.org/>`_ as `archinstall <pypi.org/project/archinstall/>`_.
But the library can be installed manually as well.
.. warning::
diff --git a/examples/guided.py b/examples/guided.py
index cc660b90..68e90306 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -9,10 +9,12 @@ SIG_TRIGGER = False
def kill_handler(sig, frame):
print()
exit(0)
+
def sig_handler(sig, frame):
global SIG_TRIGGER
SIG_TRIGGER = True
signal.signal(signal.SIGINT, kill_handler)
+
original_sigint_handler = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, sig_handler)
@@ -111,7 +113,8 @@ while 1:
continue
break
- if 'users' not in archinstall.storage['_guided']: archinstall.storage['_guided']['users'] = []
+ if 'users' not in archinstall.storage['_guided']:
+ archinstall.storage['_guided']['users'] = []
archinstall.storage['_guided']['users'].append(new_user)
new_user_passwd = getpass.getpass(prompt=f'Password for user {new_user}: ')
@@ -129,13 +132,17 @@ while 1:
if profile:
archinstall.storage['_guided']['profile'] = profile
- if type(profile) != str: # Got a imported profile
- archinstall.storage['_guided']['profile'] = profile[0] # The second return is a module, and not a handle/object.
+ if type(profile) != str: # Got a imported profile
+ archinstall.storage['_guided']['profile'] = profile[0] # The second return is a module, and not a handle/object.
if not profile[1]._prep_function():
- archinstall.log(' * Profile\'s preperation requirements was not fulfilled.', bg='black', fg='red')
+ archinstall.log(
+ ' * Profile\'s preparation requirements was not fulfilled.',
+ bg='black',
+ fg='red'
+ )
continue
- profile = profile[0]._path # Once the prep is done, replace the selected profile with the profile name ("path") given from select_profile()
+ profile = profile[0]._path # Once the prep is done, replace the selected profile with the profile name ("path") given from select_profile()
break
else:
break
@@ -207,7 +214,7 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs:
# unlocks the drive so that it can be used as a normal block-device within archinstall.
with archinstall.luks2(harddrive.partition[1], 'luksloop', disk_password) as unlocked_device:
unlocked_device.format('btrfs')
-
+
perform_installation(unlocked_device, harddrive.partition[0], keyboard_language, mirror_regions)
else:
harddrive.partition[1].format('ext4')
diff --git a/profiles/awesome.py b/profiles/awesome.py
index 0ec6ec4d..0a695344 100644
--- a/profiles/awesome.py
+++ b/profiles/awesome.py
@@ -1,4 +1,4 @@
-# A desktop environemtn using "Awesome" window manager.
+# A desktop environment using "Awesome" window manager.
import archinstall
diff --git a/profiles/gnome.py b/profiles/gnome.py
index 44fd642f..62519264 100644
--- a/profiles/gnome.py
+++ b/profiles/gnome.py
@@ -1,4 +1,4 @@
-# A desktop environemtn using "Awesome" window manager.
+# A desktop environment using "Gnome"
import archinstall
diff --git a/profiles/kde.py b/profiles/kde.py
index d0afee58..052998bd 100644
--- a/profiles/kde.py
+++ b/profiles/kde.py
@@ -1,4 +1,4 @@
-# A desktop environemtn using "Awesome" window manager.
+# A desktop environement using "KDE".
import archinstall, os
diff --git a/profiles/xorg.py b/profiles/xorg.py
index 1cba7a81..a5820268 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -1,4 +1,4 @@
-# A desktop environemtn using "Awesome" window manager.
+# A system with "xorg" installed
import archinstall, os