Skip to content

Commit b8f38ac

Browse files
laumannarthurzam
authored andcommitted
pkgdev mask: Extend mask comment template
To aid developers in writing comments for package.mask, extend the comment in the temporary file to include example comments. This is copied straight from the profiles/package.mask file in ::gentoo, except I've left out the author line and the actual mask line (those are added automatically). Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
1 parent a621b42 commit b8f38ac

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

src/pkgdev/scripts/pkgdev_mask.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import shlex
44
import subprocess
55
import tempfile
6+
import textwrap
67
from collections import deque
78
from dataclasses import dataclass
89
from datetime import datetime, timedelta, timezone
@@ -168,7 +169,24 @@ def __str__(self):
168169
def get_comment():
169170
"""Spawn editor to get mask comment."""
170171
tmp = tempfile.NamedTemporaryFile(mode='w')
171-
tmp.write("\n\n# Please enter the mask message. Lines starting with '#' will be ignored.\n")
172+
tmp.write(textwrap.dedent("""
173+
174+
# Please enter the mask message. Lines starting with '#' will be ignored.
175+
#
176+
# - Best last rites (removal) practices -
177+
#
178+
# Include the following info:
179+
# a) reason for masking
180+
# b) bug # for the removal (and yes you should have one)
181+
# c) date of removal (either the date or "in x days")
182+
#
183+
# Example:
184+
#
185+
# Masked for removal in 30 days. Doesn't work
186+
# with new libfoo. Upstream dead, gtk-1, smells
187+
# funny.
188+
# Bug #987654
189+
"""))
172190
tmp.flush()
173191

174192
editor = shlex.split(os.environ.get('VISUAL', os.environ.get('EDITOR', 'nano')))

0 commit comments

Comments
 (0)