From d8327ad90c55903dd75fdf12579a184a1190d27b Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 11 Nov 2011 18:41:59 +0100 Subject: [PATCH] [entropy] add triggers/ directory (old style triggers) --- .../entropy/triggers/sys-devel/gcc/trigger | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 conf/intel/entropy/triggers/sys-devel/gcc/trigger diff --git a/conf/intel/entropy/triggers/sys-devel/gcc/trigger b/conf/intel/entropy/triggers/sys-devel/gcc/trigger new file mode 100644 index 0000000..12792b9 --- /dev/null +++ b/conf/intel/entropy/triggers/sys-devel/gcc/trigger @@ -0,0 +1,23 @@ +import os +import subprocess +from entropy.const import etpConst + +def configure_correct_gcc(): + gcc_target = "4.6" + uname_arch = os.uname()[4] + gcc_dir = etpConst['systemroot'] + "/etc/env.d/gcc" + gcc_profile_file_pfx = uname_arch + "-pc-linux-gnu-" + gcc_target + gcc_profile_file = None + for curdir, subs, files in os.walk(gcc_dir): + for fname in files: + if fname.startswith(gcc_profile_file_pfx): + gcc_profile_file = fname + break + break + if gcc_profile_file is not None: + subprocess.call(("gcc-config", gcc_profile_file)) + +if stage == "postinstall": + configure_correct_gcc() + +my_ext_status = 0