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 via email to