Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-05-19 21:00:18 +1000
committerDan McGee <dan@archlinux.org>2012-05-20 19:03:43 -0500
commit81bc390dc1a66841a332948fd906c2257720f37a (patch)
tree384f76d29ddafe1fc6526707f4f420da106e307f
parent18e0a972094d7c4bc874ba87ce3be6b2b308a832 (diff)
repo-add: add makedepends information
This is useful for tools that automatically rebuild packages and thus require to generate a build order. These entries are skipped by pacman. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/be_sync.c6
-rw-r--r--scripts/repo-add.sh.in23
2 files changed, 19 insertions, 10 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 9fadff54..02f087ad 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -591,6 +591,12 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
READ_AND_SPLITDEP(pkg->depends);
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
READ_AND_SPLITDEP(pkg->optdepends);
+ } else if(strcmp(line, "%MAKEDEPENDS%") == 0) {
+ /* currently unused */
+ while(1) {
+ READ_NEXT();
+ if(strlen(line) == 0) break;
+ }
} else if(strcmp(line, "%CONFLICTS%") == 0) {
READ_AND_SPLITDEP(pkg->conflicts);
} else if(strcmp(line, "%PROVIDES%") == 0) {
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 006672a0..e43f0961 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -256,7 +256,8 @@ verify_repo_extension() {
db_write_entry() {
# blank out all variables
local pkgfile=$1
- local -a _groups _licenses _replaces _depends _conflicts _provides _optdepends
+ local -a _groups _licenses _replaces _depends _conflicts _provides \
+ _optdepends _makedepends
local pkgname pkgver pkgdesc csize size url arch builddate packager \
md5sum sha256sum pgpsig pgpsigsize
@@ -269,13 +270,14 @@ db_write_entry() {
# normalize whitespace with an extglob
declare "$var=${val//+([[:space:]])/ }"
case $var in
- group) _groups+=("$group") ;;
- license) _licenses+=("$license") ;;
- replaces) _replaces+=("$replaces") ;;
- depend) _depends+=("$depend") ;;
- conflict) _conflicts+=("$conflict") ;;
- provides) _provides+=("$provides") ;;
+ group) _groups+=("$group") ;;
+ license) _licenses+=("$license") ;;
+ replaces) _replaces+=("$replaces") ;;
+ depend) _depends+=("$depend") ;;
+ conflict) _conflicts+=("$conflict") ;;
+ provides) _provides+=("$provides") ;;
optdepend) _optdepends+=("$optdepend") ;;
+ makedepend) _makedepends+=("$makedepend") ;;
esac
done< <(bsdtar -xOqf "$pkgfile" .PKGINFO)
@@ -358,10 +360,11 @@ db_write_entry() {
# create depends entry
msg2 "$(gettext "Creating '%s' db entry...")" 'depends'
{
- format_entry "DEPENDS" "${_depends[@]}"
- format_entry "CONFLICTS" "${_conflicts[@]}"
- format_entry "PROVIDES" "${_provides[@]}"
+ format_entry "DEPENDS" "${_depends[@]}"
+ format_entry "CONFLICTS" "${_conflicts[@]}"
+ format_entry "PROVIDES" "${_provides[@]}"
format_entry "OPTDEPENDS" "${_optdepends[@]}"
+ format_entry "MAKEDEPENDS" "${_makedepends[@]}"
} >'depends'
popd >/dev/null