Permalink
Browse files

Make emerge options configurable via emergeopts

  • Loading branch information...
1 parent 729fe88 commit 4b27eba8d98eebf66c0fc3dcbc9e87edf7b3d655 @tom111 committed Oct 15, 2012
Showing with 12 additions and 5 deletions.
  1. +4 −0 manual.org
  2. +1 −0 tatt/dot-tatt-spec
  3. +3 −1 tatt/scriptwriter.py
  4. +3 −3 templates/revdep-snippet
  5. +1 −1 templates/use-snippet
View
@@ -95,3 +95,7 @@ The specification of the configuration file can be found in dot-tatt-spec which
# match this string. Use it as a safety measure against creating tatt-scripts
# in random places of you filesystem
# safedir=string(default="")
+
+# All emerge runs in the generated scripts are automatically passed
+# the -1 option. Here you can specify additional options.
+# emergeopts="-v"
View
@@ -5,6 +5,7 @@ template-dir=string(default="/usr/share/tatt/templates/")
unmaskfile=string(default="/etc/portage/package.keywords/archtest")
arch=string(default="x86")
defaultopts=string(default="")
+emergeopts=string(default="")
rdeps=integer(0,50,default=10)
usecombis=integer(0,64,default=12)
repodir=string(default="")
View
@@ -19,13 +19,14 @@ def useCombiTestString(pack, config):
s = "" # This will contain the resulting string
usesnippet = usesnippetfile.read()
usesnippet = usesnippet.replace("@@CPV@@", pack.packageString() )
+ usesnippet = usesnippet.replace("@@EMERGEOPTS@@", config['emergeopts'])
usecombis = findUseFlagCombis (pack, config)
for uc in usecombis:
localsnippet = usesnippet.replace("@@USE@@", uc)
localsnippet = localsnippet.replace("@@FEATURES@@", "")
s = s + localsnippet
# In the end we test once with tests and users flags
- localsnippet = usesnippet.replace("@@USE@@", " ")
+ localsnippet = usesnippet.replace("@@USE@@", "")
localsnippet = localsnippet.replace("@@FEATURES@@", "FEATURES=\"${FEATURES} test\"")
s = s + localsnippet
return s
@@ -65,6 +66,7 @@ def rdepTestString(rdep, config):
ustring = ustring + " ".join(["-" + st[1:] for st in rdep[1] if st[0] == "!"]) + "\'"
snip = snip.replace("@@USE@@", ustring)
snip = snip.replace("@@CPV@@", rdep[0] )
+ snip = snip.replace("@@EMERGEOPTS@@", config['emergeopts'])
return snip
def writerdepscript(job, config):
View
@@ -1,4 +1,4 @@
-if @@FEATURES@@ @@USE@@ emerge -1v @@CPV@@; then
-echo "@@FEATURES@@ @@USE@@ emerge -1v @@CPV@@ succeeded" >> @@REPORTFILE@@;
-else echo "@@FEATURES@@ @@USE@@ emerge -1v @@CPV@@ failed" >> @@REPORTFILE@@;
+if @@FEATURES@@ @@USE@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@; then
+echo "@@FEATURES@@ @@USE@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ succeeded" >> @@REPORTFILE@@;
+else echo "@@FEATURES@@ @@USE@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ failed" >> @@REPORTFILE@@;
fi;
View
@@ -1,4 +1,4 @@
-if @@USE@@ @@FEATURES@@ emerge -1v @@CPV@@ ; then
+if @@USE@@ @@FEATURES@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ ; then
echo "@@USE@@ @@FEATURES@@ succeeded for @@CPV@@" >> @@REPORTFILE@@;
else echo "@@USE@@ @@FEATURES@@ failed for @@CPV@@" >> @@REPORTFILE@@;
fi;

0 comments on commit 4b27eba

Please sign in to comment.