From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/portage/package/ebuild/, bin/
Date: Thu, 20 Sep 2012 17:20:08 +0000 (UTC) [thread overview]
Message-ID: <1348161594.8ba939d53e52a88c183a2db95d1e51f04b0d9bb6.zmedico@gentoo> (raw)
commit: 8ba939d53e52a88c183a2db95d1e51f04b0d9bb6
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 17:19:54 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 17:19:54 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8ba939d5
Add QA_DESKTOP_FILE variable.
---
bin/phase-functions.sh | 2 +-
man/ebuild.5 | 5 +++++
pym/portage/package/ebuild/doebuild.py | 27 ++++++++++++++++++++++++++-
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 92e25c6..2b93231 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -560,7 +560,7 @@ __dyn_install() {
if [[ $CATEGORY != virtual ]] ; then
for f in ASFLAGS CBUILD CC CFLAGS CHOST CTARGET CXX \
CXXFLAGS EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \
- LDFLAGS LIBCFLAGS LIBCXXFLAGS ; do
+ LDFLAGS LIBCFLAGS LIBCXXFLAGS QA_DESKTOP_FILE ; do
x=$(echo -n ${!f})
[[ -n $x ]] && echo "$x" > $f
done
diff --git a/man/ebuild.5 b/man/ebuild.5
index 1ac1f92..338a765 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -744,6 +744,11 @@ with escape\-quoted special characters.
This should contain a list of file paths, relative to the image directory, of
shared libraries that lack NEEDED entries. The paths may contain regular
expressions with escape\-quoted special characters.
+.TP
+\fBQA_DESKTOP_FILE\fR
+This should contain a list of file paths, relative to the image directory, of
+desktop files which should not be validated. The paths may contain regular
+expressions with escape\-quoted special characters.
.SH "PORTAGE DECLARATIONS"
.TP
.B inherit
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 7200327..b9952be 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1785,6 +1785,29 @@ def _post_src_install_uid_fix(mysettings, out):
xdg_dirs = tuple(os.path.join(i, "applications") + os.sep
for i in xdg_dirs if i)
+ qa_desktop_file = ""
+ f = None
+ try:
+ with io.open(_unicode_encode(os.path.join(
+ mysettings["PORTAGE_BUILDDIR"],
+ "build-info", "QA_DESKTOP_FILE"),
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ errors='replace') as f:
+ qa_desktop_file = f.read()
+ except IOError as e:
+ if e.errno not in (errno.ENOENT, errno.ESTALE):
+ raise
+
+ qa_desktop_file = qa_desktop_file.split()
+ if qa_desktop_file:
+ if len(qa_desktop_file) > 1:
+ qa_desktop_file = "|".join("(%s)" % x for x in qa_desktop_file)
+ qa_desktop_file = "^(%s)$" % qa_desktop_file
+ else:
+ qa_desktop_file = "^%s$" % qa_desktop_file[0]
+ qa_desktop_file = re.compile(qa_desktop_file)
+
while True:
unicode_error = False
@@ -1831,9 +1854,11 @@ def _post_src_install_uid_fix(mysettings, out):
else:
fpath = os.path.join(parent, fname)
+ fpath_relative = fpath[ed_len - 1:]
if desktop_file_validate and fname.endswith(".desktop") and \
os.path.isfile(fpath) and \
- fpath[ed_len - 1:].startswith(xdg_dirs):
+ fpath_relative.startswith(xdg_dirs) and \
+ not (qa_desktop_file and qa_desktop_file.match(fpath_relative.strip(os.sep)) is not None):
desktop_validate = validate_desktop_entry(fpath)
if desktop_validate:
next reply other threads:[~2012-09-20 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 17:20 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-01-05 4:37 [gentoo-commits] proj/portage:master commit in: man/, pym/portage/package/ebuild/, bin/ Zac Medico
2012-12-11 20:42 Zac Medico
2011-10-14 6:24 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348161594.8ba939d53e52a88c183a2db95d1e51f04b0d9bb6.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox