[arch-projects] [ABS] [PATCH 1/6] vcs prototypes: remove build directories after making package
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. We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything. Signed-off-by: Linus Arver <linusarver@gmail.com> --- prototypes/PKGBUILD-bzr.proto | 2 ++ prototypes/PKGBUILD-cvs.proto | 2 ++ prototypes/PKGBUILD-darcs.proto | 2 ++ prototypes/PKGBUILD-git.proto | 2 ++ prototypes/PKGBUILD-hg.proto | 2 ++ prototypes/PKGBUILD-svn.proto | 2 ++ 6 files changed, 12 insertions(+), 0 deletions(-) diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto index 81f145f..fca5f36 100644 --- a/prototypes/PKGBUILD-bzr.proto +++ b/prototypes/PKGBUILD-bzr.proto @@ -59,6 +59,8 @@ build() { package() { cd "$srcdir/$_bzrmod-build" make DESTDIR="$pkgdir/" install + + 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..997373d 100644 --- a/prototypes/PKGBUILD-cvs.proto +++ b/prototypes/PKGBUILD-cvs.proto @@ -60,6 +60,8 @@ build() { package() { cd "$srcdir/$_cvsmod-build" make DESTDIR="$pkgdir/" install + + 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..cbeef29 100644 --- a/prototypes/PKGBUILD-darcs.proto +++ b/prototypes/PKGBUILD-darcs.proto @@ -61,6 +61,8 @@ build() { package() { cd "$srcdir/$_darcsmod-build" make DESTDIR="$pkgdir/" install + + 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..7ece6f3 100644 --- a/prototypes/PKGBUILD-git.proto +++ b/prototypes/PKGBUILD-git.proto @@ -59,6 +59,8 @@ build() { package() { cd "$srcdir/$_gitname-build" make DESTDIR="$pkgdir/" install + + 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..df9abd5 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -60,6 +60,8 @@ build() { package() { cd "$srcdir/$_hgrepo-build" make DESTDIR="$pkgdir/" install + + 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..f103c78 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -58,6 +58,8 @@ build() { package() { cd "$srcdir/$_svnmod-build" make DESTDIR="$pkgdir/" install + + rm -rf "$srcdir/$_svnmod-build" } # vim:set ts=2 sw=2 et: -- 1.7.7.1
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging. dave
Signed-off-by: Linus Arver <linusarver@gmail.com> --- prototypes/PKGBUILD-bzr.proto | 2 ++ prototypes/PKGBUILD-cvs.proto | 2 ++ prototypes/PKGBUILD-darcs.proto | 2 ++ prototypes/PKGBUILD-git.proto | 2 ++ prototypes/PKGBUILD-hg.proto | 2 ++ prototypes/PKGBUILD-svn.proto | 2 ++ 6 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto index 81f145f..fca5f36 100644 --- a/prototypes/PKGBUILD-bzr.proto +++ b/prototypes/PKGBUILD-bzr.proto @@ -59,6 +59,8 @@ build() { package() { cd "$srcdir/$_bzrmod-build" make DESTDIR="$pkgdir/" install + + 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..997373d 100644 --- a/prototypes/PKGBUILD-cvs.proto +++ b/prototypes/PKGBUILD-cvs.proto @@ -60,6 +60,8 @@ build() { package() { cd "$srcdir/$_cvsmod-build" make DESTDIR="$pkgdir/" install + + 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..cbeef29 100644 --- a/prototypes/PKGBUILD-darcs.proto +++ b/prototypes/PKGBUILD-darcs.proto @@ -61,6 +61,8 @@ build() { package() { cd "$srcdir/$_darcsmod-build" make DESTDIR="$pkgdir/" install + + 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..7ece6f3 100644 --- a/prototypes/PKGBUILD-git.proto +++ b/prototypes/PKGBUILD-git.proto @@ -59,6 +59,8 @@ build() { package() { cd "$srcdir/$_gitname-build" make DESTDIR="$pkgdir/" install + + 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..df9abd5 100644 --- a/prototypes/PKGBUILD-hg.proto +++ b/prototypes/PKGBUILD-hg.proto @@ -60,6 +60,8 @@ build() { package() { cd "$srcdir/$_hgrepo-build" make DESTDIR="$pkgdir/" install + + 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..f103c78 100644 --- a/prototypes/PKGBUILD-svn.proto +++ b/prototypes/PKGBUILD-svn.proto @@ -58,6 +58,8 @@ build() { package() { cd "$srcdir/$_svnmod-build" make DESTDIR="$pkgdir/" install + + rm -rf "$srcdir/$_svnmod-build" }
# vim:set ts=2 sw=2 et: -- 1.7.7.1
On Wed, Nov 02, 2011 at 08:59:15PM -0400, Dave Reisner wrote:
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging.
dave
Hmm, I am apparently not knowledgeable at all in what "repackaging" means. Since this is the first in the series of 6 patches, I'll have to do a rebase (taking into account your other comments). I'm thinking of keeping this patch, but just as a comment for all the thousands of AUR packagers who blindly use the prototype without taking into account their particular needs. Any objections?
On Wed, Nov 02, 2011 at 06:13:52PM -0700, Linus Arver wrote:
On Wed, Nov 02, 2011 at 08:59:15PM -0400, Dave Reisner wrote:
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging.
dave
Hmm, I am apparently not knowledgeable at all in what "repackaging" means. Since this is the first in the series of 6 patches, I'll have to do a rebase (taking into account your other comments).
Repackaging is the main reason for having separate build() and package() functions. `man makepkg | less -p repackage`.
I'm thinking of keeping this patch, but just as a comment for all the thousands of AUR packagers who blindly use the prototype without taking into account their particular needs.
Any objections?
Putting a comment there might encourage AUR packagers to uncomment that, especially if they don't know what they're doing. On the other side, users, who know how makepkg(1) works, also know how to clean/remove the build directory and don't need such a comment... My two cents.
On Thu, Nov 03, 2011 at 08:25:27AM +0100, Lukas Fleischer wrote:
On Wed, Nov 02, 2011 at 06:13:52PM -0700, Linus Arver wrote:
On Wed, Nov 02, 2011 at 08:59:15PM -0400, Dave Reisner wrote:
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging.
dave
Hmm, I am apparently not knowledgeable at all in what "repackaging" means. Since this is the first in the series of 6 patches, I'll have to do a rebase (taking into account your other comments).
Repackaging is the main reason for having separate build() and package() functions.
Ah, that makes sense... thanks!
`man makepkg | less -p repackage`.
TIL about the -p flag...
I'm thinking of keeping this patch, but just as a comment for all the thousands of AUR packagers who blindly use the prototype without taking into account their particular needs.
Any objections?
Putting a comment there might encourage AUR packagers to uncomment that, especially if they don't know what they're doing. On the other side, users, who know how makepkg(1) works, also know how to clean/remove the build directory and don't need such a comment... My two cents.
So you're suggesting # code instead of # comment # code ? Well, if that's the case then I must disagree --- I *despise* it when there's code commented out with zero explanation. Looking back, I can see that the comment I wrote is rather verbose; I'll shorten it to a one-liner, for now, like this: # save disk space # rm -rf /temp/build/dir Everyone loves one-liner comments, right? -Linus P.S. I'll wait and let the discussion die down for a few days this time before releasing v3 of this patch series... the traffic for ABS patches is nearly non-existant anyway.
On Thu, Nov 03, 2011 at 07:56:56PM -0700, Linus Arver wrote:
On Thu, Nov 03, 2011 at 08:25:27AM +0100, Lukas Fleischer wrote:
On Wed, Nov 02, 2011 at 06:13:52PM -0700, Linus Arver wrote:
On Wed, Nov 02, 2011 at 08:59:15PM -0400, Dave Reisner wrote:
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging.
dave
[...]
I'm thinking of keeping this patch, but just as a comment for all the thousands of AUR packagers who blindly use the prototype without taking into account their particular needs.
Any objections?
Putting a comment there might encourage AUR packagers to uncomment that, especially if they don't know what they're doing. On the other side, users, who know how makepkg(1) works, also know how to clean/remove the build directory and don't need such a comment... My two cents.
So you're suggesting
# code
instead of
# comment # code
No, I'm suggesting not to patch anything. Don't mention the `rm -rf` stuff - just keep it as it is right now. The comment will confuse novice packagers (and novice users who try to repackage stuff!) and won't help advanced packagers.
? Well, if that's the case then I must disagree --- I *despise* it when there's code commented out with zero explanation. Looking back, I can see that the comment I wrote is rather verbose; I'll shorten it to a one-liner, for now, like this:
# save disk space # rm -rf /temp/build/dir
Everyone loves one-liner comments, right?
-Linus
P.S. I'll wait and let the discussion die down for a few days this time before releasing v3 of this patch series... the traffic for ABS patches is nearly non-existant anyway.
On Fri, Nov 04, 2011 at 08:32:40AM +0100, Lukas Fleischer wrote:
On Thu, Nov 03, 2011 at 07:56:56PM -0700, Linus Arver wrote:
On Thu, Nov 03, 2011 at 08:25:27AM +0100, Lukas Fleischer wrote:
On Wed, Nov 02, 2011 at 06:13:52PM -0700, Linus Arver wrote:
On Wed, Nov 02, 2011 at 08:59:15PM -0400, Dave Reisner wrote:
On Wed, Nov 02, 2011 at 05:49:27PM -0700, Linus Arver wrote:
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.
We already do a "rm -rf" on the build directories every time after we do a checkout anyway, so this patch doesn't really change anything.
Big -1 from me. This prevents repackaging.
dave
[...]
I'm thinking of keeping this patch, but just as a comment for all the thousands of AUR packagers who blindly use the prototype without taking into account their particular needs.
Any objections?
Putting a comment there might encourage AUR packagers to uncomment that, especially if they don't know what they're doing. On the other side, users, who know how makepkg(1) works, also know how to clean/remove the build directory and don't need such a comment... My two cents.
So you're suggesting
# code
instead of
# comment # code
No, I'm suggesting not to patch anything. Don't mention the `rm -rf` stuff - just keep it as it is right now. The comment will confuse novice packagers (and novice users who try to repackage stuff!) and won't help advanced packagers.
Ok, I'm discarding this patch from the next series.
? Well, if that's the case then I must disagree --- I *despise* it when there's code commented out with zero explanation. Looking back, I can see that the comment I wrote is rather verbose; I'll shorten it to a one-liner, for now, like this:
# save disk space # rm -rf /temp/build/dir
Everyone loves one-liner comments, right?
-Linus
P.S. I'll wait and let the discussion die down for a few days this time before releasing v3 of this patch series... the traffic for ABS patches is nearly non-existant anyway.
participants (3)
-
Dave Reisner
-
Linus Arver
-
Lukas Fleischer