[pacman-dev] [PATCH] add pkgbase to package and database

Pierre Schmitz pierre at archlinux.de
Sun Jun 14 04:12:03 EDT 2009


Am Sonntag 14 Juni 2009 10:05:46 schrieb Pierre Schmitz:
> Hi,
>
> this simple addition makes it easy to implement split package support in
> our db-scripts.
>
> But it might be a quite useful information anyway and thus not Arch
> related.

Oh great mailman has stolen my attachement. I need to find out why git does 
not like my smtp server...lets hope kmail does not break this patch.




From 8e0b8e89ba887e0dca129ca579e72f8d9169ea98 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre at archlinux.de>
Date: Sun, 14 Jun 2009 09:34:40 +0200
Subject: [PATCH] add pkgbase to package and database

Adding the pkgbase information of split packages makes it possible to:
* find the PKGBUILD of a given package in a (svn) repository or ABS tree
* find out which packages were created using the same PKGBUILD
---
 scripts/makepkg.sh.in  |    1 +
 scripts/repo-add.sh.in |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 433fe34..8e7d535 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -902,6 +902,7 @@ create_package() {
 		echo "# using $(fakeroot -v)" >>.PKGINFO
 	fi
 	echo "# $(LC_ALL=C date -u)" >>.PKGINFO
+	echo "pkgbase = $pkgbase" >>.PKGINFO
 	echo "pkgname = $nameofpkg" >>.PKGINFO
 	echo "pkgver = $pkgver-$pkgrel" >>.PKGINFO
 	echo "pkgdesc = $pkgdesc" >>.PKGINFO
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 7c12aaf..ccb4dda 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -241,6 +241,7 @@ db_write_entry()
 	# create desc entry
 	msg2 "$(gettext "Creating 'desc' db entry...")"
 	echo -e "%FILENAME%\n$(basename "$1")\n" >>desc
+	[ -n "$pkgbase" ] && echo -e "%BASE%\n$pkgbase\n" >>desc
 	echo -e "%NAME%\n$pkgname\n" >>desc
 	echo -e "%VERSION%\n$pkgver\n" >>desc
 	[ -n "$pkgdesc" ] && echo -e "%DESC%\n$pkgdesc\n" >>desc
-- 
1.6.3.2



-- 

Pierre Schmitz


Clemens-August-Straße 76
53115 Bonn

Telefon		0228 9716608
Mobil		0160 95269831
Jabber		pierre at jabber.archlinux.de
WWW		http://www.archlinux.de



More information about the pacman-dev mailing list