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

How to include an entire directory? #20

Closed
yuriusu22 opened this issue Jul 5, 2020 · 3 comments
Closed

How to include an entire directory? #20

yuriusu22 opened this issue Jul 5, 2020 · 3 comments

Comments

@yuriusu22
Copy link
Contributor

yuriusu22 commented Jul 5, 2020

EDIT

I found the line for the directory recursion:

data_tarfile.add(input_file_path, arcname=output_file, recursive=False)

Note: Setting recursive=False to True will enable directory recursion.
From Python docs: tarfile.TarFile.add

I think recursion should be enabled by default.


I can't figure out how to include a directory. Does packaging an entire directory supported?

Suppose I have this setup:

.
├── bin
│   └── script
└── manifest.json

Can we just include the directory bin and be placed directly to the prefix (similar to how package.json#files works in npm)? Something like this:

"files": {
  "bin": "."
}

Would somehow result to this:

/data/data/com.termux/files/usr/bin/script

It would be very helpful for large number of files.

@ghost
Copy link

ghost commented Jul 5, 2020

No, directory inclusion is not supported.

And generally, in my opinion, this script should be completely rewritten to use dpkg-deb for creating debfiles. This would fix issues like #18 and this one as packaging will be offloaded to standard utility for making debfiles.

@yuriusu22
Copy link
Contributor Author

No, directory inclusion is not supported.

As a workaround to my problem, I've edited the Python script and enabled recursion to true (see my post above).

And generally, in my opinion, this script should be completely rewritten to use dpkg-deb for creating debfiles. This would fix issues like #18 and this one as packaging will be offloaded to standard utility for making debfiles.

I agree. It's been a couple of years since this is updated. It's time to rewrite this 😄 .

@yuriusu22
Copy link
Contributor Author

Closing as fix merged with pull #21.

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

1 participant