Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2] conf/bitbake.conf: default HOMEPAGE to blank instead of unknown
Date: Thu,  6 Feb 2014 13:33:45 +0000	[thread overview]
Message-ID: <1391693625-25733-1-git-send-email-paul.eggleton@linux.intel.com> (raw)

The default value for HOMEPAGE of "unknown" has been in place since the
early OE-Classic days, but it doesn't really make sense - "unknown" is
not a valid URL and it just means we have to explicitly check for this
hardcoded string if we're displaying the value in some form of UI, such
as Toaster.

This has required some changes to the packaging classes as they
previously did not expect the value to be blank.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/package_deb.bbclass | 3 ++-
 meta/classes/package_ipk.bbclass | 3 ++-
 meta/classes/package_rpm.bbclass | 3 ++-
 meta/conf/bitbake.conf           | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 5d316aa..bc62c6e 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -262,7 +262,8 @@ python do_package_deb () {
         fields.append(["Architecture: %s\n", ['DPKG_ARCH']])
         fields.append(["OE: %s\n", ['PN']])
         fields.append(["PackageArch: %s\n", ['PACKAGE_ARCH']])
-        fields.append(["Homepage: %s\n", ['HOMEPAGE']])
+        if d.getVar('HOMEPAGE', True):
+            fields.append(["Homepage: %s\n", ['HOMEPAGE']])
 
         # Package, Version, Maintainer, Description - mandatory
         # Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 2d8e459..5835d36 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -290,7 +290,8 @@ python do_package_ipk () {
         fields.append(["License: %s\n", ['LICENSE']])
         fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']])
         fields.append(["OE: %s\n", ['PN']])
-        fields.append(["Homepage: %s\n", ['HOMEPAGE']])
+        if d.getVar('HOMEPAGE', True):
+            fields.append(["Homepage: %s\n", ['HOMEPAGE']])
 
         def pullData(l, d):
             l2 = []
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index e9a6ac8..32863d7 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -969,7 +969,8 @@ python write_specfile () {
     spec_preamble_top.append('License: %s' % srclicense)
     spec_preamble_top.append('Group: %s' % srcsection)
     spec_preamble_top.append('Packager: %s' % srcmaintainer)
-    spec_preamble_top.append('URL: %s' % srchomepage)
+    if srchomepage:
+        spec_preamble_top.append('URL: %s' % srchomepage)
     if srccustomtagschunk:
         spec_preamble_top.append(srccustomtagschunk)
     tail_source(d)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 57668e1..4fb6a1c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -241,7 +241,7 @@ This package contains documentation."
 
 LICENSE = "INVALID"
 MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>"
-HOMEPAGE = "unknown"
+HOMEPAGE = ""
 
 # Package dependencies and provides.
 
-- 
1.8.5.3



                 reply	other threads:[~2014-02-06 13:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1391693625-25733-1-git-send-email-paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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