You are not logged in.

#1 2013-03-01 21:25:05

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,632
Website

repkg - update package metadata without full recompilation

There have been too many trivial metadata bumps of compilation-heavy packages recently, especially with the qt update. In most cases the resulting package is exactly the same. I caught myself redoing the same thing a few times so I wrote a little script and uploaded it.

Get repkg here.

The first argument is the path to a build package. The rest are passed through to makepkg (it will only repackage the pkgdir, so most arguments make no sense). If anyone is interested, there is also commented code in the file to use pbget to automatically retrieve the PKGBUILD and related files.

Caveats: make sure that the PKGBUILD changes really do result in the same files.


edit: renamed

Last edited by Xyne (2013-03-01 21:43:42)

Offline

#2 2013-06-09 05:51:03

luolimao
Member
Registered: 2011-09-29
Posts: 10

Re: repkg - update package metadata without full recompilation

Since pacman 4.1 deletes the pkg folder before building, /bin binaries have been moved to /usr/bin, and I have BUILDDIR set in my makepkg.conf, I think a patch is in order.

--- repkg.old	2013-06-09 01:42:53.751624522 -0400
+++ repkg	2013-06-09 01:44:45.291341774 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/bash
 # powerpill-2013.2-1-any.pkg.tar.xz
 if [[ -z $1 ]]
 then
@@ -38,10 +38,14 @@
 
 package()
 {
+  bsdtar -C "$pkgdir" -xf "$pkgfile"
   msg "repackaging $pkgname..."
 }
 
 ''' >> PKGBUILD
-mkdir -p pkg
-bsdtar -C pkg -xf "$pkgfile"
+
+cat <<EOF>> PKGBUILD
+pkgfile=$pkgfile
+EOF
+
 makepkg -fR "$@"

Last edited by luolimao (2013-06-09 05:51:52)

Offline

#3 2013-06-09 13:28:10

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,632
Website

Re: repkg - update package metadata without full recompilation

I have moved the archive extraction into the PKGBUILD as suggested, but not the same way as the patch.

I have left /bin/bash for now because that is still the path on most distros and it is unlikely to change soon given that various standards seem to hard-code it.

Offline

Board footer

Powered by FluxBB