Xiyue Deng <manp...@gmail.com> writes:

> Sean Whitton <spwhit...@spwhitton.name> writes:
>
>> Hello,
>>
>> On Wed 27 Mar 2024 at 11:40pm -07, Xiyue Deng wrote:
>>
>>> Sean Whitton <spwhit...@spwhitton.name> writes:
>>>
>>>> Hello,
>>>>
>>>> Rob, can you review the implementation in d/rules for Xiyue's patch to
>>>> this bug, please?  I'm not sure it's the straightforward way to do it.
>>>>
>>>> Xiyue, I think it would make sense to use emacs-common (<< 1:29.3+2-2),
>>>> for the relationships.
>>>
>>> Ah indeed, I should update the versions after the Emacs 29.3 upload,
>>> though I think you meant "1:29.3+1-2".  Also, as we are just moving
>>> files from emacs-common to emacs-pgtk, breaks/replaces is only needed
>>> from emacs-pgtk to emacs-common but no the other way around, so I
>>> dropped the breaks on emacs-pgtk from emacs-common.
>>>
>>> I have updated the patch accordingly and attached here.  PTAL.
>>
>> Thanks.
>>
>>> (BTW, I'm always curious about the "+1" part of the version number.  I
>>> would expect something like "+dfsg" or "+ds" as we are dropping some
>>> of the non-DFSG conformant files, but why "+1"? :)
>>
>> It's just in case the DFSG split is done incorrectly and another attempt
>> is required -- given how complex it is.
>
> Ack, totally understandable.
>
> With the release of Emacs 1:29.3+1-2, I have rebased the patch onto it
> and bumped the breaks/replaces version.  PTAL.

Rob suggested on IRC to be a bit more conservative by removing the file
and remove the directories upwards recursively so that we can catch
future addition to the directories more easily.  The patch has been
adjusted accordingly.  PTAL.

-- 
Xiyue Deng

>From 400a3efac8f0d2ab02ba18ac4cb5ee2324bf7c23 Mon Sep 17 00:00:00 2001
From: Xiyue Deng <manp...@gmail.com>
Date: Wed, 13 Mar 2024 10:22:46 -0700
Subject: [PATCH] Install GSettings schema in pgtk build only (Closes:
 #1050393)

* In PGTK build it generates the GSettings schema file
"/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml" which
is not needed in other variant.
* Move the file from emacs-common to emacs-pgtk, and adds proper
breaks/replaces to ensure a smooth upgrade.
---
 debian/changelog |  7 +++++++
 debian/control   | 11 +++++++++--
 debian/rules     | 12 +++++++++++-
 3 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5d4e9f050ae..e2a31a36fcb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+emacs (1:29.3+1-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Install GSettings schema in pgtk build only (Closes: #1050393)
+
+ -- Xiyue Deng <manp...@gmail.com>  Wed, 13 Mar 2024 10:22:10 -0700
+
 emacs (1:29.3+1-2) unstable; urgency=medium
 
   * Change native-comp-async-report-warnings-errors to `silent'.
diff --git a/debian/control b/debian/control
index e168717089f..3c04652c769 100644
--- a/debian/control
+++ b/debian/control
@@ -138,8 +138,15 @@ Provides: editor, emacs, emacsen, info-browser, mail-reader, news-reader
 Recommends: fonts-noto-color-emoji
 Suggests: emacs-common-non-dfsg
 Conflicts: emacs-gtk, emacs-lucid, emacs-nox
-Replaces: emacs-gtk, emacs-lucid, emacs-nox, emacs-bin-common (<< 1:29.2)
-Breaks: emacs-bin-common (<< 1:29.2)
+Replaces:
+ emacs-gtk,
+ emacs-lucid,
+ emacs-nox,
+ emacs-bin-common (<< 1:29.2),
+ emacs-common (<< 1:29.3+1-3~),
+Breaks:
+ emacs-bin-common (<< 1:29.2),
+ emacs-common (<< 1:29.3+1-3~),
 Description: GNU Emacs editor (with GTK+ Wayland GUI support)
  GNU Emacs is the extensible self-documenting text editor.  This
  package contains a version of Emacs with a graphical user interface
diff --git a/debian/rules b/debian/rules
index 6250f60ea9b..1262e568c80 100755
--- a/debian/rules
+++ b/debian/rules
@@ -489,6 +489,12 @@ override_dh_auto_install: $(autogen_install_files)
 	  rm -f $(pkgdir_common)/usr/share/info/emacs/dir.old
 
 	  install -d $(pkgdir_common)/usr/local/share/emacs/site-lisp
+
+	  # PGTK builds a GSettings schema that is PGTK specific and
+	  # should not be shipped in emacs-common
+	  cd $(pkgdir_common)/usr/share \
+	    && rm glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml \
+	    && rmdir --parents glib-2.0/schemas
         endif
 
         ##################################################
@@ -548,7 +554,7 @@ override_dh_auto_install: $(autogen_install_files)
 
         ##################################################
         # emacs-pgtk
-        ifneq (,$(findstring emacs, $(shell dh_listpackages)))
+        ifneq (,$(findstring emacs-pgtk, $(shell dh_listpackages)))
 	  $(call install_common_binpkg_bits,$(install_dir_pgtk),$(pkgdir_pgtk),emacs-pgtk,pgtk)
 
           # install desktop entries
@@ -557,6 +563,10 @@ override_dh_auto_install: $(autogen_install_files)
 	    debian/emacs.desktop \
 	    debian/emacs-term.desktop \
 	    $(pkgdir_pgtk)/usr/share/applications/
+	  # install GSettings schema
+	  install -d $(pkgdir_pgtk)/usr/share/glib-2.0
+	  cp -a $(install_dir_pgtk)/usr/share/glib-2.0/* \
+	    $(pkgdir_pgtk)/usr/share/glib-2.0
         endif
 
         ##################################################
-- 
2.39.2

Reply via email to