public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Useless messages (elog, ewarn, etc) in ebuilds
Date: Tue, 21 Aug 2012 14:35:38 +0100	[thread overview]
Message-ID: <20120821143538.21cc35f3@googlemail.com> (raw)
In-Reply-To: <20120821132457.4319.78667@localhost>

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

On Tue, 21 Aug 2012 15:24:57 +0200
Amadeusz Żołnowski <aidecoe@gentoo.org> wrote:
> We have "has_version" function to check if user has
> actually updated from relevant version.  Please use this to not
> confuse users who installed the package first time or are upgrading
> from Y to another version.

Doing it using has_version isn't really recommended, since...

...if EAPIs before 2 are involved, the order of pkg_ functions on an
upgrade, reinstall or downgrade might not be what you expect.

...the behaviour of has_version in the case of upgrades, reinstalls or
downgrades may not be what you expect.

...the behaviour of has_version in the case of upgrades, reinstalls or
downgrades is not what it used to be due to a non-EAPI-controlled
change in behaviour from Portage, meaning some documentation and
examples are now wrong, and the way you used to do it doesn't work any
more.

...an upgrade can result in the removal of two versions of a package,
not just one, if slots have changed.

It's thus much better to use REPLACING_VERSIONS (which is plural, and
this is important) rather than has_version, if you're asking about the
current package rather than another package.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-08-21 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 13:24 [gentoo-dev] Useless messages (elog, ewarn, etc) in ebuilds Amadeusz Żołnowski
2012-08-21 13:35 ` Ciaran McCreesh [this message]
2012-08-21 13:50   ` Amadeusz Żołnowski
2012-08-21 14:12     ` Ciaran McCreesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120821143538.21cc35f3@googlemail.com \
    --to=ciaran.mccreesh@googlemail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox