Check_package () buggy? s/if `Chroot ...`/[ -n "`Chroot ...`"]
- Subject: Check_package () buggy? s/if `Chroot ...`/[ -n "`Chroot ...`"]
- From: jpryzby+cktpdl at quoininc.com (Justin Pryzby)
- Date: Tue, 31 Jul 2007 15:48:13 -0400
- Message-id: <[🔎] 20070731194813.GA30567@quoininc.com>
I got this message after removing some .stage/ stampfiles:
|/usr/share/live-helper/functions/packages.sh: line 21: Package:: command not found
Is this patch sane?
--- /tmp/packages.sh 2007-07-31 15:40:49.000000000 -0400
+++ /usr/share/live-helper/functions/packages.sh 2007-07-31 15:40:54.000000000 -0400
@@ -18,7 +18,7 @@
enabled)
for ITEM in ${PACKAGE}
do
- if ! `Chroot "dpkg-query -s ${ITEM}"`
+ if [ -n "`Chroot "dpkg-query -s ${ITEM}"`" ]
then
PACKAGES="${PACKAGES} ${ITEM}"
fi
You could also do just: if ! Chroot ... >/dev/null 2>&1 or
(my preference) Chroot ... || ...
BTW I also get this message:
|cp: cannot stat `chroot/usr/share/doc/live-initramfs/parameters.txt': No such file or directory
The changelog indicates that this is intentional. Is this really
okay? Why doesn't this file exist (despite the relevant package being
installed beforehand)?
BTW thanks Daniel for help with custom kernels; I actually do use
make-kpkg. I'm not sure what the problem was; probably some
combination of not having the kernel available at the right time and
not removing the right stampfiles.
Thanks
Justin
Reply to: