Comments (2)
I read through the implementation of sys_command
but I'm unable to grasp what the emulate
option is supposed to do. Would you mind explaining what it's purpose is?
from archinstall.
Correct, there is a history behind this.
sys_command()
was considered a very transparent execution class/function for system commands.
I designed it so that it would be able to take anything, but only execute a subset of parameters.
For instance,
archinstall.luks(partition="/dev/sda2", mountpoint="/mnt", password="xyz", emulate=True)
Would in theory make the sys_command()
emulate the command.
Which perhaps answers the second question, what emulate
does. I used to throughout the development phase to emulate the execution chain, like a unit tests. And to some extent did up until very recently. It was a pretty quick and efficient way to make sure command calls (even on abstract archinstall level) never actually got executed (potentially ruining my harddrive if I tested things "on the go").
So that's the back story. Now to the future plans.
You've manage to find the functionality I'm probably least proud of hehe. And it should be re-worked a bit.
Especially the __iter__
function, I thought it was a nice thing because I could use it with string manpulation and stuff. But I've realized that the best way forward would probably be just a standard .output()
or something which builds/joins the results together. It was also there for this purpose:
for line in sys_command("ls -l"):
print(line)
Which was nice for debug outputs and stuff. But I don't think we need that anymore.
I would need to consider the nature of sys_command
's diffuse parameter-requirement a bit, but as long as the function calls before sys_command
takes *args
and **kwargs
I don't see a problem making sys_command
taking more strict parameters. Since I would like early function calls to propegate down through the function calls to the end-call, and return back results all the way up.
tl;dr: There's nothing saying (any longer) that sys_call
has to utilize the **kwargs
method of getting those, so go for it. If you want to clean that beast up, I'd welcome the change : )
from archinstall.
Related Issues (20)
- Grub doesnt recognize Windows after installing Arch through Archinstall HOT 4
- Error installing HOT 2
- `--help` should not require sudo HOT 1
- the auto partitioning size for /boot is too small HOT 10
- power-profiles-daemon package should be installed by default HOT 2
- ImportError: /usr/lib/libcrypto.so.3: version 'OPENSSL_3.3.P' HOT 3
- Something happen when i try install arch HOT 3
- Grub Install Failure HOT 2
- Selecting a single partition (ext4) it still creates different partitions for root and home. HOT 5
- sof-firmware and alsa-ucm-conf where not installed with pulse HOT 4
- /boot being mounted before / and its causing a crash HOT 5
- Israel is missing in mirror list HOT 1
- Archinstall failed HOT 4
- Nvidia Optimus option when choosing drivers HOT 1
- Archinstall failed HOT 4
- Archinstall crashes with target path already exists: /mnt/arch_btrfs/@ when duel booting
- Unable to reuse existing /home partition when uid is not the default one (1000)
- Suggestion for cinnamon default_profile HOT 3
- [Request] Hardware Encryption Support HOT 2
- Reuse DHCP HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archinstall.