> From: Richard Melville <[email protected]>
> Date: Sun, 3 Sep 2017 21:19:56 +0100
>


Richard,


Your replies seem to always break the threading: could they instead
please preserve the threading.


> On 3 September 2017 at 19:42, Bruce Dubbs <[email protected]> wrote:
>
> > Richard Melville wrote:

[ - re script processing of news-page release list.]

> >
> > <dt>LFS 8.1 Release</dt>
> >>             <dt>LFS 8.1-rc2 Release</dt>
> >>             <dt>LFS 8.1-rc1 Release</dt>
> >>             <dt>LFS Stable Version 8.0 Release</dt>
> >>             <dt>LFS 8.0-rc1 Release</dt>
> >>             <dt>LFS Stable Version 7.10 Release</dt>
> >>             <dt>LFS 7.10-rc1 Release</dt>
> >>             <dt>LFS Stable Systemd Version 7.9 Release</dt>
> >>             <dt>LFS 7.9 Stable Release</dt>
> >>             <dt>LFS 7.9-rc2 Release</dt>
> >>             <dt>LFS 7.9-rc1 Release</dt>
> >>             <dt>LFS 7.8 Stable Release</dt>
> >>             <dt>LFS 7.8-rc1 Release</dt>
> >>             <dt>LFS 7.7 Stable Release</dt>
> >>             <dt>LFS 7.7-rc1 Release</dt>
> >>             <dt>LFS 7.6 Stable Release</dt>
> >>             <dt>LFS 7.6-rc1 Release</dt>
> >>
> >> Is there any chance of arriving at some consistency?  Maybe either: "LFS
> >> <version number> Stable Release" or, as the latest states: "LFS <version
> >> number> Release", for those that are not release candidates, obviously.
> >>


*IF* that release-list is being relied on and processed by a
script, then the script is better [~'be liberal in what your
code accepts as input, ...'] to just check - case-insensitively,
independently, & irrespective of order - for the regexes 'release',
'stable', & '[[:blank:]\-]?rc[0-9]*'; and do some heuristics on the
results. E.g. pseudo-code:

$

if 'release' string in dt content: -> has_rel=1 else =0 .
if 'stable' ..... -> has_stbl=1 else =0 .
if '[[:blank:]\-]?rc[0-9]*' ... -> has_rc=1 else =0 .

if has_rel==1 && has_stbl==1 && has_rc==0 then
  # is/looks-like a stable, non-rc, release.
else-if
        .
        .
else-if has_rel==1 && has_stbl==1 && has_rc==1 then
  # example error-/warning- state.
else
  # default/error catchall-combination(s).
endif.

$


A still-kludgy but slightly less-so way, would be to parse e.g.:

$ svn ls svn://svn.linuxfromscratch.org/lfs/tags/
        .
        .
7.9-systemd/
7.9-systemd-rc1/
7.9-systemd-rc2/
8.0/
8.0-rc1/
8.1/
8.1-rc1/
8.1-rc2/
lfs-bootscripts-3.2.2/
x86_64-POC/
$


> >
> > That file is edited manually.  As I said in my earlier message, I updated
> > it to include  'Stable Version'.
> >
>
> Yes, thanks for that, but if it is edited manually then why cannot the


Sounds like what is being sought is a fairly standard type of scripters'
~api interface whereby the release version, rc/stable/..., &c can be read
reliably - in a known reliable format and in a known reliable location
(uri) .


>
[...]
> >
> > You could do something like:
> >
> > $ grep 'LFS.*Release' news.html | grep -v rc | \
> > >  sed -r 's/.*([0-9].[0-9]).*/\1/'
> > 8.1
> > 8.0
> > 7.1
> > 7.9
> > 7.9
> > 7.8
> > 7.7
> > 7.6


That wouldn't detect reliably-enough when is a stable version released;
e.g. an -rcN would confound it.


> >
[...]
>



akh





--
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to