summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-27 18:52:56 +0100
committerDan McGee <dan@archlinux.org>2010-02-27 18:52:56 +0100
commitffa88b335b2f756925b388ecbd6681bf3aa58579 (patch)
tree968b01f48fe46e0b878db82193b1173f028dfb72
parentff1530def072daf95f077ec0f8a4d984da4304d6 (diff)
downloaddbscripts-ffa88b335b2f756925b388ecbd6681bf3aa58579.tar.gz
dbscripts-ffa88b335b2f756925b388ecbd6681bf3aa58579.tar.xz
create-filelists: include desc/depends entries
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@archlinux.org>
-rwxr-xr-xcron-jobs/create-filelists10
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"