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

Re: should etch be Debian 4.0 ?



Josh Lauricha <laurichj@bioinfo.ucr.edu> writes:

> On Fri 07/08/05 21:06, Luis Matos wrote:
>> >For sarge:
>> >Mean: 138189... Its those damned 200504201-style numbers.
>> > 
>> >
>> 138189 <--- mean or total?
>> 138189/(number of packages)?
>
> That's the mean (At least according to my awk one liner...). The reason
> some its so high is because of 200504201-style versions, which skew the
> average. 
>
> Oh. damn.  No its not, its the values for the subset of packages I have
> installed... Never mind... but I'd bet its close.

My machine is a sid system which includes some packages from my own
unofficial repository, so the data below does not *exactly* describe
sid, but is pretty close.

Number of available packages:

    > grep-aptavail -P '' -s Version | wc -l
    15747

Command to extract the first or the first two, if available, numeric
components of the version number; ignoring the epoch, if any:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/'
   0.8
   0.2
   [...]
   2.12

Number of unique version numbers:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | sort | uniq | wc -l
   888

Number of packages with major version zero:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | awk '$1 < 1 { print $1 }' | wc -l
   5308

Number of packages with a version number greater than or equal to 1000
(likely to be derived from a date?):

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | awk '$1 >= 1000 { print $1 }' | wc -l
   455

Sum of version numbers:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | awk '{ s += $1 } END { printf "%.3f\n", s }'
   18125020753.136

Mean version number:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | awk '{ s += $1; ++n } END { printf "%.3f\n", s / n }'
   1151014.209

Mean version number, excluding version numbers greater than or equal to
1000:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | awk '$1 < 1000 { s += $1; ++n } END { printf "%.3f\n", s / n }'
   2.261

Median (50% quantile) version number:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | sort -n \
     | head -$(expr $(grep-aptavail -P '' -s Version | wc -l) / 2 + 1) \
     | tail -1
   1.2

10% quantile version number:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | sort -n \
     | head -$(expr $(grep-aptavail -P '' -s Version | wc -l) / 10 + 1) \
     | tail -1
   0.2

90% quantile version number:

   > grep-aptavail -P '' -s Version \
     | sed 's/^[^0-9]*\([0-9]\+:\)\?\([0-9]\+\(\.[0-9]\+\)\?\).*$/\2/' \
     | sort -n \
     | head -$(expr 9 \* $(grep-aptavail -P '' -s Version | wc -l) / 10 + 1) \
     | tail -1
   4.2

Martin



Reply to: