public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Francesco Riosa <vivo75@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Versioning of eclasses and possibly functions inside ebuilds
Date: Wed, 28 Dec 2011 13:12:37 +0000	[thread overview]
Message-ID: <CAD6zcDzTL2LeEwe-DRyH7b=UqBm+7TJ1xMgz_Nb0zQiuzkuNnQ@mail.gmail.com> (raw)

Disclaimer: this is just one idea that come at lunch, and sharing (in
a short pause before my demanding daughter request me) here to not
forget in the next busy days.

Seem to me that append a time slice to the function, in the name or as
a parent function that call the underling function can solve most of
the versioning/deprecation problems

how could it work:

1) package manager record the time it start an emerge "transaction",
and share it via the environment with ebuilds and eclasses. The time
could be faked by an argument via command line too.
2) the bash functions which are "versioned" this way chose the right one
3) package manager save the build time in the binpkg and in /var/db
for unmergin and other purposes

notice, the time must be a fixed one, the one @ which emerge @world
start or a provided one, not a varying one alas  gettimeofday()

pro of this approach (in random order)
- new function can be tested in tree faking a future date, no overlays
needed, no masks, users and PM can see future changes sooner
- automatic versioning, expired functions can be kept in eclass or
ebuild for any chosen time with little waste
- joining date of build and time versioned eclasses can make debugging easyer
- in case user encounter a bug which has not been spotted/reported
prior to the function activation become easy to fake a past date as
emerge date and leave the developers the time to fix properly
- future changes are defined in code, where everyone can see them

cons
- require package manager changes
- must be done resilient to developer errors like overlapping slices of time

toughs?
Francesco R.



             reply	other threads:[~2011-12-28 13:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 13:12 Francesco Riosa [this message]
2011-12-28 19:01 ` [gentoo-dev] Versioning of eclasses and possibly functions inside ebuilds Zac Medico
2011-12-29  2:28   ` Francesco Riosa
2011-12-28 19:21 ` Zac Medico
2011-12-29  2:37   ` Francesco Riosa
2011-12-29  3:36     ` Brian Harring
2011-12-29 10:49       ` Francesco Riosa
2011-12-29 15:28       ` Jeroen Roovers

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='CAD6zcDzTL2LeEwe-DRyH7b=UqBm+7TJ1xMgz_Nb0zQiuzkuNnQ@mail.gmail.com' \
    --to=vivo75@gmail.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