-
Notifications
You must be signed in to change notification settings - Fork 448
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
meta: fix management of snap/local #2502
Conversation
Do not copy snap/local into the snap, furthermore, improve the copy logic to work better with embedded directories. Fixes SNAPCRAFT-J2 Fixes SNAPCRAFT-JB Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
e2f6bdb
to
f739eb7
Compare
Codecov Report
@@ Coverage Diff @@
## master #2502 +/- ##
=========================================
Coverage ? 89.92%
=========================================
Files ? 198
Lines ? 13356
Branches ? 2021
=========================================
Hits ? 12011
Misses ? 921
Partials ? 424
Continue to review full report at Codecov.
|
snap_dir_iter = itertools.product([prime_snap_dir], ["hooks"]) | ||
meta_dir_iter = itertools.product([self._meta_dir], ["hooks", "gui"]) | ||
|
||
for origin in itertools.chain(snap_dir_iter, meta_dir_iter): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit convoluted way to set src_dir and dst_dir, I hope we still understand the logic in the future. Perhaps we could add a small comment to clarify our intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation seems much better than the original one, but a brief comment in the iterator logic would make sure we won't be puzzled a few months/years from now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, reading the code again it seems pretty obvious. Go ahead.
Do not copy snap/local into the snap, furthermore, improve the copy
logic to work better with embedded directories.
Fixes SNAPCRAFT-J2
Fixes SNAPCRAFT-JB
Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com
./runtests.sh static
?./runtests.sh tests/unit
?