Re: [android-building] build.prop not being recreated on rebuilds android-4.2.2_r1

1,401 views
Skip to first unread message

Ying Wang

unread,
Mar 11, 2013, 9:33:26 PM3/11/13
to android-...@googlegroups.com
What files did you change?
Unfortunately in general makefile-only change won't trigger rebuild of target.
For the build.prop file, you can get the dependency in build/core/Makefile by searching for INSTALLED_BUILD_PROP_TARGET:
$(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $(BUILD_SYSTEM)/version_defaults.mk $(system_prop_file)
Unless any of those files gets changed, build.prop won't be rebuilt.

On Mon, Mar 11, 2013 at 12:41 PM, Paul Beeler <spar...@gmail.com> wrote:
I'm hoping someone can elaborate on this issue I'm having.  Say I do a clean build of otapackage.  Then I change something in the source and rebuild (not clean).  The build.prop does not seem to change at all with time and date stamps.  I know there was a change added in 4.2.2_r1 in the build repository to clean build.prop but it doesn't seem to be working for rebuilds.  Is there a way to force a automatic removal of it in the build environment without having to manually delete it from my build output directory?  I'm using a non standard output directory but I set that prior to building so the build environment already knows where the output is.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Paul Beeler

unread,
Mar 12, 2013, 12:36:02 AM3/12/13
to android-...@googlegroups.com

Thanks Ying, all I'm really changing is cherry-picking some merged frameworks/base patches from master branch.  So most of the time I don't need to do a complete clean rebuild.  The build environment picks up the changes and rebuilds the necessary code changes after the cherry-picks.  I'm not trying to seem knit-picky, was just wondering why it doesn't recreate that part when if the build date and UTC date changes.  I'm using a workaround by using a bash build script that removes it manually before each build.  But it seems like there could be a easier more automated way to do it through the build environment?

Jean-Baptiste Queru

unread,
Mar 12, 2013, 8:23:13 AM3/12/13
to android-...@googlegroups.com
One of the cardinal rules of a build system is that when running
"make" after completing a build, there should be no work done at all.
Specifically, timestamps don't get updated: neither the ones on the
filesystem, nor the ones set by __TIME__ in C, nor the ones in tar or
zip archives, and (similarly) not the ones in build.prop.

JBQ
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Paul Beeler

unread,
Mar 20, 2013, 12:51:19 PM3/20/13
to android-...@googlegroups.com

Thank you.  I completely forgot about the makeinstallclean command was available.  Most likely I will add that to my bash script for rebuilds.  Most changes to framework such as master branch patch patches causes many things to rebuild besides frameworks-res.apk or systemui.apk.  Or for example bionic which causes most of shared libraries to rebuild.

On Mar 18, 2013 8:40 AM, "Nicholas M" <thefasc...@gmail.com> wrote:
Paul,
JBQ gave you the official/professional answer, and he's right. As far as workarounds, if you are trying to rebuild with no type of cleaning beforehand, there is no official way, or any real reason to make the build.prop reflect the new date and time.

The best "middle ground" I know of, where you can avoid the hassle of completely rebuilding, while still removing anything that needs (or may need) to be built again is running the command "makeinstallclean" in between your cherrypicking builds.

By running this, the build.prop will be cleaned in addition to many other elements. Obviously this can make your new build show the current date/time, however, one thing that could still be considered a drawback is the fact that the build time is only cut in half or so. It might be longer than you care to endure.

Hope you get it figured out. Honestly, since there's no real likelihood of this preference being supported in AOSP, you may as well stick with a script, which will always do exactly what you want, and doesn't require any support.

Jean-Baptiste Queru

unread,
May 27, 2013, 12:00:59 PM5/27/13
to android-...@googlegroups.com
Do a full build.

Seriously, the state of an incremental build is impractically hard to reproduce from scratch, so whatever build number you have in that case is only moderately relevant.

JBQ


On Sun, May 26, 2013 at 11:12 PM, Nirmal Kumar <nirm...@gmail.com> wrote:
Hi,

if i give incremental build. the build number is not updated in phone.

please help some one to display the correct build number in the phone.


On Tuesday, 12 March 2013 01:11:07 UTC+5:30, Paul Beeler wrote:
I'm hoping someone can elaborate on this issue I'm having.  Say I do a clean build of otapackage.  Then I change something in the source and rebuild (not clean).  The build.prop does not seem to change at all with time and date stamps.  I know there was a change added in 4.2.2_r1 in the build repository to clean build.prop but it doesn't seem to be working for rebuilds.  Is there a way to force a automatic removal of it in the build environment without having to manually delete it from my build output directory?  I'm using a non standard output directory but I set that prior to building so the build environment already knows where the output is.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages