Bugzilla – Attachment 59033 Details for
Bug 133486
drpmsync does delete the whole tree in error case
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
alternative drpmsync client
mydrpmsync (text/plain), 2.54 KB, created by
Forgotten User OS1JNCFbCX
on 2005-11-29 20:40:41 UTC
(
hide
)
Description:
alternative drpmsync client
Filename:
MIME Type:
Creator:
Forgotten User OS1JNCFbCX
Created:
2005-11-29 20:40:41 UTC
Size:
2.54 KB
patch
obsolete
>#!/bin/bash > >PREFIX=/pub/factory >DELTADIR=$PREFIX/drpmsync/deltas >RSYNC="rsync -avHS --timeout=300 --delete-after ftp4.gwdg.de::pub/opensuse/distribution/SL-OSS-factory" > >WIPDIR=$PREFIX/drpmsync/wip/$0.$$ >mkdir -p $PREFIX/drpmsync/wip > >rm -f $WIPDIR.contents >wget http://drpmsync.opensuse.org:8888/Factory/drpmsync/contents -O $WIPDIR.contents >#cp contents $WIPDIR.contents > >sed -e 's/%2B/+/g' $WIPDIR.contents | sort -k 2.6 | while read DSTFILE ATTR FULLHASH C NAMEARCH; do > echo -n "$DSTFILE ..." > mkdir -p $(dirname $PREFIX/$DSTFILE) > WANTED=${FULLHASH/????????????????????????????????} > if [ "$WANTED" ]; then > NAME=${NAMEARCH/.*} > ARCH=${NAMEARCH/*.} > > rm -f $WIPDIR.list > touch $WIPDIR.list > HAVE=$( > for i in $PREFIX/inst-source/suse/$ARCH/$NAME-*-*.$ARCH.rpm; do > echo $(rpm -qp --qf '%{sigmd5}\n' $i) $i >> $WIPDIR.list > done > ) > > if grep -q '^'$WANTED $WIPDIR.list; then > LIST=$(grep '^'$WANTED $WIPDIR.list | head -n 1) > cp -al $(echo $LIST | sed -e 's/[0-9a-z]\{32\} \([^,]*\).*/\1/;s/,/ /g') $PREFIX/$DSTFILE > echo " have already" > else > echo " fetching" > echo " fetching patches ..." > $RSYNC/drpmsync/deltas/$NAME.$ARCH/ $DELTADIR/$NAME.$ARCH/ | \ > sed -ne 's/^/ /;s/\([0-9a-f]\{32\}\)\([0-9a-f]\{32\}\)\([0-9a-f]\{32\}\)/\1 \2 \3/p' > ls $DELTADIR/$NAME.$ARCH | \ > sed -e 's/\([0-9a-z]\{32\}\)\([0-9a-z]\{32\}\)\([0-9a-z]\{32\}\)/\1 \2 \3/' > $WIPDIR.trans > while grep -q '^' $WIPDIR.list && if grep -q '^'$WANTED $WIPDIR.list; then false; else true; fi; do > join -o 2.3,1.2,2.1,2.2,2.3 <(sort $WIPDIR.list) <(sort -k 1 $WIPDIR.trans) | \ > sed -e 's|\(.*\) \([0-9a-z]\{32\}\) \([0-9a-z]\{32\}\) \([0-9a-z]\{32\}\)|\1,'"$DELTADIR/$NAME.$ARCH/"'\2\3\4|' > \ > $WIPDIR.list.new > mv $WIPDIR.list.new $WIPDIR.list > done > > if grep -q '^'$WANTED $WIPDIR.list; then > echo -n " applying patches ..." > LIST=$(grep '^'$WANTED $WIPDIR.list | head -n 1) > combinedeltarpm $(echo $LIST | sed -e 's/[0-9a-z]\{32\} [^,]*,//;s/,/ /g') $WIPDIR.delta > applydeltarpm -r $(echo $LIST | sed -e 's/[0-9a-z]\{32\} \([^,]*\).*/\1/;s/,/ /g') $WIPDIR.delta $WIPDIR.rpm > mv $WIPDIR.rpm $PREFIX/$DSTFILE > else > echo -n " fetching full package ..." > $RSYNC/$DSTFILE -q $PREFIX/$DSTFILE > fi > echo " done" > fi > else > echo " skipping" > #if [ "$FULLHASH" -a "$FULLHASH" != "$(md5sum $PREFIX/$DSTFILE | head -c 32)" ]; then > # $RSYNC/$DSTFILE $PREFIX/$DSTFILE > #fi > fi > touch -d "$(date -u -d "1970-01-01 $((0x${ATTR/????})) seconds" +"%Y-%m-%d %T %z")" $PREFIX/$DSTFILE > ls -ld $PREFIX/$DSTFILE >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 133486
: 59033