[Bug 245776] New: gconf2 %pre scriptlet broken
https://bugzilla.novell.com/show_bug.cgi?id=245776 Summary: gconf2 %pre scriptlet broken Product: openSUSE 10.3 Version: Alpha 1 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: andreas.hanke@gmx-topmail.de QAContact: qa@suse.de Installing gconf2.rpm from factory on a 10.2 system results in the following error: # ls -d /etc/opt/gnome/gconf/gconf.xml.* /etc/opt/gnome/gconf/gconf.xml.defaults /etc/opt/gnome/gconf/gconf.xml.mandatory /etc/opt/gnome/gconf/gconf.xml.schemas # rpm -Uvh gconf2-2.14.0-37.i586.rpm Preparing... ########################################### [100%] mv: cannot move „etc/opt/gnome/gconf/gconf.xml.defaults“ to „etc/gconf/gconf.xml.defaults“: No such file or directory mv: cannot move „etc/opt/gnome/gconf/gconf.xml.schemas“ to „etc/gconf/gconf.xml.schemas“: No such file or directory mv: cannot move „etc/opt/gnome/gconf/gconf.xml.mandatory“ to „etc/gconf/gconf.xml.mandatory“: No such file or directory 1:gconf2 ########################################### [100%] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 ------- Comment #1 from andreas.hanke@gmx-topmail.de 2007-02-15 08:10 MST ------- The reason why this fails is that you're doing this in the %pre scriptlet. This cannot work because /etc/gconf does not yet exist at that time. You have to add mkdir -p etc/gconf or move the whole thing into %post. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 sbrabec@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from sbrabec@novell.com 2007-02-15 09:44 MST ------- It's easier to do mkdir than move to %post - if we move to %post, we need a new check for version and the destination directories already exists, so we have to move its contents. Adding "mkdir -p etc/gconf". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 andreas.hanke@gmx-topmail.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #3 from andreas.hanke@gmx-topmail.de 2007-02-19 06:47 MST ------- I'm still not really happy with the current solution. There are two problems: - The "mkdir -p" has been added inside an "if", but "mv" is also done inside another "if". This could fail, the "mkdir -p" should be done inside all "if"s or outside all of them. - If etc/gconf/gconf.xml.* already exists and etc/opt/gnome/gconf/gconf.xml.* still exists (e.g. because of an aborted upgrade attempt), the script will create malformed directories like these: /etc/gconf/gconf.xml.defaults/gconf.xml.defaults /etc/gconf/gconf.xml.schemas/gconf.xml.schemas /etc/gconf/gconf.xml.mandatory/gconf.xml.mandatory In such a case it should fail instead of doing that, leaving at least the old /etc/opt/gnome/gconf hierarchy intact. I will attach a simple solution that solves this problem and also allows moving the thing to %post, so that the need for "mkdir -p" disappears. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 ------- Comment #4 from andreas.hanke@gmx-topmail.de 2007-02-19 06:50 MST ------- Created an attachment (id=119939) --> (https://bugzilla.novell.com/attachment.cgi?id=119939&action=view) Proposed changes This variant does not need "mkdir -p", works inside %post, fails if the "mv" cannot work properly instead if doing it anyway and still works for new installations and upgrades. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 ------- Comment #5 from andreas.hanke@gmx-topmail.de 2007-02-19 07:29 MST ------- Just FYI, "mv -T" works if the target directory exists and is empty, but fails if it is non-empty. This is IMHO exactly the desired thing (because /etc/gconf/gconf.xml.* are empty until the first gconftool-2 call) and if they are non-empty, the migration will not work, but do stupid things silently (moving /etc/opt/gnome/gconf/gconf.xml.* to /etc/gconf/gconf.xml.*/gconf.xml.*). "mv" without "-T" claims to work in both cases, but doesn't actually do anything useful (it just breaks the old /etc/opt/gnome/gconf/gconf.xml.* hierarchy). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 maw@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |bnc-team-gnome-build@forge.provo.novell.com |gnome@forge.provo.novell.com| Status|REOPENED |NEW -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776 sbrabec@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-gnome- |sbrabec@novell.com |build@forge.provo.novell.com| Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=245776#c6
Stanislav Brabec
participants (1)
-
bugzilla_noreply@novell.com