[Kimchi-devel] [PATCH 3/3] Remove directories under /var/lib/kimchi if empty on ubuntu
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Dec 15 12:16:06 UTC 2014
On 12/12/2014 11:52 AM, Ramon Medeiros wrote:
> Add the directory structure in the buildroot. Dpkg automatically removes
> empty directories.
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> contrib/make-deb.sh.in | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/contrib/make-deb.sh.in b/contrib/make-deb.sh.in
> index 5a6e56a..2939b96 100644
> --- a/contrib/make-deb.sh.in
> +++ b/contrib/make-deb.sh.in
> @@ -10,6 +10,10 @@ fi
>
> TMPDIR=`mktemp -d`
> +# create /var/lib/kimchi structure
> +mkdir -p $TMPDIR/var/lib/kimchi/{debugreports,screenshots,vnc-tokens,isos}
> +touch $TMPDIR/var/lib/kimchi/objectstore
> +
Move it to Makefile.am (deb target) and use the autoconf macros to
create the dirs.
And don't you need to modify contrib/DEBIAN/postrm script to remove the
dirs when needed?
> make DESTDIR=$TMPDIR install-deb
> dpkg-deb -b $TMPDIR kimchi-${VERSION}-${RELEASE}.noarch.deb
> rm -rf $TMPDIR
More information about the Kimchi-devel
mailing list