[arch-dev-public] [PATCH 4/4] create-filelists: include desc/depends entries

Dan McGee dan at archlinux.org
Sat Feb 27 13:01:36 EST 2010


Make the files DB include everything the original packages DB includes
instead of just being 'files' entries. This will allow tools to do more with
these generated files and they can be used as a drop-in replacement for a
regular package database.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 cron-jobs/create-filelists |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists
index 6091bf4..84867d8 100755
--- a/cron-jobs/create-filelists
+++ b/cron-jobs/create-filelists
@@ -63,14 +63,18 @@ for repo in $repos; do
 
         # create file lists
         for pkg in $(ls ${DBDIR}/${repodir}); do
+            dbpkgdir="${DBDIR}/${repodir}/${pkg}"
+            cachepkgdir="${CACHEDIR}/${repodir}/${pkg}"
             tmppkgdir="${TMPDIR}/${repodir}/${pkg}"
             mkdir -p "$tmppkgdir"
-            if [ -f "${CACHEDIR}/${repodir}/${pkg}/files" ]; then
+            ln "${dbpkgdir}/desc" "${tmppkgdir}/desc"
+            ln "${dbpkgdir}/depends" "${tmppkgdir}/depends"
+            if [ -f "${cachepkgdir}/files" ]; then
 #               echo "cache: $pkg"
-                mv "${CACHEDIR}/${repodir}/${pkg}/files" "${tmppkgdir}/files"
+                ln "${cachepkgdir}/files" "${tmppkgdir}/files"
             else
 #               echo "not cache: $repo/$arch: $pkg"
-                filename=$(grep -A1 '^%FILENAME%$' "${DBDIR}/${repodir}/${pkg}/desc" | tail -n1)
+                filename=$(grep -A1 '^%FILENAME%$' "${dbpkgdir}/desc" | tail -n1)
                 echo '%FILES%' > "${tmppkgdir}/files"
                 bsdtar --exclude=.* -tf "$repodir/$filename" >> "${tmppkgdir}/files"
                 cached="no"
-- 
1.7.0



More information about the arch-dev-public mailing list