Commit Graph

2800 Commits

Author SHA1 Message Date
Anton Hvornum ae0d700c7e
Merge pull request #668 from olekthunder/use_mirrors_fix
Fix use_mirrors
2021-10-27 11:52:44 +02:00
Anton Hvornum 72849083e6
Merge pull request #662 from theaeonsolution/master
Remove duplicate package
2021-10-26 16:11:30 +02:00
Anton Hvornum 7149b76f3b
Forgot some imports that didn't show up on a static run without going through a few of the menu's 2021-10-22 21:54:16 +02:00
Anton Hvornum 8b96080ec8
Forgot some imports that didn't show up on a static run without going through a few of the menu's 2021-10-22 21:02:39 +02:00
Anton Hvornum 2ef793b76a
Forgot some imports that didn't show up on a static run without going through a few of the menu's 2021-10-22 20:55:00 +02:00
Anton Hvornum 3ec8df9753
Removed the old disk.py 2021-10-22 20:45:44 +02:00
Anton Hvornum 7ac06d75d0
Restructured disk.py into lib/disk/<splits>.py instead. Shouldn't be any broken links as we expose all the functions through __init__.py - but you never know so I'll keep an eye for issues with this. 2021-10-22 20:43:01 +02:00
Oleksandr Zinkevych a822b8edae
use_mirrors: return None instead of True 2021-10-22 14:53:18 +03:00
Richard Neumann 8eea325924 Improve type hint 2021-10-21 22:56:46 +02:00
Richard Neumann 63c6f39f98 Generalize CPU vendor detection
Implement has_amd_cpu() and has_intel_cpu() as partials.
2021-10-21 22:54:00 +02:00
Richard Neumann 4f6cec5069 Remove useless initialization of mem_info = {} 2021-10-21 22:50:49 +02:00
Richard Neumann ca25c356b6 Update type hints
meminfo() returns ints.
2021-10-21 22:48:52 +02:00
Oleksandr Zinkevych 165d47f4bb
Fix use_mirrors 2021-10-15 18:21:35 +03:00
Oleksandr Zinkevych 427492d7c9
Fix re_rank_mirrors 2021-10-15 18:03:08 +03:00
Christian Clauss 566693c4f8
max-complexity = 40 2021-10-14 15:42:37 +02:00
Anton Hvornum 448917487a
Tweaked the ignores and made it less forgiving 2021-10-14 13:05:45 +00:00
Anton Hvornum ba725517fd
Merge pull request #644 from JakobDev/cutefishterm
Remove Konsole from cutefish profile
2021-10-14 13:02:34 +02:00
Anton Hvornum 7e096e4f6d
Merge pull request #643 from Svintooo/svintooo-fix
Various bug fixes
2021-10-14 13:01:43 +02:00
theaeonsolution fce7accce1
Remove duplicate package 2021-10-12 19:59:31 -05:00
Christian Clauss 52dbccea5e Tighten up flake8 tests used by lint_python GitHub Action 2021-10-04 11:08:21 +02:00
JakobDev 94cf38c171
Remove Konsole from cutefish profile 2021-09-25 11:49:52 +02:00
Hugo Ankarloo 5bcbb50936 Fix Bug: 'Suggest partition layout' crashes
File: lib/user_interaction.py

When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the installer crashes.

REASON
Bug was introduced in commit 9e67ce3, when partition layout was
changed to use device.path as keys (instead of device).

It seems all necessary changes were made for this, except this one.
2021-09-21 00:38:20 +02:00
Hugo Ankarloo e71a41377d Merge branch 'master' into svintooo-fix
Sync branch svintooo-fix with latest code changes on master.
2021-09-20 21:52:14 +02:00
Hugo Ankarloo 26244212cf Fix Bug: Cannot get partuuid from loop device
File: lib/disk.py

When installing on a loopback device (a.k.a loop device), function
Filesystem.partuuid_to_index() crashes with a JSON parsing error.

REASON

1) For loop devices, the property BlockDevice.device returns the
   actual image file (back-file) of the loop device instead of the
   /dev/X device.

2) Function Filesystem.partuuid_to_index() executes `lsblk --json`
   against BlockDevice.device .

3) `lsblk` fails and prints the error "not a block device" to stderr.
   This causes the output to not be valid JSON.

4) Code crashes when JSON parser tries to parse the output.

SOLUTION

- Make sure property BlockDevice.device only returns a valid block
  device.

- Create new function BlockDevice.device_or_backfile that mimics
  the present behaviour of BlockDevice.device.

- Use BlockDevice.device_or_backfile in function
  BlockDevice.__repr__().

SOLUTION REASONING

I can only see one reason behind BlockDevice.device returning
the back-file of a loop device, and that is to show the back-file
to the user (instead of /dev/X) when printing the string
representation of a BlockDevice.

All other parts of the code can use the /dev/X file just fine.

And IMO it makes more sense that a property named `device` only
returns devices, and not normal files.
2021-09-20 21:46:56 +02:00
Hugo Ankarloo 915ae88947 Fix Bug: Set filesystem crashes if no partitions
File: lib/user_interaction.py

When function manage_new_and_existing_partitions() is used, and
no partitions are configured, and 'Set desired filesystem for a
partition' is selected, the installer crashes.
2021-09-20 20:17:39 +02:00
Hugo Ankarloo ffbfafb354 Fix Bug: config b0rked by Suggest partition layout
File: lib/user_interaction.py

When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the partition info is not
correctly stored in the config.

Instead of: {"partitions": [{...}, {...}]}
You get: {"partitions": {"partitions": [{...}, {...}], "wipe":True}}
2021-09-20 19:58:56 +02:00
Hugo Ankarloo d2d80113b3 Fix Bug: Timezone is ignored, always same as host
Bug affects normal interactive usage (example/guided.py).

The timezone configured in the installer is not the timezone that
ends up in the new installed system. Instead, the timezone
used in the host system (from where the installer is run) is the
one that finally ends up being used.

Reason: systemd-nspawn by default copies the host timezone into
the target. And systemd-nspawn is run when keyboard-layout is
changed (which is done after changing the timezone).

Solution: Add option `--timezone=off` to systemd-nspawn, which
hinders affecting the timezone in the target.
2021-09-20 19:30:07 +02:00
Anton Hvornum c33ab997c9
Merge pull request #642 from SecondThundeR/misc-fixes
general: remove all found white-spaces
2021-09-19 15:01:53 +02:00
SecondThundeR ffe38c879a general: remove all found white-spaces
Also this change adds new line at the end for some scripts
2021-09-19 15:49:44 +03:00
Anton Hvornum ed823be3ba Refactoring and cleaning up a bit
I'm making sure that the JSON structure of the user config can get a say in how the subvolumes should be used later on. As well as splitting up where the logic should be to make it easier to maintain.
2021-09-18 15:52:29 +02:00
Anton Hvornum aacbc2f29d
Adding network applet support in xfce #639 from falieri/patch-1
Update xfce4.py
2021-09-18 15:48:09 +02:00
Falieri a93225d1de
Update xfce4.py
add network support to the xfce panel
2021-09-18 10:36:42 -03:00
Anton Hvornum 68212dd32c Preparing to split up ./lib/disk.py
And added some sane(?) defaults, which I'll massage into code some how.
2021-09-18 14:54:42 +02:00
Anton Hvornum 6a125d5bd2 Adding in options for BTRFS subvolumes 2021-09-18 11:22:18 +02:00
Anton Hvornum f6ceb8bba6 Removing hardcoded btrfs for suggested partition layouts. 2021-09-18 10:37:55 +02:00
Anton Hvornum ad534f0804
Merge pull request #636 from archlinux/torxed-fix-616
Removing /tmp from fstab
2021-09-17 23:52:49 +02:00
Anton Hvornum e21cf77e77 Removing /tmp from fstab
Since systemd takes care of mounting /tmp as a tmpt, there's no point in having a manual entry in fstab.
2021-09-17 23:52:10 +02:00
Anton Hvornum 7be52655c0
Merge pull request #635 from archlinux/torxed-fix-593
Added gvfs to fix "trash" in xfce4
2021-09-17 17:29:21 +02:00
Anton Hvornum b4481506ff Added gvfs to fix "trash" in xfce4
https://wiki.archlinux.org/title/Xfce#Trash_icon_not_visible_and_trash_applet_does_not_work
2021-09-17 17:28:46 +02:00
Anton Hvornum ffc43bc041 Adding linux -headers for nvidia-dkms
This should address #585, as I don't see any nvidia-dkms other than when linux-zen and linux-lts is chosen, I chose to put the -headers logic in the same section. If this is needed for vanilla `linux` kernel as well, then move the logic one line up.
2021-09-15 22:17:30 +02:00
Anton Hvornum 9e67ce3f05 Making sure the drive paths are in the JSON structure, and not the class object, as it won't work seamlessly to access for instance storage['disk_layouts'][ClassInstance()] if it's not the identical mem copy of the object we're accessing, so strings are better for storage/comparisons. 2021-09-15 20:11:40 +02:00
Anton Hvornum 70af00f33d Tweaked the logic for parsing the --harddrives parameter. 2021-09-15 19:23:35 +02:00
Anton Hvornum e6549c1edb Fixing type issue with conversion to multiple disk logic. 2021-09-15 19:17:32 +02:00
Anton Hvornum 2cfbafc653 More error handling and fixed a spelling error. 2021-09-15 19:16:30 +02:00
Anton Hvornum 1a7056efc4 Might be redundant, but if the JSON file given to --config contains a list it will break the .split(), but if --harddrives is given as an argument, then we need to split. So adding a type-check 2021-09-15 19:09:57 +02:00
Anton Hvornum d6acfec799 Updating support for --disk_layouts. It now supports file paths as well as JSON in string format via --disk_layouts=<json> 2021-09-15 19:01:14 +02:00
Anton Hvornum 8dd097da05 Reverted last change, and improved it. By passing it through load_config and tweaking the read structure a bit, it worked out better if the accessed values are in archinstall.storage instead. 2021-09-15 17:36:54 +02:00
Anton Hvornum c09a36b7b1 Changed from internal storage to parameter-friendly arguments for disk_layouts, so we can support JSON for disk layouts on the new logic. 2021-09-15 13:33:34 +00:00
Anton Hvornum 7d3f2b6f29 Added a 'hidden' variable called --disk-sleep for delaying disk partition up time before continuing after a format. This is an ugly hack to get around some disk issues, for now. 2021-09-14 14:07:50 +00:00
Anton Hvornum 6d2a2f327c Moved --noconfirm at the end of the pacstrap command to get piped properly to pacman inside pacstrap. 2021-09-14 11:47:16 +00:00