Changeset 1441


Ignore:
Timestamp:
May 17, 2007, 1:37:58 AM (12 years ago)
Author:
bruno
Message:

pkg2ftp now creates yum and urpmi repositories for the respective rpm based distros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.4/tools/pkg2ftp

    r1393 r1441  
    7373done
    7474
    75 rm -rf $MONDOTMP
    7675echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
    7776ssh -q ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver} ; cd ${DSTDIR}/${ddir}/${dver} ; rm -f ${pkg} ${spkg}"
    7877scp -p ${pkg} ${spkg} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
     78if [  _"$dtype" = _"rpm" ]; then
     79    if [ _"$ddir" = _"mandriva" ] || [ _"$ddir" = _"mandrake" ]; then
     80        cat > $MONDOTMP/addmedia << EOF
     81urpmi.addmedia mondorescue ftp://ftp.mondorescue.org/$ddir/$dver with hdlist.cz
     82EOF
     83        chmod 755 $MONDOTMP/addmedia
     84        scp -p $MONDOTMP/addmedia ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
     85        # Build a urpmi repository
     86        ssh -q ${ACCOUNT} "cd ${DSTDIR}/${ddir}/${dver} ; genhdlist ."
     87    else
     88        cat > $MONDOTMP/${ddir}-mondo.repo << EOF
     89[mondorescue]
     90name=$ddir $dver - MondoRescue Vanilla Packages
     91baseurl=ftp://ftp.mondorescue.org/$ddir/$dver
     92enabled=1
     93gpgcheck=0
     94EOF
     95        scp -p $MONDOTMP/${ddir}-mondo.repo ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
     96        # Build a yum repository
     97        ssh -q ${ACCOUNT} "cd ${DSTDIR}/${ddir}/${dver} ; yum-arch . ; createrepo ."
     98    fi
     99fi
     100rm -rf $MONDOTMP
    79101) 2>&1 | tee /tmp/pkg2ftp.log
Note: See TracChangeset for help on using the changeset viewer.