X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions;h=53747fd616c9bea2f1d4ff3c8579846e664cdea1;hb=69ac3e7cf686f8e95e47a7ab89bc38796aace488;hp=9a6496f762cf4257379947ae6963303c297fecf9;hpb=f41e274186ffbed8f6bdc4d44da23758c83f1bb9;p=hvlinux.git diff --git a/functions b/functions index 9a6496f..53747fd 100644 --- a/functions +++ b/functions @@ -130,8 +130,10 @@ get_pkg_name() return 1 fi - # \1 matches anything followed by a dash and a number - echo ${1} | sed "s!^\(.*\)-[0-9].*!\1!g" + # SED do not support non-greedy regexp: + # We want to match any characters preceeding a dash followed by a number + # (shortest match -> non-greedy) + echo ${1} | sed "s!\([^-][^0-9]*\)-[0-9].*!\1!" } # Saves the content of CFLAGS and CXXFLAGS environment variables. @@ -726,12 +728,6 @@ ipkg() exit ${EXIT_FAILURE} fi - # Checking if there is a corresponding config.cache file - local cache_file=$(pwd)/config.cache.$(get_pkg_name ${PACKAGE_NAME}) - if [ -f ${cache_file} ]; then - CONFIGURE_OPTS="${CONFIGURE_OPTS} --cache-file=${cache_file}" - fi - PACKAGE_LOG=${LFS_LOG_DIR}/${LABEL}.log # Checking if package was previously successfully installed