[pacman-dev] [PATCH] makepkg: Add docmunetation for separate pacakge function
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index e42a8b8..5171798 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -254,6 +254,15 @@ If you create any variables of your own in the build function, it is recommended to use the bash `local` keyword to scope the variable to inside the build function. +package() Function +------------------ +An optional package() function can be specified in addtion to the build() function. +This function is directly sourced by makepkg and run immediately after the build() +function. When specified in combination with the fakeroot BUILDENV option in +linkman:makepkg.conf[5], fakeroot usage will be limited to running the package() +function and the subsequent packing of the package. The build() function will be +run as the user calling makepkg. + Install/Upgrade/Remove Scripting -------------------------------- Pacman has the ability to store and execute a package-specific script when it -- 1.6.0.5
I'd like some comments here as I find it hard writing documentation when I know exactly what the code is doing. Any suggestions for wording or parts which need clarification are appreciated. Allan Allan McRae wrote:
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index e42a8b8..5171798 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -254,6 +254,15 @@ If you create any variables of your own in the build function, it is recommended to use the bash `local` keyword to scope the variable to inside the build function.
+package() Function +------------------ +An optional package() function can be specified in addtion to the build() function. +This function is directly sourced by makepkg and run immediately after the build() +function. When specified in combination with the fakeroot BUILDENV option in +linkman:makepkg.conf[5], fakeroot usage will be limited to running the package() +function and the subsequent packing of the package. The build() function will be +run as the user calling makepkg. + Install/Upgrade/Remove Scripting -------------------------------- Pacman has the ability to store and execute a package-specific script when it
makepkg: Add docmunetation for separate pacakge function -> makepkg: Add documentation for the package function On Sun, Dec 21, 2008 at 8:13 AM, Allan McRae <allan@archlinux.org> wrote:
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index e42a8b8..5171798 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -254,6 +254,15 @@ If you create any variables of your own in the build function, it is recommended to use the bash `local` keyword to scope the variable to inside the build function.
+package() Function +------------------ +An optional package() function can be specified in addtion to the build() function.
addition
+This function is directly sourced by makepkg and run immediately after the build()
Maybe it could be simplified a bit to just say : This function is run immediately after the build() function.
+function. When specified in combination with the fakeroot BUILDENV option in +linkman:makepkg.conf[5], fakeroot usage will be limited to running the package() +function and the subsequent packing of the package. The build() function will be
Maybe it could be simplified a bit to just say : fakeroot usage will be limited to running the package() function. Otherwise it looks fine to me :)
Xavier wrote:
+function. When specified in combination with the fakeroot BUILDENV option in +linkman:makepkg.conf[5], fakeroot usage will be limited to running the package() +function and the subsequent packing of the package. The build() function will be
Maybe it could be simplified a bit to just say : fakeroot usage will be limited to running the package() function.
But it is the package() and internal create_package functions that are run in the fakeroot. What if I just get rid of the bit about the build() function being run as the user? Perhaps "fakeroot usage will be limited to running the package() function and the actual creation of the package." Still sounds a bit awful... Allan
On Sun, Dec 21, 2008 at 10:47 AM, Allan McRae <allan@archlinux.org> wrote:
Xavier wrote:
+function. When specified in combination with the fakeroot BUILDENV option in +linkman:makepkg.conf[5], fakeroot usage will be limited to running the package() +function and the subsequent packing of the package. The build() function will be
Maybe it could be simplified a bit to just say : fakeroot usage will be limited to running the package() function.
But it is the package() and internal create_package functions that are run in the fakeroot.
I know, I was trying to think like an user simply looking at a PKGBUILD. I always see the build() function, now I know I can add an optional package() one which will be run under fakeroot so that build() can be run as an user. I might not care or think about the rest. Anyway, it is not a big deal. Your original documentation is still clear and simple enough, and it is more complete, so you can keep it as is if you prefer :)
Incorporating Xavier's comments, how about: package() Function ------------------ An optional package() function can be specified in addition to the build() function. This function is run immediately after the build() function. When specified in combination with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage will be limited to running the packaging stages. The build() function will be run as the user calling makepkg.
On Mon, Dec 22, 2008 at 5:23 AM, Allan McRae <allan@archlinux.org> wrote:
Incorporating Xavier's comments, how about:
package() Function ------------------ An optional package() function can be specified in addition to the build() function. This function is run immediately after the build() function. When specified in combination with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage will be limited to running the packaging stages. The build() function How about just "stage"? Or maybe it just sounds weird to me because I'm not used to makepkg being able to make multiple packages. will be run as the user calling makepkg.
participants (3)
-
Allan McRae
-
Dan McGee
-
Xavier