Anpassung an Archive Format Verbesserungen...zur Performance Optimierung von
installpkg git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@4896 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
02287496f4
commit
4b02ce9825
@ -95,7 +95,7 @@ mk() {
|
|||||||
cd gpplib
|
cd gpplib
|
||||||
tar -jxvf $DISTTARGET/Base/Development/gcc-[0-9]*.tbz
|
tar -jxvf $DISTTARGET/Base/Development/gcc-[0-9]*.tbz
|
||||||
tar -xvf bin.tar
|
tar -xvf bin.tar
|
||||||
rm {bin,man,dev}.{tar,md5,frg,drg}
|
rm {bin,man,dev}.{tar,cont,drg}
|
||||||
rm -r usr/bin usr/include usr/info usr/man usr/share
|
rm -r usr/bin usr/include usr/info usr/man usr/share
|
||||||
if [ "$MK64BIT" == "true" ]; then
|
if [ "$MK64BIT" == "true" ]; then
|
||||||
rm -r usr/lib64/gcc
|
rm -r usr/lib64/gcc
|
||||||
|
@ -107,7 +107,7 @@ if [ ! -d $TMPROOT/../$$ ]; then
|
|||||||
mkdir -p $TMPROOT/../$$
|
mkdir -p $TMPROOT/../$$
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ARCHCONTENTS="bin.drg bin.frg bin.md5 bin.tar dev.drg dev.frg dev.md5 dev.tar man.drg man.frg man.md5 man.tar"
|
ARCHCONTENTS="bin.drg bin.cont bin.tar dev.drg dev.cont dev.tar man.drg man.cont man.tar"
|
||||||
DEPFILE=$TMPROOT/../$$/dep
|
DEPFILE=$TMPROOT/../$$/dep
|
||||||
METAFILE=$TMPROOT/../$$/meta
|
METAFILE=$TMPROOT/../$$/meta
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ if [ -f $METAFILE ]; then
|
|||||||
else
|
else
|
||||||
LINE=$LINE"0 "
|
LINE=$LINE"0 "
|
||||||
fi
|
fi
|
||||||
for i in *.frg *.drg *.md5; do
|
for i in *.cont *.drg *.md5; do
|
||||||
bzip2 $i
|
bzip2 $i
|
||||||
mv $i.bz2 $i
|
mv $i.bz2 $i
|
||||||
done
|
done
|
||||||
|
@ -342,7 +342,7 @@ GenDependics() {
|
|||||||
if [ -f /tmp/lddlist$$ ]; then
|
if [ -f /tmp/lddlist$$ ]; then
|
||||||
rm /tmp/lddlist$$
|
rm /tmp/lddlist$$
|
||||||
fi
|
fi
|
||||||
for execfile in `find -type f ! -type l -perm -u+rx,g+rx`; do
|
for execfile in `find $PKGROOT -type f ! -type l -perm -u+rx,g+rx`; do
|
||||||
if file $execfile |grep "LSB executable" &>/dev/null; then
|
if file $execfile |grep "LSB executable" &>/dev/null; then
|
||||||
ldd $execfile|\
|
ldd $execfile|\
|
||||||
sed -e "/not a dynamic/d"|\
|
sed -e "/not a dynamic/d"|\
|
||||||
@ -541,8 +541,12 @@ Asc2Oct() {
|
|||||||
|
|
||||||
MakeMgtFiles() {
|
MakeMgtFiles() {
|
||||||
FilePrefix=$1
|
FilePrefix=$1
|
||||||
find . -type f ! -type l -exec md5sum {} \;|\
|
PKGNAME=`echo $PKGNAME|sed -e "s/\.vpg$//"`
|
||||||
sed -e "s/\.\//\//" >$TMPROOT/../$$/$FilePrefix.md5
|
if [ "$SHORTNAME" ]; then
|
||||||
|
SHNAME=$SHORTNAME
|
||||||
|
else
|
||||||
|
SHNAME=`basename $MODULENAME`
|
||||||
|
fi
|
||||||
find . -type d -ls|\
|
find . -type d -ls|\
|
||||||
awk '{ if ( $11 != "." ) print $3,$5,$6,$11 }' |\
|
awk '{ if ( $11 != "." ) print $3,$5,$6,$11 }' |\
|
||||||
sed -e "s/\.\//\//" >/tmp/DirRight$$.$FilePrefix
|
sed -e "s/\.\//\//" >/tmp/DirRight$$.$FilePrefix
|
||||||
@ -551,19 +555,48 @@ MakeMgtFiles() {
|
|||||||
echo "$NAME `GetFlags $RIGHTS` $USERID $GROUPID"
|
echo "$NAME `GetFlags $RIGHTS` $USERID $GROUPID"
|
||||||
done >$TMPROOT/../$$/$FilePrefix.drg
|
done >$TMPROOT/../$$/$FilePrefix.drg
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
find . -type f -ls|\
|
find . ! -type d -ls|\
|
||||||
awk '{ print $3,$5,$6,$11 }' |\
|
awk '{ print $3,$5,$6,$11 }'|\
|
||||||
sed -e "s/\.\//\//" >/tmp/FileRight$$.$FilePrefix
|
sed -e "s/\.\//\//" >/tmp/FileList$$
|
||||||
find . -type l -ls|\
|
exec 3</tmp/FileList$$
|
||||||
awk '{ print $3,$5,$6,$11 }' |\
|
|
||||||
sed -e "s/\.\//\//" >>/tmp/FileRight$$.$FilePrefix
|
|
||||||
exec 3</tmp/FileRight$$.$FilePrefix
|
|
||||||
while read <&3 RIGHTS USERID GROUPID NAME; do
|
while read <&3 RIGHTS USERID GROUPID NAME; do
|
||||||
echo "$NAME `echo $RIGHTS|cut -c1` `GetFlags $RIGHTS` $USERID $GROUPID"
|
TYPE=`echo $RIGHTS|cut -c1`
|
||||||
done >$TMPROOT/../$$/$FilePrefix.frg
|
RIGHT=`echo $RIGHTS|GetFlags $RIGHTS`
|
||||||
|
if [ -f .$NAME ] && [ ! -h .$NAME ]; then
|
||||||
|
MDSUM=`md5sum .$NAME|cut -d" " -f1`
|
||||||
|
else
|
||||||
|
MDSUM=""
|
||||||
|
fi
|
||||||
|
case $TYPE in
|
||||||
|
"-")
|
||||||
|
TYPE="File"
|
||||||
|
;;
|
||||||
|
"l")
|
||||||
|
TYPE="Link"
|
||||||
|
;;
|
||||||
|
"d")
|
||||||
|
TYPE="Dir"
|
||||||
|
;;
|
||||||
|
"s")
|
||||||
|
TYPE="Socket"
|
||||||
|
;;
|
||||||
|
"c")
|
||||||
|
TYPE="DeviceC"
|
||||||
|
;;
|
||||||
|
"b")
|
||||||
|
TYPE="DeviceB"
|
||||||
|
;;
|
||||||
|
"p")
|
||||||
|
TYPE="Pipe"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
TYPE="Unknown"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "PN=$SHNAME;FN=$NAME;FT=$TYPE;FR=$RIGHT;FO=$OWNER;FS=$MDSUM;PK=$PKGNAME"
|
||||||
|
done >$TMPROOT/../$$/$FilePrefix.cont
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
rm /tmp/DirRight$$.$FilePrefix
|
rm /tmp/FileList$$
|
||||||
rm /tmp/FileRight$$.$FilePrefix
|
|
||||||
}
|
}
|
||||||
|
|
||||||
X11R7_Fix() {
|
X11R7_Fix() {
|
||||||
@ -657,7 +690,7 @@ DispatchCMD() {
|
|||||||
EndDispatch() {
|
EndDispatch() {
|
||||||
NUMCMD=1
|
NUMCMD=1
|
||||||
EXECPROCNUM=$NUMCPU
|
EXECPROCNUM=$NUMCPU
|
||||||
while [ ${NUMCMD} -le $EXECPROCNUM ]; do
|
while [ "${NUMCMD}" -le "$EXECPROCNUM" ]; do
|
||||||
cat >${CMDF[${NUMCMD}]} <<EOF
|
cat >${CMDF[${NUMCMD}]} <<EOF
|
||||||
|
|
||||||
wshutdown
|
wshutdown
|
||||||
@ -717,38 +750,29 @@ extractfile() {
|
|||||||
bin.drg)
|
bin.drg)
|
||||||
LINE=`echo $LINE|cut -d" " -f 3-`
|
LINE=`echo $LINE|cut -d" " -f 3-`
|
||||||
;;
|
;;
|
||||||
bin.frg)
|
bin.cont)
|
||||||
LINE=`echo $LINE|cut -d" " -f 4-`
|
LINE=`echo $LINE|cut -d" " -f 4-`
|
||||||
;;
|
;;
|
||||||
bin.md5)
|
bin.tar)
|
||||||
LINE=`echo $LINE|cut -d" " -f 5-`
|
LINE=`echo $LINE|cut -d" " -f 5-`
|
||||||
;;
|
;;
|
||||||
bin.tar)
|
dev.drg)
|
||||||
LINE=`echo $LINE|cut -d" " -f 6-`
|
LINE=`echo $LINE|cut -d" " -f 6-`
|
||||||
;;
|
;;
|
||||||
dev.drg)
|
dev.cont)
|
||||||
LINE=`echo $LINE|cut -d" " -f 7-`
|
LINE=`echo $LINE|cut -d" " -f 7-`
|
||||||
;;
|
;;
|
||||||
dev.frg)
|
dev.tar)
|
||||||
LINE=`echo $LINE|cut -d" " -f 8-`
|
LINE=`echo $LINE|cut -d" " -f 8-`
|
||||||
;;
|
;;
|
||||||
dev.md5)
|
man.drg)
|
||||||
LINE=`echo $LINE|cut -d" " -f 9-`
|
LINE=`echo $LINE|cut -d" " -f 9-`
|
||||||
;;
|
;;
|
||||||
dev.tar)
|
man.cont)
|
||||||
LINE=`echo $LINE|cut -d" " -f 10-`
|
LINE=`echo $LINE|cut -d" " -f 10-`
|
||||||
;;
|
;;
|
||||||
man.drg)
|
|
||||||
LINE=`echo $LINE|cut -d" " -f 11-`
|
|
||||||
;;
|
|
||||||
man.frg)
|
|
||||||
LINE=`echo $LINE|cut -d" " -f 12-`
|
|
||||||
;;
|
|
||||||
man.md5)
|
|
||||||
LINE=`echo $LINE|cut -d" " -f 13-`
|
|
||||||
;;
|
|
||||||
man.tar)
|
man.tar)
|
||||||
LINE=`echo $LINE|cut -d" " -f 14-`
|
LINE=`echo $LINE|cut -d" " -f 11-`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
BEGSIZE=0
|
BEGSIZE=0
|
||||||
|
25
genpkg
25
genpkg
@ -164,8 +164,6 @@ pkggen() {
|
|||||||
else
|
else
|
||||||
PKGNAME=`ArchiveName $LFSSOURCE/$SRCPATH/$PROGNAME$PATTERN*.t*`
|
PKGNAME=`ArchiveName $LFSSOURCE/$SRCPATH/$PROGNAME$PATTERN*.t*`
|
||||||
fi
|
fi
|
||||||
DEVPKGNAME=`echo $PKGNAME|sed -e "s/\.tbz$/\.dev\.tbz/"`
|
|
||||||
MANPKGNAME=`echo $PKGNAME|sed -e "s/\.tbz$/\.man\.tbz/"`
|
|
||||||
|
|
||||||
(( CHECKFLAG = $MKPKG & 5 ))
|
(( CHECKFLAG = $MKPKG & 5 ))
|
||||||
if [ "$CHECKFLAG" == "0" ]; then
|
if [ "$CHECKFLAG" == "0" ]; then
|
||||||
@ -370,7 +368,7 @@ pkggen() {
|
|||||||
EndDispatch
|
EndDispatch
|
||||||
sync
|
sync
|
||||||
cd $TMPROOT/../$$
|
cd $TMPROOT/../$$
|
||||||
for i in bin.frg bin.drg bin.md5 man.frg man.drg man.md5 dev.frg dev.drg dev.md5; do
|
for i in bin.cont bin.drg man.cont man.drg dev.cont dev.drg ; do
|
||||||
if [ -f $i ]; then
|
if [ -f $i ]; then
|
||||||
cd $TMPROOT/../$$
|
cd $TMPROOT/../$$
|
||||||
bzip2 $i
|
bzip2 $i
|
||||||
@ -417,7 +415,7 @@ pkggen() {
|
|||||||
-e "/^$/d" >>$METAFILE
|
-e "/^$/d" >>$METAFILE
|
||||||
bzip2 -9 $METAFILE
|
bzip2 -9 $METAFILE
|
||||||
mv $METAFILE.bz2 $METAFILE
|
mv $METAFILE.bz2 $METAFILE
|
||||||
ARCHCONTENTS="bin.drg bin.frg bin.md5 bin.tar dev.drg dev.frg dev.md5 dev.tar man.drg man.frg man.md5 man.tar"
|
ARCHCONTENTS="bin.drg bin.cont bin.tar dev.drg dev.cont dev.tar man.drg man.cont man.tar"
|
||||||
cd $TMPROOT/../$$
|
cd $TMPROOT/../$$
|
||||||
if [ -f dep ]; then
|
if [ -f dep ]; then
|
||||||
LINE="`wc -c dep|awk '{print $1}'` "
|
LINE="`wc -c dep|awk '{print $1}'` "
|
||||||
@ -513,26 +511,11 @@ pkggen() {
|
|||||||
SHNAME=$PKGNAME
|
SHNAME=$PKGNAME
|
||||||
fi
|
fi
|
||||||
for k in bin dev man; do
|
for k in bin dev man; do
|
||||||
extractfile $DISTTARGET/$SRCPATH/$PKGNAME.vpg $k.frg >/tmp/$k.frg$$
|
extractfile $DISTTARGET/$SRCPATH/$PKGNAME.vpg $k.cont >>/var/install/contents
|
||||||
extractfile $DISTTARGET/$SRCPATH/$PKGNAME.vpg $k.md5 >/tmp/$k.md5$$
|
|
||||||
if [ "`wc -c /tmp/$k.frg$$|awk '{print $1}'`" -gt "0" ]; then
|
|
||||||
exec 5</tmp/$k.frg$$
|
|
||||||
while read <&5 FILE TYP RIGHT OWNER GROUP; do
|
|
||||||
if [ `fgrep $FILE /tmp/$k.md5$$|wc -l` -gt 1 ]; then
|
|
||||||
MD5SUM=`grep ${FILE}$ /tmp/$k.md5$$|awk '{print $1}'`
|
|
||||||
else
|
|
||||||
MD5SUM=`fgrep ${FILE} /tmp/$k.md5$$|awk '{print $1}'`
|
|
||||||
fi
|
|
||||||
echo "PN=$SHNAME;FN=$FILE;FT=$TYP;FR=$RIGHT;FO=$OWNER;FG=$GROUP;FS=$MD5SUM;PK=$PKGNAME" >>/var/install/contents
|
|
||||||
done
|
|
||||||
exec 5<&-
|
|
||||||
rm /tmp/$k.frg$$
|
|
||||||
rm /tmp/$k.md5$$
|
|
||||||
extractfile $DISTTARGET/$SRCPATH/$PKGNAME.vpg $k.drg >/var/install/$PKGNAME/$k/DirRights
|
extractfile $DISTTARGET/$SRCPATH/$PKGNAME.vpg $k.drg >/var/install/$PKGNAME/$k/DirRights
|
||||||
if [ "`wc -c /var/install/$PKGNAME/$k/DirRights|awk '{print $1}'`" == "0" ]; then
|
if [ "`wc -c /var/install/$PKGNAME/$k/DirRights|awk '{print $1}'`" == "0" ]; then
|
||||||
rm /var/install/$PKGNAME/$k/DirRights
|
rm /var/install/$PKGNAME/$k/DirRights
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
if [ -f /tmp/postinstall ]; then
|
if [ -f /tmp/postinstall ]; then
|
||||||
source /tmp/postinstall
|
source /tmp/postinstall
|
||||||
@ -755,8 +738,6 @@ if [ ! "$C_FLAG" == "0" ]; then
|
|||||||
else
|
else
|
||||||
PKGNAME=`ArchiveName $LFSSOURCE/$SRCPATH/$PROGNAME$PATTERN*.t*`
|
PKGNAME=`ArchiveName $LFSSOURCE/$SRCPATH/$PROGNAME$PATTERN*.t*`
|
||||||
fi
|
fi
|
||||||
DEVPKGNAME=`echo $PKGNAME|sed -e "s/\.tbz$/\.dev\.tbz/"`
|
|
||||||
MANPKGNAME=`echo $PKGNAME|sed -e "s/\.tbz$/\.man\.tbz/"`
|
|
||||||
if [ "$DEINSTALL" == "1" ]; then
|
if [ "$DEINSTALL" == "1" ]; then
|
||||||
RMTMPFILE=`basename $MODULE`
|
RMTMPFILE=`basename $MODULE`
|
||||||
RMFILE=`echo $RMTMPFILE |\
|
RMFILE=`echo $RMTMPFILE |\
|
||||||
|
Loading…
Reference in New Issue
Block a user