[pacman-dev] [PATCH] add pkgbase to package and database
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. -- Pierre Schmitz Clemens-August-Straße 76 53115 Bonn Telefon 0228 9716608 Mobil 0160 95269831 Jabber pierre@jabber.archlinux.de WWW http://www.archlinux.de
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@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@jabber.archlinux.de WWW http://www.archlinux.de
Pierre Schmitz wrote:
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.
This change I am 50/50 on. pkgbase was supposed to be purely informational when splitting packages and it is entirely optional to specify when splitting packages (as pkgname[0] is used as a backup). However, I see that could be useful... Allan
Am Sonntag 14 Juni 2009 10:39:11 schrieb Allan McRae:
This change I am 50/50 on. pkgbase was supposed to be purely informational when splitting packages and it is entirely optional to specify when splitting packages (as pkgname[0] is used as a backup). However, I see that could be useful...
Right, it changes the "only for fancy makepkg output" meaning of pkgbase to a more important role. But as long as this version of makepkg is not released this is possible. Let's say if you split a package you have to define pkgbase and then the same rules apply to it as to pkgname atm. E.g. our tools expect that your PKGBUILD is within a dir with the same name as pkgname. (even though pacman/makepkg does not care about it) But even if we forget about the use for our Arch specific db-scripts its imho very usefull to have some kind of connection between a package and a PKGBUILD. We now have pkgname which is a unique identifier; for split packages that would be pkgbase. PS: We might adjust this patch in a way that pkgbase will only be added for split packages and pkgbase will be required for split packages. -- Pierre Schmitz Clemens-August-Straße 76 53115 Bonn Telefon 0228 9716608 Mobil 0160 95269831 Jabber pierre@jabber.archlinux.de WWW http://www.archlinux.de
On Sunday 14 June 2009 10:05:46 Pierre Schmitz wrote:
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.
Sorry for pushing this, but it would be nice to know if there is a chance that a patch like this would be accepted or not. If there is anything I can do, let me know. -- Pierre Schmitz, http://users.archlinux.de/~pierre
Pierre Schmitz wrote:
On Sunday 14 June 2009 10:05:46 Pierre Schmitz wrote:
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.
Sorry for pushing this, but it would be nice to know if there is a chance that a patch like this would be accepted or not. If there is anything I can do, let me know.
I'd say this is very likely to go in. I'd say definitely if we going to include this in -S/Qi output, which I think is very justified. But there is already a lot of "None" entries...
pacman -Si | wc -l 80913
pacman -Si | grep "None" | wc -l 19179
19179/80913 = 23% Between this and the makedepends inclusion (I'd say less likely to go in...), we really need to have a general discussion about what we want included in the the .PKGINFO file and pacman database files. Allan
participants (2)
-
Allan McRae
-
Pierre Schmitz