From: genone Date: Fri, 17 Feb 2006 01:32:41 +0000 (-0000) Subject: fixing bug 95432 X-Git-Tag: gentoolkit-0.2.4.3~232 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f3dd352bd8e5fe1ab5dd2debf5e8d97e6ccc2de;p=gentoolkit.git fixing bug 95432 svn path=/; revision=281 --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index bcac6c2..c74fc7d 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2006-02-16 Marius Mauch + * euse: add/remove use flags even if there is no USE= statement in make.conf + (bug #95432) + 2006-02-16 Marius Mauch * glsa-check: Fix bug causing the wrong summary to be displayed for --test --verbose (bug #123084) diff --git a/trunk/src/euse/euse b/trunk/src/euse/euse index d34c7e4..299ba18 100755 --- a/trunk/src/euse/euse +++ b/trunk/src/euse/euse @@ -387,6 +387,7 @@ modify() { # on our own here. Basically just skip everything between USE=" and the # closing ", printing our new USE line there instead. inuse=0 + had_use=0 (while read -r line; do [ "${line:0:4}" == "USE=" ] && inuse=1 [ "${inuse}" == "0" ] && echo -E "${line}" @@ -395,8 +396,14 @@ modify() { echo -ne "${NEW_MAKE_CONF_USE_2%% }" echo '"' inuse=0 + had_use=1 fi - done ) < "${MAKE_CONF_BACKUP_PATH}" | sed -e 's:\\ $:\\:' > "${MAKE_CONF_PATH}" + done + if [ ${haduse} -eq 0 ]; then + echo -n 'USE="' + echo -ne "${NEW_MAKE_CONF_USE_2%% }" + echo '"' + fi ) < "${MAKE_CONF_BACKUP_PATH}" | sed -e 's:\\ $:\\:' > "${MAKE_CONF_PATH}" echo "${MAKE_CONF_PATH} was modified, a backup copy has been placed at ${MAKE_CONF_BACKUP_PATH}" }