[pacman-dev] repo-add sanity check
Hi, I took repo-add from the pacman package and one built from the latest git will all Xavier's patches and made a repo db from all packages in my cache (all of testing, core and extra, some community). There are a few differences (see http://dev.archlinux.org/~allan/repoadd-diff.txt). A summary of the differences: A bunch of packages have the ARCH field removed: -%ARCH% -i686 A few differences to do with quotes. e.g. -custom:INTEL537 +custom:"INTEL537" and +%DESC% +Efficient bit vector, set of integers and "big int" math library This change is not so good... (k3b-i18n package) %DEPENDS% -k3b>=1.0.5-1 +k3b>=$pkgver Allan
On Fri, Feb 27, 2009 at 3:31 AM, Allan McRae <allan@archlinux.org> wrote:
Hi,
I took repo-add from the pacman package and one built from the latest git will all Xavier's patches and made a repo db from all packages in my cache (all of testing, core and extra, some community). There are a few differences (see http://dev.archlinux.org/~allan/repoadd-diff.txt). A summary of the differences:
A bunch of packages have the ARCH field removed: -%ARCH% -i686
A few differences to do with quotes. e.g. -custom:INTEL537 +custom:"INTEL537" and +%DESC% +Efficient bit vector, set of integers and "big int" math library
This change is not so good... (k3b-i18n package) %DEPENDS% -k3b>=1.0.5-1 +k3b>=$pkgver
You have a lot of packages in your cache :) I guess I had none of these so I didn't detect these issues. I am pretty sure all of them are related to that commit : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=eb1775e485f732014... The preservation of the quotes was actually the fix. Maybe there should be a guideline for licenses to not put quotes? However I am not sure these are problems with repo-add, instead of problems with the PKGBUILDs / packages. About the ARCH issue, the first PKGBUILD I checked didnt even have a arch variable... I am curious to see how the package looks like. Same for k3b and its pkgver issue.
On Fri, Feb 27, 2009 at 7:03 AM, Xavier <shiningxc@gmail.com> wrote:
On Fri, Feb 27, 2009 at 3:31 AM, Allan McRae <allan@archlinux.org> wrote:
Hi,
I took repo-add from the pacman package and one built from the latest git will all Xavier's patches and made a repo db from all packages in my cache (all of testing, core and extra, some community). There are a few differences (see http://dev.archlinux.org/~allan/repoadd-diff.txt). A summary of the differences:
A bunch of packages have the ARCH field removed: -%ARCH% -i686 Hmm, this I'm not sure about.
A few differences to do with quotes. e.g. -custom:INTEL537 +custom:"INTEL537" and +%DESC% +Efficient bit vector, set of integers and "big int" math library
Exactly. This was the exact description that brought about that other fix in the first place. You can't have your cake both ways.
This change is not so good... (k3b-i18n package) %DEPENDS% -k3b>=1.0.5-1 +k3b>=$pkgver
This happened in the makepkg stage, and I will bet a lot of money you will find the following in the PKGBUILD: depends=('k3b>=$pkgver') rather than depends=("k3b>=$pkgver")
(single vs. double quotes) The only thing we do differently now is actually respect the *entire* text string, so this variable is no longer (incorrectly) substituted.
You have a lot of packages in your cache :) I guess I had none of these so I didn't detect these issues. I am pretty sure all of them are related to that commit : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=eb1775e485f732014...
The preservation of the quotes was actually the fix. Maybe there should be a guideline for licenses to not put quotes?
However I am not sure these are problems with repo-add, instead of problems with the PKGBUILDs / packages. About the ARCH issue, the first PKGBUILD I checked didnt even have a arch variable... I am curious to see how the package looks like. Same for k3b and its pkgver issue.
On Fri, Feb 27, 2009 at 2:28 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Fri, Feb 27, 2009 at 7:03 AM, Xavier <shiningxc@gmail.com> wrote:
On Fri, Feb 27, 2009 at 3:31 AM, Allan McRae <allan@archlinux.org> wrote:
Hi,
I took repo-add from the pacman package and one built from the latest git will all Xavier's patches and made a repo db from all packages in my cache (all of testing, core and extra, some community). There are a few differences (see http://dev.archlinux.org/~allan/repoadd-diff.txt). A summary of the differences:
A bunch of packages have the ARCH field removed: -%ARCH% -i686 Hmm, this I'm not sure about.
These packages don't have the arch set in their PKGINFO. So it is also missing from the database, as expected. It was actually a bug in repo-add 3.2.2 : the arch variable, unlike all the other variables is not declared anywhere and is not declared as local. So when the old code did eval "arch=i686", it created a global arch variable. So you just have to call db_write_entry with one arch, then arch will be set. And you can add other packages with no arch, they will just use the old value of $arch. The new code does declare arch=i686, which declares the arch variable with a local scope, so the value is not kept on further calls of db_write_entry. The only thing to keep from that is that maybe we should check that all variables used are indeed explicitly declared as local in db_write_entry. $arch could be the only one missing though.
This change is not so good... (k3b-i18n package) %DEPENDS% -k3b>=1.0.5-1 +k3b>=$pkgver
This happened in the makepkg stage, and I will bet a lot of money you will find the following in the PKGBUILD: depends=('k3b>=$pkgver') rather than depends=("k3b>=$pkgver")
(single vs. double quotes) The only thing we do differently now is actually respect the *entire* text string, so this variable is no longer (incorrectly) substituted.
That is correct :)
Dan McGee wrote:
On Fri, Feb 27, 2009 at 7:03 AM, Xavier <shiningxc@gmail.com> wrote:
On Fri, Feb 27, 2009 at 3:31 AM, Allan McRae <allan@archlinux.org> wrote:
Hi,
I took repo-add from the pacman package and one built from the latest git will all Xavier's patches and made a repo db from all packages in my cache (all of testing, core and extra, some community). There are a few differences (see http://dev.archlinux.org/~allan/repoadd-diff.txt). A summary of the differences:
A bunch of packages have the ARCH field removed: -%ARCH% -i686
Hmm, this I'm not sure about.
Following Xavier's hint in an earlier reply, these are all packages that were build a long time ago - before the arch field in PKGBUILD. e.g.
pacman -Si barcode | grep Build Build Date : Sun 22 Feb 2004 14:10:37 EST (!!!!)
These will not really matter until something happens that force a rebuild of the repo-db. They could probably all do with a rebuild to get newer optimization and fix man paths, etc, anyway.
A few differences to do with quotes. e.g. -custom:INTEL537 +custom:"INTEL537" and +%DESC% +Efficient bit vector, set of integers and "big int" math library
Exactly. This was the exact description that brought about that other fix in the first place. You can't have your cake both ways.
This change is not so good... (k3b-i18n package) %DEPENDS% -k3b>=1.0.5-1 +k3b>=$pkgver
This happened in the makepkg stage, and I will bet a lot of money you will find the following in the PKGBUILD: depends=('k3b>=$pkgver') rather than depends=("k3b>=$pkgver")
And we have a winner! This is in the .PKGINFO file: depend = k3b>=$pkgver I guess a bug report, and maybe a namcap check, is in order. Allan
On Fri, Feb 27, 2009 at 3:00 PM, Allan McRae <allan@archlinux.org> wrote:
Following Xavier's hint in an earlier reply, these are all packages that were build a long time ago - before the arch field in PKGBUILD.
e.g.
pacman -Si barcode | grep Build Build Date : Sun 22 Feb 2004 14:10:37 EST (!!!!)
These will not really matter until something happens that force a rebuild of the repo-db. They could probably all do with a rebuild to get newer optimization and fix man paths, etc, anyway.
From my ignorant point of view, the only thing for which I understand
I always think it is a good idea to rebuild packages after a while, even to just check they still build with current gcc, the source is still valid, and also to make use of the makepkg and repo-add improvements that could have happened. Avoiding too old packages should increase the overall quality of the packages set. But about this specific problem of the ARCH field missing, it is a problem at all? I am actually not sure what this ARCH field is for, isn't it only used on pacman -Si operation, which is totally harmless? The arch is not displayed and that's it. I actually don't know why is a arch field needed anywhere. in PKGBUILD and .PKGINFO and desc. the use is CARCH in makepkg.conf and putting the CARCH in package filenames, so that we know for which arch a package is. Following this point of view, if we want to avoid depending on filenames, it also makes sense to put it in .PKGINFO inside the package. Then I just have to understand how is the arch field in pkgbuild and in the database useful. :)
participants (3)
-
Allan McRae
-
Dan McGee
-
Xavier