Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-pms
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-pms@g.o
From: Ciaran McCreesh <ciaran.mccreesh@...>
Subject: [PATCH] How about a \ChangeWhenAddingAnEAPI marker?
Date: Sun, 6 May 2012 16:33:53 +0100
It's easy to miss some places that have to be updated when adding a new
EAPI. This hack fixes that. It works like this:

In pms.tex, at the top, we say

    \CurrentEAPIIs{4}

Then everywhere where we have EAPI dependent content, we put

    \ChangeWhenAddingAnEAPI{4}

which we can then grep for. Also, if you change the current EAPI, and
forget to change any of the markers, an error is produced.

I've not updated everywhere that needs this yet; there's just one
example. There might be a better way of getting the same effect. If not,
I'll go through carefully and put these in before we start work on 5.
---
 dependencies.tex |    1 +
 pms.cls          |    5 +++++
 pms.tex          |    3 +++
 3 files changed, 9 insertions(+)

diff --git a/dependencies.tex b/dependencies.tex
index 0f74b3b..5f91eb5 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -76,6 +76,7 @@ be surrounded on both sides by whitespace, except at the start and end of the st
 
 In particular, note that whitespace is not optional.
 
+\ChangeWhenAddingAnEAPI{4}
 \begin{centertable}{EAPIs supporting \t{SRC\_URI} arrows} \label{tab:uri-arrows-table}
     \begin{tabular}{ l l }
         \toprule
diff --git a/pms.cls b/pms.cls
index db2fd48..a37d78a 100644
--- a/pms.cls
+++ b/pms.cls
@@ -147,6 +147,11 @@
 % margin.
 \areaset[-30mm]{400pt}{700pt}
 
+% To find everywhere that needs updating when we add an EAPI
+\newcommand{\CurrentEAPIIs}[1]{\def\TheCurrentEAPI{#1}}
+\newcommand{\ChangeWhenAddingAnEAPI}[1]{\ifthenelse{\equal{\TheCurrentEAPI}{#1}}{}{\errmessage{This
+needs to be updated for EAPI \TheCurrentEAPI}}}
+
 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
 
 %%% Local Variables:
diff --git a/pms.tex b/pms.tex
index 4ada8ec..1c9ed30 100644
--- a/pms.tex
+++ b/pms.tex
@@ -1,5 +1,8 @@
 \documentclass{pms}
 
+\CurrentEAPIIs{4}
+\ChangeWhenAddingAnEAPI{4}
+
 \begin{document}
 \maketitle
 
-- 
1.7.10.1



Replies:
Re: [PATCH] How about a \ChangeWhenAddingAnEAPI marker?
-- Ulrich Mueller
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
Next by thread:
Re: [PATCH] How about a \ChangeWhenAddingAnEAPI marker?
Previous by date:
Re: EAPI 5
Next by date:
The "Feature Availability by EAPI" table is uglier than Portage code


Updated Jul 18, 2012

Summary: Archive of the gentoo-pms mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.