Re: [pacman-dev] [arch] Plans for switching to new package naming format (name-ver-rel -> name-ver-rel-arch)
On 6/13/07, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 6/13/07, Johan Grahn <johan@cgeek.net> wrote:
On Wed, 2007-06-13 at 22:43 +0100, Andrew Fyfe wrote:
Are there any plans (if so when) to switch the official repositories over to the new package naming format?
Current/Old: name-ver-rel.pkg.tar.gz New: name-ver-rel-arch.pkg.tar.gz
Why do you wanna do this? I'm just curios...
Is it not better to just have separate repos because they are compiled differently and better to maintain.
I'm not saying that is it a bad idea, I just wanna know how you think
No body "wants" to do it - it's already done, and part of pacman 3.0. The rationalization is simple: the majority of the time you don't touch real package files... it's pacman -S, done. There is really nothing lost from adding the suffix - what is gained is clarity in looking at the filename.
To respond to Andrew: there actually is no real "plan" at the moment... but we want to make sure pacman2 users have sufficient time to make the switch before we kill their packages.
This drifts into something that should be on the pacman ML, so I'm moving it there. Is there any reason for pacman to enforce a naming convention at all when it comes to the packages? We should do any information gathering from the .PKGINFO file in the package itself rather than the name, shouldn't we? I also might be way off here- maybe pacman doesn't care. If so, let me know- I haven't dug into the code yet on this issue. -Dan
Dan McGee wrote:
On 6/13/07, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 6/13/07, Johan Grahn <johan@cgeek.net> wrote:
On Wed, 2007-06-13 at 22:43 +0100, Andrew Fyfe wrote:
Are there any plans (if so when) to switch the official repositories over to the new package naming format?
Current/Old: name-ver-rel.pkg.tar.gz New: name-ver-rel-arch.pkg.tar.gz Why do you wanna do this? I'm just curios...
Is it not better to just have separate repos because they are compiled differently and better to maintain.
I'm not saying that is it a bad idea, I just wanna know how you think No body "wants" to do it - it's already done, and part of pacman 3.0. The rationalization is simple: the majority of the time you don't touch real package files... it's pacman -S, done. There is really nothing lost from adding the suffix - what is gained is clarity in looking at the filename.
To respond to Andrew: there actually is no real "plan" at the moment... but we want to make sure pacman2 users have sufficient time to make the switch before we kill their packages.
This drifts into something that should be on the pacman ML, so I'm moving it there. Is there any reason for pacman to enforce a naming convention at all when it comes to the packages? We should do any information gathering from the .PKGINFO file in the package itself rather than the name, shouldn't we?
I also might be way off here- maybe pacman doesn't care. If so, let me know- I haven't dug into the code yet on this issue.
-Dan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev This isn't so much a problem for pacman, but it's a problem for the support scripts. There are two methods to get a package name,
1) from .PKGINFO + guaranteed to get the correct name - can be very slow with big packages or when parsing a lot of packages. This takes 4 seconds.... tar -xOf kernel26-2.6.21.5-1.pkg.tar.gz .PKGINFO | \ grep '^pkgname = ' | sed 's/^pkgname = //' 2) from the file name + fast - can be difficult to get the correct package name. Because pkgname can contain - it's difficult to parse the file name because we have two different naming schemes. Unless you hard code a check for {i686,x86_64} there's no easy way (without reading .PKGINFO) to check if you've got the right name. This takes 0.02 seconds... echo kernel26-2.6.21.5-1.pkg.tar.gz | \ sed 's/.pkg.tar.gz$//;s/-[^-]*-[^-]*$//' or for new format... echo kernel26-2.6.21.5-1-i686.pkg.tar.gz | \ sed 's/.pkg.tar.gz$//;s/-[^-]*-[^-]*-[^-]*$//' Andrew
well..you can cheat with option 1, due to the fact that tar files are just files stuck together, and if the file is 'well packed'. If the file you are looking for (.pkginfo) appears early in the tar.. head -n100 kernel26-2.6.21.3-2.pkg.tar.gz | tar -xzOf - .PKGINFO 2>&1 | sed -rn 's/pkgname = (.*)/\1/p' Horrible way to do it though... i almost feel bad for having thought of it.
Na Thu, Jun 14, 2007 at 01:13:53AM +0100, Andrew Fyfe <andrew@neptune-one.net> pisal(a):
This takes 4 seconds.... tar -xOf kernel26-2.6.21.5-1.pkg.tar.gz .PKGINFO | \ grep '^pkgname = ' | sed 's/^pkgname = //'
why extracting the whole pkg? use -Qi -p VMiklos -- developer of Frugalware Linux - http://frugalware.org
Apparently, pacman 3 (unlike pacman-g2) reads the whole archive too, because of this : lib/libalpm/package.c : 551 /* Read through the entire archive for metadata. We will continue reading 552 * even if all metadata is found, to verify the integrity of the archive in 553 * full */ Also, I found it a bit slower than the tar way (1.7s vs 1.3s). Maybe it's related with this? : 544 /* TODO there is no reason to make temp files to read 545 * from a libarchive archive, it can be done by reading 546 * directly from the archive 547 * See: archive_read_data_into_buffer 548 * requires changes 'parse_descfile' as well 549 * */
participants (5)
-
Andrew Fyfe
-
Dan McGee
-
eliott
-
VMiklos
-
Xavier