* [gentoo-dev] Ebuild new install versus reinstall - how to tell?
@ 2004-01-05 22:50 Loyd Goodbar
2004-01-05 22:58 ` Jeremy Maitin-Shepard
2004-01-05 23:09 ` Daniel
0 siblings, 2 replies; 4+ messages in thread
From: Loyd Goodbar @ 2004-01-05 22:50 UTC (permalink / raw
To: gentoo-dev
I'm writing an ebuild, and would like to know whether this is the first time
the ebuild installs on the system, or whether it is being rebuilt.
This is for IBM iSeries Access for Linux that does some one-time ODBC driver
registration on the first install. Converting from the RPM file, RPM appears
to know whether it's a first time install. Emerge shows on the screen (N or
R).
I've looked through the ebuild and emerge man pages, they don't appear to
cover this.
Thanks,
Loyd
--
Mediocrity: It takes a lot less time and most people won't notice
the difference until it's too late. <http://www.despair.com/>
loyd@blackrobes.net ICQ#504581 http://www.blackrobes.net/
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Ebuild new install versus reinstall - how to tell?
2004-01-05 22:50 [gentoo-dev] Ebuild new install versus reinstall - how to tell? Loyd Goodbar
@ 2004-01-05 22:58 ` Jeremy Maitin-Shepard
2004-01-06 12:22 ` Paul de Vrieze
2004-01-05 23:09 ` Daniel
1 sibling, 1 reply; 4+ messages in thread
From: Jeremy Maitin-Shepard @ 2004-01-05 22:58 UTC (permalink / raw
To: gentoo-dev
Loyd Goodbar <loyd@blackrobes.net> writes:
> I'm writing an ebuild, and would like to know whether this is the first time
> the ebuild installs on the system, or whether it is being rebuilt.
Use `has_version'. See ebuild(5).
--
Jeremy Maitin-Shepard
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Ebuild new install versus reinstall - how to tell?
2004-01-05 22:50 [gentoo-dev] Ebuild new install versus reinstall - how to tell? Loyd Goodbar
2004-01-05 22:58 ` Jeremy Maitin-Shepard
@ 2004-01-05 23:09 ` Daniel
1 sibling, 0 replies; 4+ messages in thread
From: Daniel @ 2004-01-05 23:09 UTC (permalink / raw
To: loyd, gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 6 Jan 2004 08:20 am, Loyd Goodbar wrote:
> I'm writing an ebuild, and would like to know whether this is the first
> time the ebuild installs on the system, or whether it is being rebuilt.
>
Function has_version
usr/portage/app-sci/foldingathome/foldingathome-3.24.ebuild: if has_version
\>=glibc-2.3.0; then
You should be able to reference your own package.
- --
Daniel Black
- --
Proudly a Gentoo Linux User.
GnuPG/PGP signed and encrypted email preferred
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x32A64DC8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD4DBQE/+e60TDSbtjKmTcgRAtWyAKDghgGN0aQYB5FpEi/2FwtpXiDw9QCVHwzi
g8ChYZcQGC3qUoYd0nQ3Jw==
=CK4X
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Ebuild new install versus reinstall - how to tell?
2004-01-05 22:58 ` Jeremy Maitin-Shepard
@ 2004-01-06 12:22 ` Paul de Vrieze
0 siblings, 0 replies; 4+ messages in thread
From: Paul de Vrieze @ 2004-01-06 12:22 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 05 January 2004 23:58, Jeremy Maitin-Shepard wrote:
> Loyd Goodbar <loyd@blackrobes.net> writes:
> > I'm writing an ebuild, and would like to know whether this is the
> > first time the ebuild installs on the system, or whether it is being
> > rebuilt.
>
> Use `has_version'. See ebuild(5).
This function works. However to make things fool-proof it is normally
better to have a check on whether the package is actually registered
with odbc instead of using the previous install status. a has_version
check has many possibilities for errors when a state is inconsistent.
Paul
- --
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQE/+qh7bKx5DBjWFdsRAhnPAKDMEc2BJH1br8WKCNNfZ+uWs5SYmQCcCWGK
msSWETZPZOkkou00TzYAhe4=
=lVVg
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-06 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-05 22:50 [gentoo-dev] Ebuild new install versus reinstall - how to tell? Loyd Goodbar
2004-01-05 22:58 ` Jeremy Maitin-Shepard
2004-01-06 12:22 ` Paul de Vrieze
2004-01-05 23:09 ` Daniel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox