Mailing List Archive

Extending -scm with upstream revision awareness
Since some people have been asking about this... Here's how I'd see
upstream revision awareness being added to the -scm proposal.

* add src_fetch_extra or whatever to avoid doing the fetches in
src_unpack.

* add pkg_scm_info. It outputs a string containing no spaces.

* When installing an scm package with suitable EAPI to VDB / exndbam,
rewrite the scm version to -scm@THE_INFO_OUTPUT.

* When doing a pretend install, consider reinstalling any scm package
that was installed more than $user_option ago, and mark it as "might
reinstall".

* When updating an scm package, do src_fetch_extra then pkg_scm_info.
At user option, if the pkg_scm_info value hasn't changed and it's a
reinstall, skip reinstalling.

* At user option, and not by default, do the fetch / info stage
*before* showing the "this is what we'll install" list.

--
Ciaran McCreesh
Re: Extending -scm with upstream revision awareness [ In reply to ]
Ciaran McCreesh wrote:
> * add src_fetch_extra or whatever to avoid doing the fetches in
> src_unpack.

good idea.

> * add pkg_scm_info. It outputs a string containing no spaces.

.live would need something a bit different.

> * When installing an scm package with suitable EAPI to VDB / exndbam,
> rewrite the scm version to -scm@THE_INFO_OUTPUT.

so -scm will have a @ metachar to point that what's following is the
hash/revision/reference to avoid clashes.
The info output would consider branches and tags as well?

> * When updating an scm package, do src_fetch_extra then pkg_scm_info.
> At user option, if the pkg_scm_info value hasn't changed and it's a
> reinstall, skip reinstalling.

> * At user option, and not by default, do the fetch / info stage
> *before* showing the "this is what we'll install" list.

Sounds quite interesting.

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list
Re: Extending -scm with upstream revision awareness [ In reply to ]
On Sat, 14 Jun 2008 18:30:59 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:
> > * When installing an scm package with suitable EAPI to VDB /
> > exndbam, rewrite the scm version to -scm@THE_INFO_OUTPUT.
>
> so -scm will have a @ metachar to point that what's following is the
> hash/revision/reference to avoid clashes.
> The info output would consider branches and tags as well?

The ID is merely equality comparable. So far as I'm aware, all scm
systems can give you at least one of:

* A numeric revision of whatever you've checked out (subversion r1234
etc)

* A string revision of whatever you've checked out (git sha1 IDs)

* When the last change was made. You can always do something like find
dir/ -type f -printf '%T@\n' | sort -n | tail -n1 if you're dealing
with a sucky SCM that has no global revisions... I suspect CVS is in
this boat, if anyone's still using it...

For subversion and git, this has the added devious advantage of making
the revision / ID easily visible.

--
Ciaran McCreesh
Re: Re: Extending -scm with upstream revision awareness [ In reply to ]
On Sun, 15 Jun 2008 19:47:02 +0200
Tiziano Müller <dev-zero@gentoo.org> wrote:
> > * When updating an scm package, do src_fetch_extra then
> > pkg_scm_info. At user option, if the pkg_scm_info value hasn't
> > changed and it's a reinstall, skip reinstalling.
>
> ... and reset the reference date "$user_option ago" is compared to to
> have it reconsidered in "$user_option ago" again.
> (or reset the date when this package got installed to the current
> date)

Mmm, I'd argue that going off when the package was actually installed
appears to be the sensible behaviour there, not going off when the last
attempt at installing the package was.

--
Ciaran McCreesh
Re: Extending -scm with upstream revision awareness [ In reply to ]
Ciaran McCreesh wrote:

> Since some people have been asking about this... Here's how I'd see
> upstream revision awareness being added to the -scm proposal.
>
> * add src_fetch_extra or whatever to avoid doing the fetches in
> src_unpack.
>
> * add pkg_scm_info. It outputs a string containing no spaces.
>
> * When installing an scm package with suitable EAPI to VDB / exndbam,
> rewrite the scm version to -scm@THE_INFO_OUTPUT.
>
> * When doing a pretend install, consider reinstalling any scm package
> that was installed more than $user_option ago, and mark it as "might
> reinstall".
>
> * When updating an scm package, do src_fetch_extra then pkg_scm_info.
> At user option, if the pkg_scm_info value hasn't changed and it's a
> reinstall, skip reinstalling.
... and reset the reference date "$user_option ago" is compared to to have
it reconsidered in "$user_option ago" again.
(or reset the date when this package got installed to the current date)

--
gentoo-dev@lists.gentoo.org mailing list