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

Relative paths #280

Open
mateor opened this issue Jan 29, 2014 · 3 comments
Open

Relative paths #280

mateor opened this issue Jan 29, 2014 · 3 comments

Comments

@mateor
Copy link
Owner

mateor commented Jan 29, 2014

I see that if the auto_patcher is invoked from some parent directory instead of from within the bundled directory, things like this are found

  cp: ap_scripts/config_template: No such file or directory
  /Developer/android/auto_patcher/auto_patcher: line 243: .config: No such file or directory

Also, it sounds like the log is then created and written to in the calling directory. This is sloppy and needs to be fixed.

@smartymcfly
Copy link

I have logs from other patches in the same place that patched successfully. I will post them if they will help.

@smartymcfly
Copy link

In that auto-patcher has not had a problem with this before, I think I may have screwed something up seeing that it has been years and this issue never came up.

I recently swapped drives and installed a fresh install of osx on CPU along with a fresh clone of autopatcher. I ran "git clone ....". Someone in xda posted it.. After I did that ran the bash.sh script. And added the auto_patcher to end of the PATHS osx file. Then ran auto-patcher ROM openpdroid from home directory. This a few weeks ago and the first patches were successfully, then when I ran it recently it did not autoupdate so I repeated a fresh auto-patcher clone like before and attempted to patch the rom... And posted the log somewhere around here.

Did I leave any necessary steps out or make a mistake on my end?
.

@mateor
Copy link
Owner Author

mateor commented Jan 31, 2014

Well, I haven't added it to my system path. That is done specifically so you can call the script from any directory. But as you noticed, the script is really designed (at this point) to be ran from the directory it is already in, i.e the folder created from the git clone.

We rely on some relative paths and that it what is breaking. Specifically, the log is being created from wherever you call it, and it cannot find the .config file, so it will not auto_update.

You can either just cd into the auto_patcher directory and then call the script from there (You can point toward a rom in any directory...for my workflow I put all the builds in a separate folder and my script call looks like ./auto_patcher ../../OfficialBuilds/romname.zip openpdroid. That will allow all the things we use to work.

I do intend to try and be a little more conscientious about all that, which is why I opened the issue. But I have a couple other things I need to solve first, if I can.

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

2 participants