Hi.

The problematic part looks to be the removal of the control_rancid.in.orig 
file. As this file isn't used anywhere (AFAIK), I simply removed the creation 
of it from the patch. This resolved the bug:

pe...@mgmt:~/dev$ rm -rf rancid-2.3.2/

pe...@mgmt:~/dev$ tar xf rancid_2.3.2.orig.tar.gz

pe...@mgmt:~/dev$ zcat rancid_2.3.2-1.diff.gz | patch -p0
patching file rancid-2.3.2/debian/README.Debian
<snip/>
patching file rancid-2.3.2/debian/po/sv.po
patching file rancid-2.3.2/debian/po/templates.pot

pe...@mgmt:~/dev$ cd rancid-2.3.2/debian/patches/

pe...@mgmt:~/dev/rancid-2.3.2/debian/patches$ cp ~/dev/09_svn_fixed.dpatch .

pe...@mgmt:~/dev/rancid-2.3.2/debian/patches$ vi 00list

pe...@mgmt:~/dev/rancid-2.3.2/debian/patches$ cat 00list
01_rancid_par.dpatch
02_man_hyphen.dpatch
03_diffstat.dpatch
04_pixlogin.dpatch
05_man_fixup.dpatch
06_tmp_security.dpatch
07_nrancid_bs_paging.dpatch
08_hlogin_paging.dpatch
09_svn_fixed.dpatch

pe...@mgmt:~/dev/rancid-2.3.2/debian/patches$ cd ../..

pe...@mgmt:~/dev/rancid-2.3.2$ chmod +x debian/rules

pe...@mgmt:~/dev/rancid-2.3.2$ fakeroot debian/rules
test -d debian/patched || install -d debian/patched
dpatch  apply-all
applying patch 01_rancid_par to ./ ... ok.
applying patch 02_man_hyphen to ./ ... ok.
applying patch 03_diffstat to ./ ... ok.
applying patch 04_pixlogin to ./ ... ok.
applying patch 05_man_fixup to ./ ... ok.
applying patch 06_tmp_security to ./ ... ok.
applying patch 07_nrancid_bs_paging to ./ ... ok.
applying patch 08_hlogin_paging to ./ ... ok.
applying patch 09_svn_fixed to ./ ... ok.
dpatch  cat-all  >>patch-stampT
mv -f patch-stampT patch-stamp

pe...@mgmt:~/dev/rancid-2.3.2$ fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
rm -f config.log
[ ! -f Makefile ] || /usr/bin/make distclean
dh_clean
dpatch  deapply-all
reverting patch 09_svn_fixed from ./ ... ok.
reverting patch 08_hlogin_paging from ./ ... ok.
reverting patch 07_nrancid_bs_paging from ./ ... ok.
reverting patch 06_tmp_security from ./ ... ok.
reverting patch 05_man_fixup from ./ ... ok.
reverting patch 04_pixlogin from ./ ... ok.
reverting patch 03_diffstat from ./ ... ok.
reverting patch 02_man_hyphen from ./ ... ok.
reverting patch 01_rancid_par from ./ ... ok.
rm -rf patch-stamp patch-stampT debian/patched

The file 09_svn_fixed.dpatch is attached to this email.
#! /bin/sh /usr/share/dpatch/dpatch-run
## 09_svn.dpatch by [REDACTED] <[email protected]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Avoid "svn: Directory '<GROUP>' is out of date" message.

@DPATCH@
diff -urNad rancid~/bin/control_rancid.in rancid/bin/control_rancid.in
--- rancid~/bin/control_rancid.in
+++ rancid/bin/control_rancid.in
@@ -166,6 +166,12 @@
     fi
 fi
 
+# svn update to avoid 'Out of date' error
+if [ $RCSSYS = svn ]
+then
+    svn update
+fi
+
 # do cvs update of router.db in case anyone has fiddled.
 $RCSSYS update router.db > $TMP 2>&1
 grep "^C" $TMP > /dev/null
diff -urNad rancid~/bin/rancid-cvs.in rancid/bin/rancid-cvs.in
--- rancid~/bin/rancid-cvs.in
+++ rancid/bin/rancid-cvs.in
@@ -131,6 +131,8 @@
            svn import -m "$GROUP" . file:///$CVSROOT/$GROUP
            cd $BASEDIR
            svn checkout file:///$CVSROOT/$GROUP $GROUP
+           cd $DIR
+           svn update
        fi
     fi
     cd $DIR

Reply via email to