[proaudio] [2384] update tree tools |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/proaudio Archives
]
Revision: 2384
Author: evermind
Date: 2013-01-03 13:06:14 +0100 (Thu, 03 Jan 2013)
Log Message:
-----------
update tree tools
Modified Paths:
--------------
trunk/overlays/proaudio/generate-detailed-packages-list
trunk/overlays/proaudio/prepare_tree
Modified: trunk/overlays/proaudio/generate-detailed-packages-list
===================================================================
--- trunk/overlays/proaudio/generate-detailed-packages-list 2013-01-03 12:06:12 UTC (rev 2383)
+++ trunk/overlays/proaudio/generate-detailed-packages-list 2013-01-03 12:06:14 UTC (rev 2384)
@@ -47,26 +47,33 @@
done
generate_list(){
- for x in `find -maxdepth 1 -type d -printf '%f\n'|sed '1d'|sort|uniq`;do
+ for x in `find -maxdepth 1 -type d -printf '%f\n'|sed '1d'|sort|uniq|egrep -v '^(profiles|licenses)$'`;do
old_pwd=$PWD
cd $x
for i in `find -maxdepth 1 -type d|sed '1d'`;do
i=${i/.\//}
- ebuilds="$(ls $i/*.ebuild)"
- if [ "$OPT_LIST_OVERLAY_ONLY" -eq 1 ] && [ -e $PORTAGE_TREE/$x/$i ];then
- continue
- fi
-
- echo "#------- $x/$i --------"
- nr_of_ebuilds="-1"
-
# reset descriptions so if one's is missing we'll see it
# in the generated list
HOMEPAGE="unknown"
DESCRIPTION="unknown"
KEYWORDS="unknown"
+ cat_ebuild_seen=""
+
+ nr_of_ebuilds="-1"
+
+ ebuilds="$(ls $i/*.ebuild)"
for k in ${ebuilds[@]};do
+
+ if [ "$OPT_LIST_OVERLAY_ONLY" -eq 1 ] && [ -e $PORTAGE_TREE/$x/$i/$k ];then
+ continue
+ fi
+
+ if [ -z "$cat_ebuild_seen" ];then
+ echo "#------- $x/$i --------"
+ cat_ebuild_seen=yes
+ fi
+
source $k &>/dev/null
k="${k##*/}"
k=${k/\.ebuild/}
Modified: trunk/overlays/proaudio/prepare_tree
===================================================================
--- trunk/overlays/proaudio/prepare_tree 2013-01-03 12:06:12 UTC (rev 2383)
+++ trunk/overlays/proaudio/prepare_tree 2013-01-03 12:06:14 UTC (rev 2384)
@@ -5,8 +5,14 @@
# and remove unneeded files
# WARNING: beta quality
-# exit script it not executed in overlay root
-if [ ! -e .svn/text-base/prepare_tree.svn-base ] ;then
+# exit script it not executed in overlay root or no git/svn tool available
+scm=""
+if git status &> /dev/null ;then
+ scm=git
+elif svn info &> /dev/null ;then
+ scm=svn
+else
+ echo "error: neither git nor svn installed -- OR"
echo "please execute this script just inside the overlay root"
exit 1
fi
@@ -14,33 +20,56 @@
# first small script
# remove digest files with no corresponding ebuild
# v0.2 with svn-support
-[ "x`type svn &>/dev/null && echo yes`" == "xyes" ] && has_svn="1" || has_svn="0"
+## UPDATE: no longer digest files there
+#[ "x`type svn &>/dev/null && echo yes`" == "xyes" ] && has_svn="1" || has_svn="0"
+#
+#for i in `find -iname 'digest*'|grep -v '.svn'`;do
+# if [ -e "$i" -a -e "${i/files\/digest-/}.ebuild" ];then
+# echo -n
+# else
+# j=${i/files\/digest-/}
+# echo "NOT EXIST:${j}.ebuild"
+# echo digest: ${i##*/}
+# [ "${has_svn}" == "1" ] && svn --force del "${i}" || rm -f "${i}"
+# [ "$?" -ne "0" ] && exit 1
+# sed -i '/files\/'${i##*/}'\ /d' ${j%/*}/Manifest
+# super="${i/files\/digest-/}.ebuild"
+# sed -i '/\ '${super##*/}'\ /d' ${j%/*}/Manifest
+# fi
+#done
-for i in `find -iname 'digest*'|grep -v '.svn'`;do
- if [ -e "$i" -a -e "${i/files\/digest-/}.ebuild" ];then
- echo -n
- else
- j=${i/files\/digest-/}
- echo "NOT EXIST:${j}.ebuild"
- echo digest: ${i##*/}
- [ "${has_svn}" == "1" ] && svn --force del "${i}" || rm -f "${i}"
- [ "$?" -ne "0" ] && exit 1
- sed -i '/files\/'${i##*/}'\ /d' ${j%/*}/Manifest
- super="${i/files\/digest-/}.ebuild"
- sed -i '/\ '${super##*/}'\ /d' ${j%/*}/Manifest
- fi
-done
-
# second small script
# remove entries of files which are listed in the Manifest-files
# but have no corresponding file
for i in `find -name 'Manifest'|grep -v '.svn'`;do
- for j in `grep SHA1 $i |awk '{print $3}'`;do
- if [ ! -e "${i%/*}/$j" ];then
- echo NOT HERE ${i%/*}/$j
- j=${j//\//\\/}
+ for j in `grep SHA1 $i |awk '{printf "%s;%s\n",$1,$2}'`;do
+ kind=${j%%;*}
+ case ${kind} in
+ AUX)
+ dir_path=files
+ ;;
+ DIST)
+ continue
+ ;;
+ EBUILD|MISC)
+ dir_path=./
+ ;;
+ *)
+ echo error unknown kind $kind
+ exit 1
+ ;;
+ esac
+
+ filename=${j##*;}
+
+ n_path="${i%/*}/$dir_path/$filename"
+ if [ ! -e "${n_path}" ];then
+ echo NOT HERE ${n_path}
+ filename=${filename//\//\\/}
echo $j
- sed -i '/\ '${j}'\ /d' ${i}
+ sed -i '/\ '${filename}'\ /d' ${i}
+ #redigest="`ls ${i%/*}/*.ebuild|head -n 1`"
+ #ebuild "$redigest" digest
fi
done
done
@@ -49,12 +78,12 @@
# redigest if a file exist that is not in Manifest file
for i in `find -name 'Manifest'|grep -v '.svn'`;do
cd ${i%/*}
- echo ${i%/*}
+ #echo ${i%/*}
for j in `find -type f |grep -v 'Manifest'|grep -v '.svn'`;do
j=${j//\.\//}
- SHA1="`sha1sum ${j}`"
- FNAME=${j}
- grep ''${SHA1}'' Manifest |grep -q ''${FNAME}''
+ SHA="`sha256sum ${j}`"
+ FNAME=${j##*/}
+ grep ''${SHA}'' Manifest |grep -q ''${FNAME}''
if [ "$?" == "1" ];then
pkz="`ls -t *.ebuild|head -n1`"
echo "ebuild ${pkz} digest"
@@ -68,7 +97,7 @@
# fourth small script
# digest if no Manifest file exists
# v0.2 with svn-support
-[ "x`type svn &>/dev/null && echo yes`" == "xyes" ] && has_svn="svn add Manifest" || has_svn=""
+[ -n "$scm" ] && scm_tool="$scm add Manifest" || $scm_tool=""
smart="0"
for i in `find -name '*.ebuild'|grep -v '.svn'`;do
@@ -79,7 +108,7 @@
pkz="`ls -t *.ebuild|head -n1`"
echo "ebuild ${pkz} digest"
ebuild ${pkz} digest
- $has_svn
+ $scm_tool
fi
cd - &>/dev/null
else