Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32858

Re: Obnoxious postings from Google Groups

From GangGreene <GangGreene@example.com>
Newsgroups comp.lang.python
Subject Re: Obnoxious postings from Google Groups
Date 2012-11-06 19:16 -0500
Organization A noiseless patient Spider
Message-ID <gslom9-s4j.ln1@crazy-horse.bildanet.com> (permalink)
References (12 earlier) <mailman.3269.1352097585.27098.python-list@python.org> <50989a16$0$29980$c3e8da3$5496439d@news.astraweb.com> <roy-2F6600.08523606112012@news.panix.com> <nornm9-nhi.ln1@crazy-horse.bildanet.com> <509999e0$0$29980$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


On Tue, 06 Nov 2012 23:14:40 +0000, Steven D'Aprano wrote:

> On Tue, 06 Nov 2012 11:51:03 -0500, GangGreene wrote:
> 
>> I have just finished a 251 line bash shell script that builds my linux
>> distro from scratch.
> 
> "From scratch"? So if you run it on bare metal with no OS, it works?

It has a host system for build/bootstraping. Then it goes onto an USB 
drive, both as the OS and installation packages (with package manager) 
capable of install on a system without an OS.  Hard drive needed ;)

> 
> But seriously -- bash is a mature, powerful shell. It works well for
> what it does. It has been designed to make it easy[1] to automate system
> admin tasks. It would be astonishing if an experienced, competent bash
> programmer couldn't write an installation tool in bash. By comparison,
> few general purpose programming languages (with the obvious exception of
> perl) are designed for system administration as their primary purpose.
> 
> But... how robust is your script? How many bugs does it contain? Chances
> are you will only use it a handful of times, on the same system. That's
> not a lot of testing to be sure that it is free of bugs, and robust
> against unexpected input.

I have used it for several years and others have used it to build their 
own systems.  I have used it on 586 to the latest multi core systems.

> 
> Hell, even widely used and distributed install scripts written by
> companies with the resources of Ubuntu and Red Hat have a distressing
> tendency to break. Or worse, to behave in unexpected ways.

I am not Redhat or Ubuntu (commercial distros stink) ;)

> 
> Unless you are some sort of bash-scripting über-geek superhero with
> powers beyond those of mortal men, chances are that your script is much
> more buggy and fragile than you imagine. How well does it recover from
> errors? 

It stops on all critical build errors and skips the package on minimal 
errors, giving me a list of skipped packages and status on them at the 
end of the build sequence (so I can fix my errors).  It will also 
download the source package if it is not present in the build directory.  
If I incur any breakage/error ( it can happen a lot ) it stops and 
notifies me.  I then fix the package build script and lather/rinse/repeat 
until I get the package build correct.  It logs all the information into 
build/testing/file listing/dependency requirements into log files.  Then 
the package goes off to a repository holding all the other packages.  The 
directory layout is like this:

build
   +--section - programming/X window etc
         +----package - python gcc coreutils and contains the
                        build script ( bash script ) and source package.

The build system ( bash scripts ) recurses this directory structure build 
the packages and placing them into

repository
     +-----base - base system packages kernel coreutils etc
     +-----extra - programming packages, xorg etc here

The package manager (written in C) then looks to the repository to 
install/update from the repository.

> Does it leave you with a broken system, half installed?

No. It builds all of the packages and then creates binary/devel packages 
to be installed a new system.  The finished packages go into a repository.
If I update a package only that package is built and placed into the 
repository so all machine can be updated by my package manager.  And yes 
the build script automatically takes care of all build dependencies as 
well as installed binary dependencies for the host installs. It will even 
build itself.

>How easily can you maintain it after three months? Will it work in the
> presence of filenames with newlines in them?

I have maintained it for 8 years, and it can and does handle file names 
with spaces, any valid *nix file name character can be used.

> 
> 
> 
> [1] For some definition of "easy". In my opinion, control structures
> like "for" and "if" in bash are hard to use, hard to read, easy to get
> wrong, give cryptic error messages when you do get them wrong, and are
> ugly. Tests are obfuscated, and as always, the fact that everything is
> text in bash means it is way harder than it needs to be to use rich,
> modern data structures.

Only from a certain points of view.  I use many for loops and no if 
statements.  There is a good alternate for if, easily understandable if 
you know C and boolean logic.  My background is in C and Delphi/Pascal 
and I didn't have problems with bash scripting.  I want to have a go at 
python.

Arch linux "pacman package management/build/delevopment system" is very 
similar to mine.  If you wish to take a look at it.  It is also mostly 
bash scripts with some C and python2/3 to boot.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:33 -0700
  Re: datetime issue Jason Friedman <jason@powerpull.net> - 2012-09-15 12:58 -0600
  Re: datetime issue Chris Rebert <clp2@rebertia.com> - 2012-09-15 12:05 -0700
    Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 12:26 -0700
      Re: datetime issue MRAB <python@mrabarnett.plus.com> - 2012-09-15 21:28 +0100
        Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 22:15 -0700
          Re: datetime issue Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-16 01:53 -0400
            Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 00:51 -0700
              Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 01:18 -0700
              Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 01:18 -0700
            Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 00:51 -0700
            Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 01:25 -0700
              Re: datetime issue Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-16 09:53 +0000
                Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 03:15 -0700
                Re: datetime issue Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-16 10:49 +0000
                Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 03:54 -0700
                Re: datetime issue Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-16 11:34 +0000
                Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 04:56 -0700
                Re: datetime issue Dave Angel <d@davea.name> - 2012-09-16 15:31 -0400
                Obnoxious postings from Google Groups (was: datetime issue) Ben Finney <ben+python@benfinney.id.au> - 2012-09-16 23:18 +1000
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 08:41 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) Joel Goldstick <joel.goldstick@gmail.com> - 2012-09-16 11:57 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 09:06 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) Joel Goldstick <joel.goldstick@gmail.com> - 2012-09-16 12:23 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-16 16:54 +0000
                Re: Obnoxious postings from Google Groups Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-16 20:26 +0100
                Re: Obnoxious postings from Google Groups (was: datetime issue) Gene Heskett <gheskett@wdtv.com> - 2012-09-16 12:32 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 09:06 -0700
                Re: Obnoxious postings from Google Groups Terry Reedy <tjreedy@udel.edu> - 2012-09-16 12:30 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-16 16:52 +0000
                Re: Obnoxious postings from Google Groups Mayuresh Kathe <mayuresh@kathe.in> - 2012-09-17 01:09 +0530
                Re: Obnoxious postings from Google Groups (was: datetime issue) Jamie Paul Griffin <jamie@kode5.net> - 2012-09-17 14:28 +0100
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 08:44 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) Chris Angelico <rosuav@gmail.com> - 2012-09-17 01:57 +1000
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 09:02 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) pandora.koura@gmail.com - 2012-09-16 09:02 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) Gene Heskett <gheskett@wdtv.com> - 2012-09-16 12:28 -0400
                Re: Obnoxious postings from Google Groups Robert Miles <robertmiles@teranews.com> - 2012-10-31 00:18 -0500
                Re: Obnoxious postings from Google Groups (was: datetime issue) alex23 <wuwei23@gmail.com> - 2012-09-16 17:47 -0700
                Re: Obnoxious postings from Google Groups (was: datetime issue) Roy Smith <roy@panix.com> - 2012-09-16 20:55 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) alex23 <wuwei23@gmail.com> - 2012-09-16 18:14 -0700
                Re: Obnoxious postings from Google Groups Robert Miles <robertmiles@teranews.com> - 2012-10-31 00:39 -0500
                Re: Obnoxious postings from Google Groups Jamie Paul Griffin <jamie@kode5.net> - 2012-11-01 09:55 +0000
                Re: Obnoxious postings from Google Groups rurpy@yahoo.com - 2012-11-01 15:08 -0700
                Re: Obnoxious postings from Google Groups Chris Angelico <rosuav@gmail.com> - 2012-11-02 10:32 +1100
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-02 01:25 +0000
                Re: Obnoxious postings from Google Groups Roy Smith <roy@panix.com> - 2012-11-01 21:42 -0400
                Re: Obnoxious postings from Google Groups "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2012-11-02 02:07 +0000
                Re: Obnoxious postings from Google Groups Grant Edwards <invalid@invalid.invalid> - 2012-11-02 14:11 +0000
                Re: Obnoxious postings from Google Groups Jamie Paul Griffin <jamie@kode5.net> - 2012-11-02 09:36 +0000
                Re: Obnoxious postings from Google Groups rurpy@yahoo.com - 2012-11-02 11:39 -0700
                Re: Obnoxious postings from Google Groups Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-03 00:06 +0000
                Re: Obnoxious postings from Google Groups Jamie Paul Griffin <jamie@kode5.net> - 2012-11-04 11:13 +0000
                Re: Obnoxious postings from Google Groups rusi <rustompmody@gmail.com> - 2012-11-04 22:10 -0800
                Re: Obnoxious postings from Google Groups Chris Angelico <rosuav@gmail.com> - 2012-11-05 17:39 +1100
                Re: Obnoxious postings from Google Groups rusi <rustompmody@gmail.com> - 2012-11-04 23:34 -0800
                Re: Obnoxious postings from Google Groups Roy Smith <roy@panix.com> - 2012-11-05 07:56 -0500
                Re: Obnoxious postings from Google Groups Chris Angelico <rosuav@gmail.com> - 2012-11-06 01:20 +1100
                Re: Obnoxious postings from Google Groups Grant Edwards <invalid@invalid.invalid> - 2012-11-05 14:59 +0000
                RE: Obnoxious postings from Google Groups "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-06 16:52 +0000
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-06 05:03 +0000
                Re: Obnoxious postings from Google Groups Roy Smith <roy@panix.com> - 2012-11-06 08:52 -0500
                Re: Obnoxious postings from Google Groups GangGreene <GangGreene@example.com> - 2012-11-06 11:51 -0500
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-06 23:14 +0000
                Re: Obnoxious postings from Google Groups GangGreene <GangGreene@example.com> - 2012-11-06 19:16 -0500
                Re: Obnoxious postings from Google Groups Grant Edwards <invalid@invalid.invalid> - 2012-11-07 15:13 +0000
                Re: Obnoxious postings from Google Groups Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2012-11-07 18:52 +1300
                Re: Obnoxious postings from Google Groups Roy Smith <roy@panix.com> - 2012-11-07 01:04 -0500
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-07 08:15 +0000
                Re: Obnoxious postings from Google Groups Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-05 11:28 -0500
                Re: Obnoxious postings from Google Groups Grant Edwards <invalid@invalid.invalid> - 2012-11-05 18:20 +0000
                Re: Obnoxious postings from Google Groups Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-05 14:47 -0500
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-06 04:46 +0000
                RE: Obnoxious postings from Google Groups "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-06 17:16 +0000
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-06 22:50 +0000
                RE: Obnoxious postings from Google Groups "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-06 23:08 +0000
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-07 00:13 +0000
                Re: Obnoxious postings from Google Groups Hans Mulder <hansmu@xs4all.nl> - 2012-11-09 12:34 +0100
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-10 06:57 +0000
                RE: Obnoxious postings from Google Groups Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-07 15:08 +0530
                Re: Obnoxious postings from Google Groups Hans Mulder <hansmu@xs4all.nl> - 2012-11-09 10:49 +0100
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-09 11:30 +0000
                Re: Obnoxious postings from Google Groups rurpy@yahoo.com - 2012-11-05 11:41 -0800
                Re: Obnoxious postings from Google Groups Virgil Stokes <vs@it.uu.se> - 2012-11-04 17:52 +0100
                Re: Obnoxious postings from Google Groups Bob Martin <bob.martin@excite.com> - 2012-11-03 07:44 +0000
                Re: Obnoxious postings from Google Groups Dave Angel <d@davea.name> - 2012-11-03 10:24 -0400
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-03 16:18 +0000
                Re: Obnoxious postings from Google Groups Chris Angelico <rosuav@gmail.com> - 2012-11-04 03:05 +1100
                Re: Obnoxious postings from Google Groups Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-02 11:42 -0600
                Re: Obnoxious postings from Google Groups Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-04 18:39 +0000
                Re: Obnoxious postings from Google Groups Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-11-09 12:02 +0100
                Re: Obnoxious postings from Google Groups Robert Miles <robertmiles@teranews.com> - 2012-09-21 00:22 -0500
                Re: Obnoxious postings from Google Groups (was: datetime issue) Grant Edwards <invalid@invalid.invalid> - 2012-09-21 15:07 +0000
                Re: Obnoxious postings from Google Groups (was: datetime issue) Walter Hurry <walterhurry@lavabit.com> - 2012-09-21 22:11 +0000
                Re: Obnoxious postings from Google Groups (was: datetime issue) Hank Gay <hank.gay+eternal.september@gmail.com> - 2012-09-21 20:51 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-22 00:13 -0400
                Re: Obnoxious postings from Google Groups (was: datetime issue) Grant Edwards <invalid@invalid.invalid> - 2012-09-23 22:25 +0000
                Re: Obnoxious postings from Google Groups Robert Miles <robertmiles@teranews.com> - 2012-10-31 00:07 -0500
                Re: Obnoxious postings from Google Groups rurpy@yahoo.com - 2012-10-31 12:32 -0700
                Re: Obnoxious postings from Google Groups Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-31 22:33 +0000
                Re: Obnoxious postings from Google Groups Arnaud Delobelle <arnodel@gmail.com> - 2012-10-31 23:58 +0000
                Re: Obnoxious postings from Google Groups Jamie Paul Griffin <jamie@kode5.net> - 2012-11-01 09:44 +0000
                Re: datetime issue Roy Smith <roy@panix.com> - 2012-09-16 09:22 -0400
                Re: datetime issue Chris Angelico <rosuav@gmail.com> - 2012-09-16 23:32 +1000
                Re: datetime issue Chris Angelico <rosuav@gmail.com> - 2012-09-17 00:10 +1000
                gc.get_objects() Matteo Boscolo <matteo.boscolo@boscolini.eu> - 2012-09-17 14:42 +0200
                Re: gc.get_objects() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-17 14:16 +0000
                Re: gc.get_objects() Chris Angelico <rosuav@gmail.com> - 2012-09-18 02:09 +1000
                Re: gc.get_objects() Matteo Boscolo <matteo.boscolo@boscolini.eu> - 2012-09-17 19:23 +0200
                Re: gc.get_objects() Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-09-17 17:43 +0000
                Re: datetime issue Grant Edwards <invalid@invalid.invalid> - 2012-10-31 15:11 +0000
                Re: datetime issue rurpy@yahoo.com - 2012-10-31 12:35 -0700
                Re: datetime issue Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-31 21:38 +0000
                Re: datetime issue Robert Miles <robertmiles@teranews.com> - 2012-10-31 19:23 -0500
                Re: datetime issue Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-01 00:36 +0000
                Re: datetime issue rurpy@yahoo.com - 2012-11-01 15:00 -0700
                Re: datetime issue Jamie Paul Griffin <jamie@kode5.net> - 2012-11-02 09:57 +0000
                Re: datetime issue rurpy@yahoo.com - 2012-11-02 11:43 -0700
                Re: datetime issue Robert Miles <robertmiles@teranews.com> - 2012-10-31 19:09 -0500
                Re: datetime issue Grant Edwards <invalid@invalid.invalid> - 2012-11-01 12:09 +0000
                Re: datetime issue rurpy@yahoo.com - 2012-11-01 15:28 -0700
              Re: datetime issue "Günther Dietrich" <gd.usenet@spamfence.net> - 2012-09-16 15:22 +0200
                Re: datetime issue pandora.koura@gmail.com - 2012-09-16 08:43 -0700
                Re: datetime issue Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-16 15:35 -0400
              Re: datetime issue MRAB <python@mrabarnett.plus.com> - 2012-09-16 16:27 +0100
                Re: datetime issue pandora.koura@gmail.com - 2012-09-16 08:40 -0700
                Re: datetime issue Chris Angelico <rosuav@gmail.com> - 2012-09-17 01:54 +1000
                Re: datetime issue Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-16 20:23 +0100
                Re: datetime issue pandora.koura@gmail.com - 2012-09-16 08:40 -0700
              Re: datetime issue Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-16 15:37 -0400
            Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-16 01:25 -0700
        Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 22:15 -0700
    Re: datetime issue Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 12:26 -0700

csiph-web