[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

d-l and filtering apt output



On Thu, Aug 30, 2007 at 04:43:33PM -0400, Justin Pryzby wrote:

> If there's no iso generated, it's probably due to some error.  Did you
> look through the output for something unexpected?  I use something
> like the following:
> 
> time sudo nice lh_build 2>&1 |tee binary.log
> [...]
> 
> <./binary.log grep -vwe '^P: Retrieving' -e '^P: Validating' \

> Daniel: lh_build should also reject or otherwise handle extra
> arguments (like lh_clean bug).
> 
> BTW, why not run eg aptitude, wget, ... and everthing else with some
> incarnation of --quiet?  Or add an option to pass such an option to
> all the tools.
It appears that none of the apt tools or dpkg are capable of being
really quiet.  I still think it would be good to minimize the number
of apt calls, for efficiency and also reducing output verbage.  If
aptitude is used, later removing these packages will also remove the
(reportedly more numerous) dependencies.  But I think leaving them in
place makes sense at least as often as not.

Anyway cdebootstrap implements its own filter on expected output kinds
of dpkg messages classifying them as "info" and ignoring them if
--quiet is given.

In combination with my d-l --quiet patches, I'm now using the
following filter, which reduces the output for even a large image by a
factor of 10 to a few hundred lines, all of which IMO *shouldn't* be
further filtered *except* some 10s of lines of mksquashfs output,
which there seems to be no nice way of silencing.

<./binary.log grep -vwe '^P: Retrieving' -e '^P: Validating' \
-e '^P: Extracting' -e '^P: Unpacking' -e '^P: Configuring' \
-e '^Reading' -e '^Building' -e '^Initializing' -e '^Writing' \
-e '^Get' -e '^Fetched' -e '^Selecting' -e '^(Reading' \
-e '^Unpacking' -e '^Setting' -e '^Need' -e '^Removing' -e '^$' \
-e '^Creating config file' |
sed -re '/^The following( [^ ]*)? packages/,/^[0-9]+ packages upgraded/d' |
less



Reply to: