tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg_install patch to support sysutils/etckeeper
On Mon, May 27, 2013 at 08:53:43PM +1200, Steven Drake wrote:
> I just added sysutils/etckeeper, but to be fully support pkg_install
> need to run pre and post install hooks.
>
> The attached patch is my simple attempt at the needed hooks, does anyone
> have any improvements or is this or to commit.
>
> Notes:
> 1) The position in the code where the install hooks are called is important
> and in the correct place.
> 2) The de-install hooks aren't actually needed I just added them for future
> proofing.
The infrastructure already supports the same idea, but for the INSTALL
and DEINSTALL scripts that you can add to packages. See
files/add/perform.c:run_install_script() which is called in pkg_do()
before and after extract_files().
I guess this is not exactly the right place for what we need for
etckeeper? Perhaps (some of) the code can be reused?
And a minor thing: When you bump the version in version.h:
> Index: pkg_install/files/lib/version.h
> ===================================================================
> --- pkg_install.orig/files/lib/version.h
> +++ pkg_install/files/lib/version.h
> @@ -27,6 +27,6 @@
> #ifndef _INST_LIB_VERSION_H_
> #define _INST_LIB_VERSION_H_
>
> -#define PKGTOOLS_VERSION 20130131
> +#define PKGTOOLS_VERSION 20130523
>
> #endif /* _INST_LIB_VERSION_H_ */
the version in the Makefile automatically increases, so you don't need:
> Index: pkg_install/Makefile
> ===================================================================
> --- pkg_install.orig/Makefile
> +++ pkg_install/Makefile
> @@ -7,7 +7,6 @@
> # change in the pkg_* tools that pkgsrc relies on for proper operation.
>
> DISTNAME= pkg_install-${VERSION}
> -PKGREVISION= 1
> CATEGORIES= pkgtools
> MASTER_SITES= # empty
> DISTFILES= # empty
this part.
Thomas
Home |
Main Index |
Thread Index |
Old Index