Skip to content
This repository has been archived by the owner. It is now read-only.

timestamp based rebuilds thinks everything needs to be rebuilt after "git merge" instead of "git rebase" #1023

Closed
ollieparanoid opened this issue Dec 19, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@ollieparanoid
Copy link
Member

commented Dec 19, 2017

@MoreRobustThanYou wrote:

here's the verbose output for pmbootstrap -v build binutils-armhf: https://pastebin.com/KaSUiQuz

You have the timestamp based rebuilds feature enabled, in which we ask git how much has changed in your aports folder when compared to origin. Usually that should only be what you are working on, e.g. a few APKBUILDs or python files at most. But in your case, there are tons of files.

This is how I think most people use git with pmbootstrap.

Initial clone:

git clone https://github.com/postmarketOS/pmbootstrap
cd pmbootstrap
git remote add git remote add -f MoreRobustThanYou git@github.com:MoreRobustThanYou/pmbootstrap

Updating master (which points to postmarketOS/pmbootstrap):

git checkout master
git pull

Updating your repo:

git fetch MoreRobustThanYou

Workarounds:

  • Disable timestamp based rebuilds
  • Clone the repo as described above

Some questions to help debugging this:

  • How did you setup your repo?
  • How do you integrate new changes? (you mentioned merging them?)
@ollieparanoid

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2017

rroij reported the same issue in #postmarketOS along with this log of pmbootstrap install -v: http://lpaste.net/raw/517125057554677760

Just like in @MoreRobustThanYou's log, the list after "(006749) [22:15:17] % cd /home/my_pc_user/git/pmbootstrap && git diff --name-only origin" is very long.

I understand the problem now. pmbootstrap expects that you rebase on master when updating the source in your branches. But in both your cases you guys run git merge master, after which pmbootstrap can't properly detect what you have changed compared to master anymore and thinks that everything was modified.

My approach to fix this is better documentation in the porting guide.

@MoreRobustThanYou: you could either change the way you use git (rebase master instead of git merge) or disable timestamp based rebuilds in pmbootstrap init.

@ollieparanoid ollieparanoid changed the title Corner case for timestamp based rebuilds timestamp based rebuilds thinks everything needs to be rebuilt after "git merge" instead of "git rebase" Dec 22, 2017

@rrooij

This comment has been minimized.

Copy link
Contributor

commented Dec 24, 2017

It would be nice to see this fixed. I prefer merging because I have to commit or stash my working tree when using git rebase.

@ollieparanoid

This comment has been minimized.

Copy link
Member Author

commented Dec 25, 2017

I can look into this some time after the blog post has been released - for now I recommend to disable timestamp based rebuilds if you use git merge. Just remember to pmbootstrap build --force all packages you have modified.

ollieparanoid added a commit that referenced this issue Jan 27, 2018

Remove timestamp based rebuilds
If you want to build a package without changing the version number,
please use `--force` from now on. For example:

    pmbootstrap build --force hello-world

Prior to this commit, changes were detected automatically (timestamp
based rebuilds). However, that feature does not work as expected with
the binary package repository we have now, and depending on how you use
git, it has never worked. Close #1167, close #1156, close #1023 and
close #985.

ollieparanoid added a commit that referenced this issue Jan 27, 2018

Remove timestamp based rebuilds
If you want to build a package without changing the version number,
please use `--force` from now on. For example:

    pmbootstrap build --force hello-world

Prior to this commit, changes were detected automatically (timestamp
based rebuilds). However, that feature does not work as expected with
the binary package repository we have now, and depending on how you use
git, it has never worked. Close #1167, close #1156, close #1023 and
close #985.

ollieparanoid added a commit that referenced this issue Jan 28, 2018

Remove timestamp based rebuilds (#1174)
If you want to build a package without changing the version number,
please use `--force` from now on. For example:

    pmbootstrap build --force hello-world

Prior to this commit, changes were detected automatically (timestamp
based rebuilds). However, that feature does not work as expected with
the binary package repository we have now, and depending on how you use
git, it has never worked. Close #1167, close #1156, close #1023 and
close #985. This commit also mentions --force when a package is up to date,
but the user requested to build it.

PureTryOut added a commit that referenced this issue Feb 21, 2018

Remove timestamp based rebuilds (#1174)
If you want to build a package without changing the version number,
please use `--force` from now on. For example:

    pmbootstrap build --force hello-world

Prior to this commit, changes were detected automatically (timestamp
based rebuilds). However, that feature does not work as expected with
the binary package repository we have now, and depending on how you use
git, it has never worked. Close #1167, close #1156, close #1023 and
close #985. This commit also mentions --force when a package is up to date,
but the user requested to build it.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.