Skip to content

vyos-1x-vmware: T3681: Remove extra -x flag from Python bytecompile#4542

Merged
c-po merged 1 commit intovyos:currentfrom
yunzheng:T3681-remove-ppp
Jun 15, 2025
Merged

vyos-1x-vmware: T3681: Remove extra -x flag from Python bytecompile#4542
c-po merged 1 commit intovyos:currentfrom
yunzheng:T3681-remove-ppp

Conversation

@yunzheng
Copy link
Copy Markdown
Contributor

@yunzheng yunzheng commented Jun 2, 2025

Change summary

It seems there can be only one -x flag defined to python3 -m compileall command, so the second -x /ppp/ overrides the first -x /vmware-tools/scripts/, meaning that #4525 did not actually solve the issue :(

This extra PR removes the erroneous -x /ppp/ flag. With the -x /ppp/ removed I can confirm the __pycache__ is not there in the package.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T3681

Related PR(s)

#4525

How to test / Smoketest result

How to verify this PR after the package has been built:

$ dpkg -c vyos-1x-vmware_1.5dev0-3109-g08dc2e56b+dirty_all.deb
drwxr-xr-x root/root         0 2023-09-10 13:42 ./
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/scripts/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/scripts/resume-vm-default.d/
-rwxr-xr-x root/root      2079 2023-09-10 13:42 ./etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py
-rw-r--r-- root/root        33 2023-09-10 13:42 ./etc/vmware-tools/tools.conf
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/doc/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/
-rw-r--r-- root/root       322 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/changelog.gz
-rw-r--r-- root/root      1261 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/copyright

There should be no __pycache__ directory in the package.

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 2, 2025

👍
No issues in PR Title / Commit Title

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 2, 2025

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@c-po c-po requested review from dmbaturin and sever-sever June 2, 2025 20:17
Copy link
Copy Markdown
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wonder why this is done inside the test make target, and not somewhere else inside the Makefile at a different place - or handled via Debian rules.

I also found some __pycache__ folders under:

  • /usr/libexec/vyos/services/api/rest/__pycache__
  • /usr/libexec/vyos/services/api/rest/__pycache__
  • ...
  • /usr/libexec/vyos/conf_mode/__pycache__
  • /usr/libexec/vyos/system/__pycache__
  • /usr/libexec/vyos/completion/__pycache__
  • /usr/libexec/vyos/completion/qos/__pycache__
  • /usr/libexec/vyos/activate/__pycache__
    ...

@yunzheng
Copy link
Copy Markdown
Contributor Author

yunzheng commented Jun 8, 2025

I actually wonder why this is done inside the test make target, and not somewhere else inside the Makefile at a different place - or handled via Debian rules.

I also found some __pycache__ folders under:

  • /usr/libexec/vyos/services/api/rest/__pycache__
  • /usr/libexec/vyos/services/api/rest/__pycache__
  • ...
  • /usr/libexec/vyos/conf_mode/__pycache__
  • /usr/libexec/vyos/system/__pycache__
  • /usr/libexec/vyos/completion/__pycache__
  • /usr/libexec/vyos/completion/qos/__pycache__
  • /usr/libexec/vyos/activate/__pycache__
    ...

I have no idea why this is, maybe to compile everything so testing is consistent performance wise?

I have not touched the other vyos-1x-* packages regarding __pycache__ files, but I think these files are harmless. I did found that it's not best practice to leave these in: https://udd.debian.org/lintian-tag/package-installs-python-pycache-dir

@c-po c-po added bp/sagitta Create automatic backport for sagitta LTS version bp/circinus Create automatic backport for circinus labels Jun 15, 2025
@c-po c-po merged commit 28deb2d into vyos:current Jun 15, 2025
15 of 16 checks passed
@github-actions github-actions bot added rebase mirror-initiated This PR initiated for mirror sync workflow labels Jun 15, 2025
@vyosbot vyosbot added mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bp/circinus Create automatic backport for circinus bp/sagitta Create automatic backport for sagitta LTS version current mirror-completed rebase

Development

Successfully merging this pull request may close these issues.

3 participants