Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoproj update tries to patch even when patch is removed from overrides.yml and patch file was deleted #286

Open
mmaurus opened this issue Sep 19, 2019 · 6 comments

Comments

@mmaurus
Copy link

mmaurus commented Sep 19, 2019

In my buildconf overrides.yml, I had an override applying a patch.
This is not needed anymore, so I deleted the patch file and commented out / removed the override.
Still, aup is trying to patch the package.

@mmaurus
Copy link
Author

mmaurus commented Sep 23, 2019

Update: I found a hidden folder ".autobuild-patches" in the repo folder, which should have been patched before.
There I have a file with name "0" which is a copy of the original patch file.
Looks like this will be used by autoproj update instead of the original patch.

@doudou
Copy link
Member

doudou commented Sep 23, 2019

This patch file is saved here so that autoproj is able to un-patch the package once you removed the patch. The behavior you describe should not happen, and did actually not in the test I just did.

One possibility is that the same patch is applied elsewhere. autoproj show <package> will display a 'patches' line.

$ autoproj show gui/collada_dom

source package gui/collada_dom
  source definition
    type: archive
    url: http://downloads.sourceforge.net/project/collada-dom/Collada%20DOM/Collada%20DOM%202.4/collada-dom-2.4.0.tgz
    archive_dir: collada-dom-2.4.0
    patches: [["/home/doudou/tmp/autobuild_unpatch/autoproj/remotes/rock/patches/collada.patch", 1]]
    update_cached_file: false

$ echo "- gui/collada_dom: { patches: [] }" > autoproj/overrides.d/00-nopatch.yml
$ autoproj show gui/collada_dom                                                  
source package gui/collada_dom
  source definition
    type: archive
    url: http://downloads.sourceforge.net/project/collada-dom/Collada%20DOM/Collada%20DOM%202.4/collada-dom-2.4.0.tgz
    archive_dir: collada-dom-2.4.0
    patches: []

$ aup gui/collada_dom 
  operating system: ubuntu,debian - 19.04,disco,dingo
  patching gui/collada_dom: unapplying 1 patch(es)
  already up-to-date gui/collada_dom
  environment already up-to-date

You can see that the patches got removed after I overrode the original version control.

@mmaurus
Copy link
Author

mmaurus commented Sep 24, 2019

Ok. I should have mentioned it before.
The difference is, that I switched to a newer branch which made the patch obsolete.
First I was on branch 1.0.0 + patch, then on master without patch

@doudou
Copy link
Member

doudou commented Sep 25, 2019

Still not able to get it to fail. Autobuild unpatches before updating/checking out (as it should):

[...p/autobuild_unpatch]% aup autobuild-unpatch-test 
  operating system: ubuntu,debian - 19.04,disco,dingo
  autobuild-unpatch-test: switching to branch master
  updated autobuild-unpatch-test
  patching autobuild-unpatch-test: applying 1 patch(es)
  WARN: autobuild-unpatch-test from main configuration does not have a manifest
  environment already up-to-date
Command finished successfully at 2019-09-25 11:13:17 -0300 (took 2 secs)

 (11:13) doudou@narinari 
[...p/autobuild_unpatch]% aup autobuild-unpatch-test
  operating system: ubuntu,debian - 19.04,disco,dingo
  patching autobuild-unpatch-test: unapplying 1 patch(es)
  autobuild-unpatch-test: switching to branch branched
  updated autobuild-unpatch-test
  WARN: autobuild-unpatch-test from main configuration does not have a manifest
  environment already up-to-date
Command finished successfully at 2019-09-25 11:13:28 -0300 (took 2 secs)

Would you by any chance saved the output of autoproj corresponding to what you think is "aup is trying to patch the package." ?

@skasperski
Copy link

I had the same issue and it was "solved" after I removed the package and let autoproj download it again. So I guess it was due to the patch being saved inside the repository as well.

@doudou
Copy link
Member

doudou commented Sep 26, 2019

Gents, thanks for taking the time to report. However, as it is, I don't have actionable information. So far, all reproduction cases I tried to have failed.

If it happens to you again, please save the console output and log files. It would be very helpful in seeing what's actually happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants