LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   pyLFS ??? (https://www.linuxquestions.org/questions/linux-from-scratch-13/pylfs-871102/)

vmsda 03-26-2011 05:38 AM

pyLFS ???
 
I am more or less aware that I risk being labelled an heretic, at the very least, but I still have to ask the question:

Is it possible to install a fully functioning LFS desktop environment,
based solely on Python and not on Bash, without massive implications?

Thank you for hints and please forgive the sheer irresponsibility. ;)

EricTRA 03-26-2011 06:19 AM

Hello and Welcome to LinuxQuestions,

Mind you this is just theoretical, no garanties nor proof whatsoever, but giving that you can choose your shell to install....

If you're building LFS and want to use another shell, then feel free to do so, but.....

Python is not a shell! So you'll need, in my opinion, at least A shell, whichever you choose to be able to use Python.

Again, just theory, I hope some of the more experienced LFS and source distro Gurus shed some light.

Kind regards,

Eric

druuna 03-26-2011 10:38 AM

Hi,
Quote:

Originally Posted by vmsda (Post 4304003)
Is it possible to install a fully functioning LFS desktop environment, .....

Lets start with: LFS does not provide a desktop environment. In the LFS documentation the following is mentioned:
Quote:

A by-the-book LFS system is fairly minimal, but is designed to provide a strong base on which you can add any packages you want.
"A (fairly) minimal system" is exactly what you end up with after an LFS build. Hardly any configuration is done yet, only basic security, no network utilities/programs, no ftp/ssh/mail/db servers and no X (let alone a desktop or window manager). And python is also not provided.....

BLFS, which is build using the tools provided by the LFS system, does provide all the above and once you know how things are done, you can build whatever is available as source code (a package manager is not provided out-of-the-box in either LFS or BLFS).

Quote:

Originally Posted by vmsda (Post 4304003)
....... based solely on Python and not on Bash, without massive implications?

Am I correct in assuming you are talking about automating the LFS, and possibly the BLFS installation process using a programming language (python in this case)??

If that is the case: I don't see anything wrong with using python to build LFS (BLFS is another story), as long as it can reproduce the steps that are in the book (and all the extras needed for automation). This will also mean that the shell (bash) is still used, whether you automate or not.

For the sake of simplicity I personally would not use a (scripting) language that is not already provided by LFS. When you boot LFS after finishing the build, python, for example, isn't yet part of the system. Perl, awk, sed, bash etc are. If you also want to automate (parts of) BLFS using python, you would first need to install it.

Hope this helps.

vmsda 03-26-2011 04:24 PM

Thank you for your comprehensive approach, druuna, but

Quote:

Originally Posted by druuna (Post 4304260)
Hi,
... Am I correct in assuming you are talking about automating the LFS, and possibly the BLFS installation process using a programming language (python in this case)?? ...

I am sorry to have given the wrong impression, but no, that is not my idea at all. This was probably because I was thinking of LFS as a project and not as the technical first step in the building up of a "personal" Linux system.

After quite a few years as a desktop user of Linux (my only system) I know how much Bash code lies "under the covers" (the startup procedures, the profiles, and so on). Now, for someone starting in the programming world, Python is a sort of dream come true; Bash is a daily nightmare revisited. So, if one has the chance - afforded by the LFS project - to build one's system from source material, the next desirable step would be to control that same system via Python programs or routines or whatever one wishes to call them. Python, as a tool, has the potential to help hook people into the Linux world; Bash will probably drive them away.

I hope I have clarified matters a little better this time. Thank you in advance for your comments/suggestions.

druuna 03-27-2011 03:37 AM

Hi,
Quote:

Originally Posted by vmsda (Post 4304562)
After quite a few years as a desktop user of Linux (my only system) I know how much Bash code lies "under the covers" (the startup procedures, the profiles, and so on).

A shell, bash in this case, is compulsory. You might be able to use csh, ksh or dash instead of bash, but you do need a shell.

Quote:

Now, for someone starting in the programming world, Python is a sort of dream come true; Bash is a daily nightmare revisited.
That is an opinion, not a fact ;)

My nightmare would be having to use python for everything..... Give me perl, awk, sed, etc and bash to tie it all together. Even if I look at it from a programmers point of view I would not use python (personal choice combined with a lack of python knowledge).

Quote:

So, if one has the chance - afforded by the LFS project - to build one's system from source material, the next desirable step would be to control that same system via Python programs or routines or whatever one wishes to call them. Python, as a tool, has the potential to help hook people into the Linux world; Bash will probably drive them away.
What it comes down to is this: Python is a programming language and not a shell, bash is a shell that can also be used to program (the is a shell being the important part). So to answer your initial question: Nope you cannot exchange bash (or any other shell) for python.

Hope this helps.


All times are GMT -5. The time now is 09:44 AM.