[pacman-dev] [PATCH] makepkg: detect incorrect unsage of >= in provides

Dan McGee dpmcgee at gmail.com
Thu Jan 1 21:51:33 EST 2009

On Thu, Jan 1, 2009 at 8:38 PM, Allan McRae <allan at archlinux.org> wrote:
> Xavier wrote:
>> On Thu, Jan 1, 2009 at 7:16 PM, Allan McRae <allan at archlinux.org> wrote:
>>> Using >= in the provides array is stupid so make it cause an error.
>>> Fixes FS#12540.
>>> Also, use bash substitution rather than spawning new processes where
>>> possible in the error checking.  Move split package detection to a
>>> better position.
>> Only checking for >= looks strange to me, what about all the others :
>> < , >, <=, etc..
>> Maybe we could simply prevent < and > in the provision, using the same
>> bash substitution than for -.
> I figure providing < or <= is sane.  I will add the check for >.
> I can't use bash substitution because this is an array (unless I loop
> there).

       provides (array)
           An array of "virtual provisions" that this package provides. This
           allows a package to provide dependencies other than its own package
           name. For example, the dcron package can provide cron, which allows
           packages to depend on cron rather than dcron OR fcron. Versioned
           provisions are also possible, in the name=version format. For
           example, dcron can provide cron=2.0 to satisfy the cron>=2.0
           dependency of other packages.

Maybe the manpage isn't clear enough. This was where we originally
used provides=('cron 2.0'), but we hit a lot of issues with space
parsing, so Nagy, Xavier and I decided to just cave and use the = sign
instead, knowing full well that we would then see people attempt to
use the versioned operators.

Versioned operators are NOT allowed here. Ever. Want to maybe make the
docs a bit clearer while you are at it?


More information about the pacman-dev mailing list