alad at mailbox.org

Eli Schwartz eschwartz at archlinux.org
Thu Mar 8 22:34:28 UTC 2018


On 03/08/2018 05:20 PM, Mikael Blomstrand wrote:
> I missed this before replying before since the thread switched name again.
> 
> OK, maybe I've misunderstood the purpose of replaces when reading the
> man page. It's been my impression that if package A replaces B, then A
> must be the "new" B, and everyone using B should switch to A. I just
> assumed that this also means A should be able to be used in place of B.
> 
> I had an idea that it would be nice to have merged packages "replaced"
> by the new base.
> 
> This might be completely stupid, but it was my thought.
> 
>     It is semantically wrong, as that is simply not what a "replaces"
>     keyword even means...
> 
> 
> Would you mind explaining what it means or what correct use would be if
> I've misunderstood the man pages? :)

If you are searching the AUR for packages that "provide" foo, adding
packages that "replace" it will not help you resolve dependencies.

It would help in the case where one package is deleted from the AUR and
renamed to something else, the same way it helps in the official
repositories when a package is deleted and renamed to something else.
However, in that case pacman tells you about the replacement and asks if
you would like to uninstall foo and install bar instead.

Therefore, if it would be an available search at all, then rather than
adding replaces to name and adding provides to a separate keyword, we
should do the exact opposite and add provides to name and name-desc
(which this thread is about), and add replaces to a separate keyword.

Then AUR helpers could theoretically offer to replace packages with
completely different "successor" packages, by searching all foreign
installed pkgnames and seeing if there is a replacement available. This
would be completely different from the "search for packages for
dependency resolution" bit.

>     Its only conceivable use would be to enable AUR packages to
>     automatically sync and replace existing packages, which would simply be
>     incorrect.
> 
> 
> Yes, having packages in AUR arbitrarily replace packages is obviously a
> bad idea. It's not really what I had in mind either. My thought was more
> that a AUR helper that is smart enough could see that an installed
> package has been removed from the AUR, and if there is a package in the
> AUR replacing that package, then it could ask the user if they want to
> look at the PKGBUILD for that instead.
> 
> This is relevant if a user installs package foo-bar which provides foo.
> When searching for "foo-bar", "foo" won't show up, because it doesn't
> provide "foo-bar". It could however replace "foo-bar".
> 
> Is this still unsound?

Well, as I said you do not want it available as "name", if I try to
install a given package then offering to install something totally
different is wrong. Even pacman will allow you to install a pkgname that
you specify regardless of whether there is a replaces available
instead.... And generally speaking, the rate at which the replaces
keyword is misused in AUR packages makes me think any implementation
would simply not work out in practice.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20180308/0045e599/attachment.asc>


More information about the aur-dev mailing list