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

> Xiyue Deng <manp...@gmail.com> writes:
>
>> 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.
>
> Friendly ping.  Rob, do you have any more comments on the current approach?

Rob has provided more comments which I have adapted and tested.  Please
see the latest patch attached.  Thanks!

-- 
Xiyue Deng
>From f88392bd68206d44b3b84a9af43d5751321ed4d2 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.
* Also incorporated suggestions by Rob.

Suggestions by rlb

More fix
---
 debian/changelog |  7 +++++++
 debian/control   | 11 +++++++++--
 debian/rules     | 11 ++++++++++-
 3 files changed, 26 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..a50d640e116 100755
--- a/debian/rules
+++ b/debian/rules
@@ -425,6 +425,11 @@ override_dh_auto_install: $(autogen_install_files)
 	  cp -a $(install_dir_pgtk)/* $(pkgdir_common)
 
 	  rm -r $(pkgdir_common)/usr/bin
+	  # Move to emacs-pgtk; only that pkg needs it, and it causes
+	  # a gsettings-related dependency to be added (#1050393).
+	  rm -r $(pkgdir_common)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
+	  # Remove and verify expectation it's empty
+	  cd $(pkgdir_common)/usr/share && rmdir --parents glib-2.0/schemas
 	  rm \
 	    $(pkgdir_common)/$(libexec_dir_emacs)/hexl \
 	    $(pkgdir_common)/$(libexec_dir_emacs)/emacs-*.pdmp \
@@ -548,7 +553,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 +562,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 \
+	    $(install_dir_pgtk)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml \
+	    $(pkgdir_pgtk)/usr/share/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
         endif
 
         ##################################################
-- 
2.39.2

Reply via email to