marcusmerge - anyone knows whats going on?

Martin Klaffenboeck martin.klaffenboeck at gmx.at
Fri Jun 6 05:17:04 PDT 2003


Hello,

I'm writeing a libports for a easy searchable ports database.
I create a function, checking if the files in the ports are newer than 
the entry in the db to speed up the process.

The function checks the mtime of the files (not directories) in a port. 
(Makefile, pkg-descr ...)

So.  When I use make update or cvsup it works well, the mtime is only 
newer on the ports which are really updated, (one of its files).

When I use marcusmerge, it seems that the mtime of the files in all the 
ports which which are in a category which is also in the marcucom ports 
have a newer mtime as my database entrys timestamp.

Interesting.  I tried to find out whats happening and I had intuition 
(don't know where it came from).

However, using the following patch for marcusmerge solved the problem:

---cat here---
--- marcusmerge.orig    Fri Jun  6 14:02:58 2003
+++ marcusmerge Fri Jun  6 14:02:17 2003
@@ -174,12 +174,12 @@
             if [ "${VERBOSE}" = "yes" ]; then
                 echo "Removing old directory for: ${category}/${port}"
             fi
-           rm -rf ${DESTDIR}/${category}/${port}
+           rm -rf ${DESTDIR}/${category}/${port}/*
         fi
           cd ${SRCDIR}/${category}
-       tar --exclude *CVS* -cf - ${port} | \
-               tar -xf - -C ${DESTDIR}/${category}
+       tar --exclude *CVS* -cf - ${port}/* | \
+               tar -xf - -C ${DESTDIR}/${category}/
      done
  done

---cut here---

But now I'd like to know why this works and the others don't.

Does anyone know what's going on here?

If you want my c function, just tell me, I'll paste it then.

Thanks,
Martin

-- 
If you've got an idea and need help,    ICQ: 72997139
or just need general encouragement,     MSN: kleinerdrache at gmx.at
write me a message. ;-)                 Yahoo-Messenger: walking2martin
                                         AIM: littlewizzard


More information about the freebsd-gnome mailing list