desktop: stop renaming desktop file#5150
desktop: stop renaming desktop file#5150soumyaDghosh wants to merge 747 commits intocanonical:feature/desktop-filesfrom
Conversation
dffe5e6 to
af19add
Compare
mr-cal
left a comment
There was a problem hiding this comment.
Do you know what effect this will have when running a snap on a system with snapd<2.66?
As I tested before, snapd will install the file with a <snap_name>, which snapd will do here also if the desktop file names aren't explicitly mentioned before hand. It was never really an issue to fix with. |
|
I think I'll need to fix the spread tests too. |
af19add to
32dea06
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/desktop-files #5150 +/- ##
========================================================
Coverage ? 89.71%
========================================================
Files ? 342
Lines ? 22641
Branches ? 0
========================================================
Hits ? 20312
Misses ? 2329
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
2883282 to
99f4e85
Compare
There was a problem hiding this comment.
After discussing during the Starcraft clinic, this should be a safe change to make. The only environment that wouldn't locate these new files is unity 8.
Approving to land in a feature branch so it can be published and tested before landing on main. Landing on main will require a new PR and approvals.
| target = gui_dir / f"{self._app_name}.desktop" | ||
| desktop_filename = os.path.basename(self._filename) | ||
|
|
||
| # Stop renaming the desktop file. From snapd 2.66 onwards, |
There was a problem hiding this comment.
this comment is very good, but I think we should drop the first sentence - it's awkward and potentially confusing to refer to something the code no longer does
| # in the format of {SNAP_NAME}_{APP_NAME}.desktop | ||
| # https://snapcraft.io/docs/desktop-interface | ||
| target = gui_dir / desktop_filename | ||
| if not (desktop_filename.endswith(".desktop")): |
There was a problem hiding this comment.
you can replace this code with a with_suffix(".desktop") call
>>> Path("file").with_suffix(".desktop")
PosixPath('file.desktop')
>>> Path("file.desktop").with_suffix(".desktop")
PosixPath('file.desktop')
|
|
||
| prime_dir = Path(f"{new_dir}/meta/gui") | ||
|
|
||
| yield prime_dir |
There was a problem hiding this comment.
| yield prime_dir | |
| return prime_dir |
|
This PR has a blocker
|
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan <callahan.kovacs@canonical.com> Co-authored-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> Co-authored-by: Callahan <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
* docs: update CONTRIBUTING.md * docs: remove HACKING.md * docs: clean up conf.py --------- Signed-off-by: JJ Coldiron <jj.coldiron@canonical.com>
Move its pages to the root of how-to collection.
Co-authored-by: Callahan <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> Co-authored-by: Callahan <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Imani Pelton <imani.pelton@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com> Co-authored-by: Michael DuBelko <michael.dubelko@canonical.com>
Using `--all-files` for pre-commit format affects more files than `make format` would otherwise do. Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Signed-off-by: Benjamin Schimke <benjamin.schimke@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Paul Mars <paul.mars@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Merges 8.10.2 into main.
Apparently this has been fixed it review-tools, we'll need to find the commit to verify. |
With snapd 2.66, it supports custom desktop file names. This patch allows it to happen from snapcraft side.
99f4e85 to
93d7283
Compare
With snapd 2.66, it supports custom desktop file names. This patch allows it to happen from snapcraft side.
tox run -m lint?tox run -e test-py310? (supported versions:py39,py310,py311,py312)