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

Automated updates #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

mrzor
Copy link

@mrzor mrzor commented Feb 6, 2021

Version 1 of the script with rehashes is ready. I've rebased it a few times to have just one commit properly written. I've worked out a few bugs but found it to be working allright at this point.

Compared to version 0, this comes with:

  • default release channel is release
  • proper arg parser
  • some amount of documentation
  • way, way less bugs

Let me know how you like the resulting PKGBUILD.new

@mrzor mrzor mentioned this pull request Feb 6, 2021
@mrzor mrzor force-pushed the automated-updates branch 3 times, most recently from 3871c45 to 4a867ab Compare February 7, 2021 00:17
@gardotd426
Copy link
Owner

Hey for some reason I've noticed that the script isn't actually changing anything anymore. I just get this:

2021-09-19 19:52:40.814 | INFO     | __main__:pkgbuild_patch_pkg:174 - Upgrading i3-snapshot from current 1.0-1ubuntu1~ppa1 to 1.0.1-2hirsute
2021-09-19 19:52:40.814 | ERROR    | __main__:pkgbuild_patch_pkg:184 - Found 3 matches for i3-snapshot_1.0-1ubuntu1~ppa1 in PKGBUILD. Not patching.

@mrzor
Copy link
Author

mrzor commented Sep 20, 2021

I will have a look at it this evening and try to make a patch.
I believe moving towards a template-based logic instead of a patch-based logic would make the script much more robust. I'm surprised it held this long :)

@gardotd426
Copy link
Owner

It's broken somehow :\

2021-10-18 01:09:15.484 | SUCCESS  | __main__:crawl_upstream:86 - Wrote upstream pkg data to upstream_pkg_data.pickle
Traceback (most recent call last):
  File "/home/matt/nvme2/dev/regolith-git/./pull-upstream.py", line 364, in <module>
    main()
  File "/home/matt/.local/lib/python3.9/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/matt/.local/lib/python3.9/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/matt/.local/lib/python3.9/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/matt/.local/lib/python3.9/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/matt/nvme2/dev/regolith-git/./pull-upstream.py", line 352, in main
    pkgbuild_pkgs = pkgbuild_parse(pkgbuild_lines)
  File "/home/matt/nvme2/dev/regolith-git/./pull-upstream.py", line 143, in pkgbuild_parse
    src_result = pkgbuild_end_eval("echo ${source[@]}")
  File "/home/matt/nvme2/dev/regolith-git/./pull-upstream.py", line 137, in pkgbuild_end_eval
    result = subprocess.run(f"echo '{shell_src}' | cat PKGBUILD - | bash -s",
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'echo 'echo ${source[@]}' | cat PKGBUILD - | bash -s' returned non-zero exit status 2.

@mrzor
Copy link
Author

mrzor commented Oct 18, 2021

Good evening! Thanks for the reminder :) I finally had a look - the error came from the fact that the current PKGBUILD has no trailing newline. The script is now able to cope with that corner case, and works again. Thanks for keeping everything up to date :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants