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

ak sparse: keep all dirs appart addons #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hparfr
Copy link
Member

@hparfr hparfr commented Feb 4, 2025

for odoo (src), we need to keep all the dirs and exclude ./addons/ the previous implementation was doing a ls. so it was not working if src was initialized with git clone --filter:blob=null because ls was returning nothing.

This implementation asks git to list all the dirs expected in .

also run a linter on the file

for odoo (src), we need to keep all the dirs and exclude ./addons/
the previous implementation was doing a `ls`. so it was not working
if src was initialized with `git clone --filter:blob=null` because
ls was returning nothing.

This implementation asks git to list all the dirs expected in .

also run a linter on the file
Copy link

@nayatec nayatec left a comment

Choose a reason for hiding this comment

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

Sorry, no, there is maybe a pb, i'll continue testing.

git["ls-tree"]["-d"]["--name-only"]["HEAD"]
)

# ls-files gives us all the files
Copy link

Choose a reason for hiding this comment

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

do you mean "ls-tree gives us all the directories" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, I changed the command but not the comment

paths += directories
paths.remove("addons") # remove ./addons/
Copy link

@nayatec nayatec Feb 5, 2025

Choose a reason for hiding this comment

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

What i found is :

  • when creating a project with no odoo modules listed in spec (as we have with the current copier) this patch is perfectly ok, (using ak clone && ak sparse && ak build) the docky build will succeed
  • but with a odoo module list (and an empty odoo/src) we will lack odoo/src/setup.py

Eventually we have to add someting like :
paths.append("setup.py")

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.

2 participants