NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/41061: 'mtree -d' show symlinks when comparing (patch)



>Number:         41061
>Category:       bin
>Synopsis:       'mtree -d' show symlinks when comparing (patch)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 23 04:40:00 +0000 2009
>Originator:     Steven Drake
>Release:        mtree-20081105
>Organization:
>Environment:
System: Linux idran.drake.org.nz 2.6.28.7 #1 PREEMPT Sun Mar 15 20:29:52 NZDT 
2009 i686 pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
pkgsrc-2008Q4

>Description:
        Option -d "Ignore everything except directory type files"
        prints unknow symlinks as well as unknow directorys when
        comparing/verifing.

        eg. (from How-To-Repeat)
extra: otherdir

>How-To-Repeat:
        cd `mktemp -d`
        mkdir newdir
        mtree -c| mtree -Ck uid,gid,mode >mtree.spec
        ln -s newdir otherdir
        mtree -d <mtree.spec
>Fix:
--- verify.c.orig
+++ verify.c
@@ -163,7 +163,7 @@ vwalk(void)
                if (ep)
                        continue;
  extra:
-               if (!eflag) {
+               if (!eflag && !(dflag && p->fts_info == FTS_SL)) {
                        printf("extra: %s", RP(p));
                        if (rflag) {
                                if ((S_ISDIR(p->fts_statp->st_mode)



Home | Main Index | Thread Index | Old Index