I've been attempting to move to a cd-based setup and have been getting into partial backups as a consequence. I've noticed some unexpected behaviour (bugs?) and would like to bring my observations to the attention of the Bering/uClibc team.

I began by wanting to do a partial backup of the etc package. However the proposed partial-backup package created was very small (~ 350 bytes). I took a look at it's contents and it includes the stuff beneath /var/lib/lrpkg but nothing from within /etc. Note that the etc.lrp has no etc.local file so the default 'partial' handling takes place where the package's files beneath /etc and /var/lib/lrpkg should be included.

The etc.list 'include file' for the etc.lrp package is simply:
   etc
   var/lib/lrpkg/etc.*

I then looked at the script - /usr/sbin/lrcfg.back.script and line 50 (the culprit, I believe) says:
sed -n -e \\:etc/:p -e \\:${LRPKG#/}:p $PKGLIST >$INCLUDE


and AFAICT it's only keeping components from beneath
etc/
... which means that it doesn't affirm the line in etc.list that says
etc
since there's no trailing backslash (where this absence of a trailing backslash is the proper syntax, AFAICT).


I 'fixed' the problem (to the limited extent of my understanding of regexpr) by using:
sed -n -e \\:\^etc\$:p -e \\:etc/:p -e \\:${LRPKG#/}:p $PKGLIST >$INCLUDE
i.e. by adding the part:
-e \\:\^etc\$:p


which AFAICT means that a line that contains only 'etc' will meet the criteria and thus a partial backup of etc.lrp will be complete.

I checked this out and it seems to work as I was expecting.

BTW maybe I can ask: should not all the sed matches on line 50 there have the \^ criteria (match starting at the beginning of the line) within, so that matches must be relative to the root directory, as opposed to accepting any directory which includes "etc/"? AFAICT a folder of /getc/somedir would (erroneously?) meet the criteria of
-e \\:etc/:p
? Then again I don't quite fathom the syntax of the sed commands on LEAF as they seem to be somewhat different than the norm. Anyone have a good link for understanding this sed's syntax that might help educate me?


As always, thanks for LEAF!

scott; canada


------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to