dominic-p
Repos
23
Followers
3

Events

pull request opened
fix: Use xz compression to restore Debian stable support

The default compression on deb packages seems to have changed to zstd. Unfortunately, Debian does not support zstd (yet), so this specifies a friendlier format.

Note that I don't know a good way to test this at the moment. I'm open to suggestions though.

Fixes #482

Checklist

  • [x] I acknowledge that all my contributions will be made under the project's license
  • [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
  • [x] I have read the Contribution Guidelines and my PR follows them
  • [x] I have titled the PR appropriately
  • [x] I have updated my branch with the main branch
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added the necessary documentation about the functionality in the appropriate .md file
  • [ ] I have added inline documentation to the code I modified
Created at 1 week ago

Add comment explaining compression

Created at 1 week ago
pull request closed
fix[!]: Use xz compression to restore Debian support

The default compression on deb packages seems to have changed to zstd. Unfortunately, Debian does not support zstd (yet), so this specifies a friendlier format.

Note that I don't know a good way to test this at the moment. I'm open to suggestions though.

Fixes #482

Checklist

  • [x] I acknowledge that all my contributions will be made under the project's license
  • [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
  • [x] I have read the Contribution Guidelines and my PR follows them
  • [x] I have titled the PR appropriately
  • [x] I have updated my branch with the main branch
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added the necessary documentation about the functionality in the appropriate .md file
  • [ ] I have added inline documentation to the code I modified
Created at 1 week ago
pull request opened
fix[!]: Use xz compression to restore Debian support

The default compression on deb packages seems to have changed to zstd. Unfortunately, Debian does not support zstd (yet), so this specifies a friendlier format.

Note that I don't know a good way to test this at the moment. I'm open to suggestions though.

Fixes #482

Checklist

  • [x] I acknowledge that all my contributions will be made under the project's license
  • [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
  • [x] I have read the Contribution Guidelines and my PR follows them
  • [x] I have titled the PR appropriately
  • [x] I have updated my branch with the main branch
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added the necessary documentation about the functionality in the appropriate .md file
  • [ ] I have added inline documentation to the code I modified
Created at 1 week ago
create branch
dominic-p create branch iss-482
Created at 1 week ago
Created at 1 week ago
issue comment
Error upgrading on Debian 11

Thanks for the help, I really appreciate it. I'll start looking into dpkg --build to see if there's anything that could be tweaked.

Also, maybe I'm misunderstanding something, but from this page it appears that dpkg 1.21.18 is still only available in the testing version of Debian. Since I'm running a fully patched version of Bullseye (stable), it seems odd to me that my issue could be specific to my environment. If Debian is meant to be a supported OS, wouldn't the current stable release need to be supported?

I don't mean to be confrontational; I'm just genuinely trying to understand if there's something weird about my setup that I'm not aware of.

Created at 1 week ago
issue comment
Error upgrading on Debian 11

Thanks for the feedback. Could the pack & build commands be tweaked to not use zstd? Something changed a month or so ago in how the package was built. Could that change be reverted until Debian catches up to Ubuntu?

Again, I'd be happy to take a stab at it, but I'm new to the code base. Maybe someone could point me to where the Debian build is configured?

Created at 1 week ago
issue comment
Error upgrading on Debian 11

Thanks for the update! I downloaded the unstable 1.21.18 version of dpkg, and attempted to install it, but I ran into a dependency error. It looks like it depends on libc6 >=2.34 and my machine has 2.31. As this is a production machine it seems risky to start upgrading core components like libc, so I'm kind of stuck at the moment.

Any other ideas for workarounds we can try? Given the pace of Debian development, I'm guessing that dpkg 1.21.18 might take a while to reach stable. What can we do in the meantime? Is zstd compression a key feature? Can we just disable it until Debian catches up to Ubuntu?

Install command output for reference:

# dpkg --install dpkg_1.21.18_amd64.deb
dpkg: regarding dpkg_1.21.18_amd64.deb containing dpkg, pre-dependency problem:
 dpkg pre-depends on libc6 (>= 2.34)
  libc6:amd64 is installed, but is version 2.31-13+deb11u5.

dpkg: error processing archive dpkg_1.21.18_amd64.deb (--install):
 pre-dependency problem - not installing dpkg
Errors were encountered while processing:
 dpkg_1.21.18_amd64.deb
Created at 2 weeks ago
issue comment
Error upgrading on Debian 11

I'd be happy to submit a pull request, but I could some help getting oriented.

I searched the code base for zstd the other day and I came up empty. I'm guessing some default setting in a dependency got changed, but I couldn't find that either.

Created at 3 weeks ago
Created at 1 month ago
issue comment
Error upgrading on Debian 11

Friendly bump. Anyone else seeing Debian compatibility issues?

Created at 1 month ago
issue comment
[HPOS]: Documentation on `save_post` alternative hook

Thanks again for the helpful info. That should be a good workaround for now.

Created at 1 month ago
issue comment
[HPOS]: Documentation on `save_post` alternative hook

Ok, one last snag, if you have a moment. I need to localize some scripts that's I'm enqueuing in admin_enqueue_scripts. To do that I need access to the order object for the current page.

Right now, I'm using global $post and then wc_get_order( $post->ID ). Of course, global $post probably won't work with HPOS. I haven't been able to find a good substitute for that in the context of the admin_enqueue_scripts hook.

Created at 1 month ago
issue comment
[HPOS]: Documentation on `save_post` alternative hook

Thanks @barryhughes, that info is super helpful. I really appreciate it. :)

Created at 1 month ago
issue comment
[HPOS]: Documentation on `save_post` alternative hook

Hi @barryhughes, thanks for the response. I wasn't aware of those hooks. In particular, woocommerce_update_order should be great. A couple follow up questions:

  1. Do you know roughly when it was introduced (i.e. do I have to support both save_post and the new hook or can I just switch)?
  2. Do you know what kind of authentication data is available? For example, on save_post I'm able to use check_admin_referer() at the top of my function. Will this "Just Work" using the new hook?

Of course, I can just test both of these things, but if you know off the top of your head that saves me a bit of time. :) Thanks again for helping get me unstuck.

Created at 1 month ago
issue comment
[HPOS]: Documentation on `save_post` alternative hook

Friendly bump. I have a bit of time to work on this, and I would love to get HPOS compatibility nailed down if possible. Any suggestions for replacing the save_post hook at this point?

Created at 1 month ago
opened issue
Error upgrading on Debian 11

Issue Summary

When I attempt to upgrade the Twilio CLI package via apt on Debian I get the following error:

dpkg-deb: error: archive '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
Traceback (most recent call last):
  File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
    output = subprocess.check_output(command)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dpkg-deb', '-f', '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 323, in <module>
    main(config)
  File "/usr/bin/apt-listchanges", line 104, in main
    pkg = DebianFiles.Package(deb)
  File "/usr/share/apt-listchanges/DebianFiles.py", line 358, in __init__
    parser.readdeb(self.path)
  File "/usr/share/apt-listchanges/DebianFiles.py", line 127, in readdeb
    raise RuntimeError(_("Error processing '%(what)s': %(errmsg)s") %
RuntimeError: Error processing '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb': Command '['dpkg-deb', '-f', '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2.
Preconfiguring packages ...
dpkg-deb: error: archive '/tmp/apt-dpkg-install-cwYneZ/0-twilio_5.3.0-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-cwYneZ/0-twilio_5.3.0-1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2

From this SE post, I gather that the package is using a compression format that Debian's version of dpkg doesn't understand.

Steps to Reproduce

  1. Run apt update && apt upgrade on Debian 11 Bullseye

Technical details:

  • twilio-cli version: Current: 5.2.2, Attempting to upgrade to: 5.3.0
  • node version: 16.18.0
Created at 1 month ago
[HPOS]: Documentation on `save_post` alternative hook

Describe the solution you'd like

I've been working through updating my plugins for HPOS compatibility following the guide here. In general, it's been going smooth, but I'm hitting a snag as I try to update meta boxes on the admin order page.

I see instructions for everything but the save_post hook. Presumably that hook will no longer fire since orders will no longer be WP posts, but I can't seem to find any documentation on what to replace it with. The guide just says:

If it’s a filter or an action, then we will implement a similar filter in the new WooCommerce screen as well

Describe alternatives you've considered

I found what woocommerce-subscriptions-core did to solve the problem, but I'm really hoping there's a simpler way for smaller scale projects.

Additional context

No response

Created at 2 months ago
issue comment
Templates that need updating don't flush after migrating

Just by way of confirmation I'm seeing the same behavior after updating to 7.1.0. Only a theme change causes the updated template files to be recognized.

Created at 2 months ago
Created at 2 months ago
Start programatically

So cool! Thanks for that. :)

Created at 2 months ago