Discussion:
[Ltib] Host packages don't rebuild if the spec file is updated
Peter Barada
2014-07-16 17:30:23 UTC
Permalink
Stuart,

If I add a patch to libtool (that fixes an issue using file-5.14 on
Ubuntu-14.04 to identified shared objects; patch attached) and then rm
.host_wait_warning* and rerun ltib, the host version of libtool does
_not_ get rebuilt while installing host support packages.

This is due to the ./ltib script code:

my $spec_upd = @rpms && ( (stat($spec))[9] > (stat($rpms[0]))[9] )
&& ! $cf->{hostinst};

that prevents:

$r .= "spec file newer than rpm, " if $spec_upd;

from being executed whcich would trigger the rebuild.

Any idea why in CVS version 1.26 you conditionalised $spec_upd on not
forcing a build for the host?

In my world I use LTIB as part of continuous integration project on
multiple build servers (since I have nearly a dozen different build
configurations) and the build servers out of sync compared to my
workstation (since I ran "./ltib --hostcf -p libtool" to rebuild on my
workstation). On the build servers I have to forcibly remove the
libtool host .rpm to get them back in sync on the next build.

Thanks in advance!
--
Peter Barada
***@logicpd.com
Stuart Hughes
2014-07-17 08:04:29 UTC
Permalink
Hi Peter,

This was a while ago, but here's what I think the idea is behind this.

In normal circumstances (outside of LTIB), if you have an rpm package of
version x installed, if you try to re-install version x, it won't happen
unless you force it (as the version has not changed). So this is the
normal behaviour. In LTIB for the most part we're developing packages
for the target system, this behaviour is overridden for make the
development process simpler.

For the host packages, we want to enforce the rule that an rpm package
of a given version does not change, so unless you bump up the
version/release version of the package spec number, the package will not
re-install. I can't remember exactly why, but I had to do this because
without it we were running into problems (if I remember, I'll send
another email).

I think the "proper" solution is for you to bump the version/release of
the file.spec file. This will then install because not only has the rpm
modification time changed, but also the version has updated.

Regards, Stuart
Post by Peter Barada
Stuart,
If I add a patch to libtool (that fixes an issue using file-5.14 on
Ubuntu-14.04 to identified shared objects; patch attached) and then rm
.host_wait_warning* and rerun ltib, the host version of libtool does
_not_ get rebuilt while installing host support packages.
&& ! $cf->{hostinst};
$r .= "spec file newer than rpm, " if $spec_upd;
from being executed whcich would trigger the rebuild.
Any idea why in CVS version 1.26 you conditionalised $spec_upd on not
forcing a build for the host?
In my world I use LTIB as part of continuous integration project on
multiple build servers (since I have nearly a dozen different build
configurations) and the build servers out of sync compared to my
workstation (since I ran "./ltib --hostcf -p libtool" to rebuild on my
workstation). On the build servers I have to forcibly remove the
libtool host .rpm to get them back in sync on the next build.
Thanks in advance!
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
https://lists.nongnu.org/mailman/listinfo/ltib
Loading...