[arch-dev-public] [Patch] makechrootpkg: fixed support for splitted package
Eric Bélanger
snowmaniscool at gmail.com
Fri Aug 7 02:19:54 EDT 2009
Hi,
Here (inline and attached) are a couple of patches for makechrootpkg.
==> Remove error message when namcap is not installed in chroot (not
sure why this line was added as installing namcap in chroot will dirty
it). Also added a check on the PKGBUILD.
--- makechrootpkg.orig 2009-08-06 20:07:21.000000000 -0400
+++ makechrootpkg 2009-08-06 23:43:24.000000000 -0400
@@ -220,7 +220,7 @@
export HOME=/build
sudo -u nobody makepkg $MAKEPKG_ARGS || touch BUILD_FAILED
[ -f BUILD_FAILED ] && exit 1
-which namcap 2>&1 >/dev/null && namcap /pkgdest/*${PKGEXT} >
/pkgdest/namcap.log
+which namcap 2>&1 &>/dev/null && namcap /build/PKGBUILD
/pkgdest/*${PKGEXT} > /pkgdest/namcap.log
exit 0
EOF
) > "$uniondir/chrootbuild"
==> Move all built packages in the PKGDEST or WORKDIR (pkgname is now
an array). I also did some fixes because using the * between quotes
doesn't work.
@@ -229,25 +229,28 @@
if mkarchroot -r "/chrootbuild" "$uniondir"; then
source ${WORKDIR}/PKGBUILD
- pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}
+ for _pkgname in ${pkgname[@]}; do
+ pkgfile="${chrootdir}"/union/pkgdest/${_pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}
+
+ if [ -n "$add_to_db" -a -e "$pkgfile" ]; then
+ [ -d "${chrootdir}/union/repo" ] || mkdir -p
"${chrootdir}/union/repo"
+ pushd "${chrootdir}/union/repo" >/dev/null
+ cp "$pkgfile" .
+ repo-add repo.db.tar.${DB_COMPRESSION}
${_pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}
+ popd >/dev/null
+ fi
+
+ if [ -e $pkgfile ]; then
+ if [ -n "$PKGDEST" ]; then
+ echo "Moving completed ${_pkgname} package file to ${PKGDEST}"
+ mv $pkgfile "${PKGDEST}"
+ else
+ echo "Moving completed ${_pkgname} package file to ${WORKDIR}"
+ mv $pkgfile "${WORKDIR}"
+ fi
+ fi
+ done
- if [ -n "$add_to_db" -a -e "$pkgfile" ]; then
- [ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo"
- pushd "${chrootdir}/union/repo" >/dev/null
- cp "$pkgfile" .
- repo-add repo.db.tar.${DB_COMPRESSION}
"${pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}"
- popd >/dev/null
- fi
-
- if [ -e "$pkgfile" ]; then
- if [ -n "$PKGDEST" ]; then
- echo "Moving completed package file to ${PKGDEST}"
- mv "$pkgfile" "${PKGDEST}"
- else
- echo "Moving completed package file to ${WORKDIR}"
- mv "$pkgfile" "${WORKDIR}"
- fi
- fi
for f in ${chrootdir}/union/srcdest/*; do
[ -e "$f" ] || continue
if [ -n "$SRCDEST" ]; then
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makechrootpkg.split.patch
Type: text/x-patch
Size: 2193 bytes
Desc: not available
URL: <http://www.archlinux.org/pipermail/arch-dev-public/attachments/20090807/2a176e1b/attachment.bin>
More information about the arch-dev-public
mailing list