[arch-projects] [ABS] [PATCH v2 1/7] vcs prototypes: hint removal of build directories after making package

Linus Arver linusarver at gmail.com
Wed Nov 2 23:12:28 EDT 2011


For all vcs prototypes, we currently create a temporary build directory.
However, we do not delete it after we are done creating the package.
This wastes disk space as far as all AUR end-users are concerned.

On the other hand, package maintainers who rely on the prototypes as a
template for creating new packages will get bitten by this if they ever
need to repackage the contents of a package with "makepkg --repackage".

The solution is to add a comment encouraging the deletion of the build
directory once the packager is 100% sure that the PKGBUILD is correct.
Hopefully, this will encourage PKGBUILD creators (AUR package
maintainers especially) to cut down on unnecessary disk space pollution.

Signed-off-by: Linus Arver <linusarver at gmail.com>
---
 prototypes/PKGBUILD-bzr.proto   |    5 +++++
 prototypes/PKGBUILD-cvs.proto   |    5 +++++
 prototypes/PKGBUILD-darcs.proto |    5 +++++
 prototypes/PKGBUILD-git.proto   |    5 +++++
 prototypes/PKGBUILD-hg.proto    |    5 +++++
 prototypes/PKGBUILD-svn.proto   |    5 +++++
 6 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto
index 81f145f..1134d62 100644
--- a/prototypes/PKGBUILD-bzr.proto
+++ b/prototypes/PKGBUILD-bzr.proto
@@ -59,6 +59,11 @@ build() {
 package() {
   cd "$srcdir/$_bzrmod-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_bzrmod-build"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/prototypes/PKGBUILD-cvs.proto b/prototypes/PKGBUILD-cvs.proto
index 982c149..7727064 100644
--- a/prototypes/PKGBUILD-cvs.proto
+++ b/prototypes/PKGBUILD-cvs.proto
@@ -60,6 +60,11 @@ build() {
 package() {
   cd "$srcdir/$_cvsmod-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_cvsmod-build"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/prototypes/PKGBUILD-darcs.proto b/prototypes/PKGBUILD-darcs.proto
index 979e9b5..b077246 100644
--- a/prototypes/PKGBUILD-darcs.proto
+++ b/prototypes/PKGBUILD-darcs.proto
@@ -61,6 +61,11 @@ build() {
 package() {
   cd "$srcdir/$_darcsmod-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_darcsmod-build"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/prototypes/PKGBUILD-git.proto b/prototypes/PKGBUILD-git.proto
index 05b721b..ea55126 100644
--- a/prototypes/PKGBUILD-git.proto
+++ b/prototypes/PKGBUILD-git.proto
@@ -59,6 +59,11 @@ build() {
 package() {
   cd "$srcdir/$_gitname-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_gitname-build"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/prototypes/PKGBUILD-hg.proto b/prototypes/PKGBUILD-hg.proto
index 8474533..1d3d56f 100644
--- a/prototypes/PKGBUILD-hg.proto
+++ b/prototypes/PKGBUILD-hg.proto
@@ -60,6 +60,11 @@ build() {
 package() {
   cd "$srcdir/$_hgrepo-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_hgrepo-build"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/prototypes/PKGBUILD-svn.proto b/prototypes/PKGBUILD-svn.proto
index a08e0e3..b4534e7 100644
--- a/prototypes/PKGBUILD-svn.proto
+++ b/prototypes/PKGBUILD-svn.proto
@@ -58,6 +58,11 @@ build() {
 package() {
   cd "$srcdir/$_svnmod-build"
   make DESTDIR="$pkgdir/" install
+
+  # Uncomment to remove the build directory to save space once you are 100%
+  # sure the resulting package is correct and there is no need to invoke
+  # "makepkg --repackage".
+  #rm -rf "$srcdir/$_svnmod-build"
 }
 
 # vim:set ts=2 sw=2 et:
-- 
1.7.7.2



More information about the arch-projects mailing list