We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

[SOLVED] Can't update my apps after system update 1.0.05.16 - need help.

asked 2014-04-14 00:30:55 +0300

Schturman gravatar image

updated 2014-04-16 23:49:29 +0300

Hi to all After system update (1.0.5.16), I decided to update my apps (hebrew vkb). I changed only one file (layouts-he.conf) and number of version in SPEC. New package created without any problem, BUT I saw this line in output, that I don't remember on previous system version (1.0.4.20):

warning: Could not canonicalize hostname: Jolla

Full output you can see here: http://pastie.org/9076079

Now the problems: 1. Installation of new version failed and show me this output:

[root@Jolla rpmbuild]# pkcon install-local -y /home/nemo/Downloads/hebrewvkbnew-2ar-3lang-0.8-1.armv7hl.rpm
Installing files
Waiting in queue
Waiting for authentication
Waiting in queue
Starting
Resolving dependencies
Installing packages
Downloading packages
Installing packages
Fatal error: Installation aborted by user
[root@Jolla rpmbuild]#

but if I check which package installed it show me both packages although it the same files and folders

[root@Jolla rpmbuild]# rpm -qi hebrewvkbnew-2ar-3lang
Name        : hebrewvkbnew-2ar-3lang
Version     : 0.7
Release     : 1
Architecture: armv7hl
Install Date: Sun Apr 13 01:05:53 2014
Group       : System/Tools
Size        : 1708637
License     : GPL
Signature   : (none)
Source RPM  : hebrewvkbnew-2ar-3lang-0.7-1.src.rpm
Build Date  : Sat Mar 22 23:21:49 2014
Build Host  : localhost.localdomain
Relocations : (not relocatable)
Packager    : Schturman <schturman@hotmail.com>
Vendor      : Schturman
URL         : www.dhrider.co.cc
Summary     : Hebrew vkb
Description :
Installer of Hebrew vkb with 2 arrows and toggle to switch between He & En & Ru.
Name        : hebrewvkbnew-2ar-3lang
Version     : 0.8
Release     : 1
Architecture: armv7hl
Install Date: Sun Apr 13 01:09:13 2014
Group       : System/Tools
Size        : 1711338
License     : GPL
Signature   : (none)
Source RPM  : hebrewvkbnew-2ar-3lang-0.8-1.src.rpm
Build Date  : Sun Apr 13 01:08:04 2014
Build Host  : Jolla
Relocations : (not relocatable)
Packager    : Schturman <schturman@hotmail.com>
Vendor      : Schturman
URL         : www.dhrider.co.cc
Summary     : Hebrew vkb
Description :
Installer of Hebrew vkb with 2 arrows and toggle to switch between He & En & Ru.
[root@Jolla rpmbuild]#
  1. Trying to uninstall them and I get errors again: pkcon remove -y hebrewvkbnew-2ar-3lang

More than one package matches: 1. hebrewvkbnew-2ar-3lang-0.8-1.armv7hl [installed] 2. hebrewvkbnew-2ar-3lang-0.7-1.armv7hl [installed]

Please choose the correct package: 1
Removing
Waiting in queue
Waiting for authentication
Waiting in queue
Starting
Removing packages
Resolving dependencies
Removing packages
Downloading packages
Fatal error: Specified path '/var/tmp/TmpDir.s52JJz' is not a directory: dir:///var/tmp/TmpDir.s52JJz

Only after reboot it gave me possibility to uninstall

  1. When both of them uninstalled, my new package installed without any problem and errors. Also I can reinstall the same version without any problem.

  2. Tried create another new version and install over the already installed (new) version and also get the same errors

Some advice ? Maybe I should add something new to the SPEC file because of this error ?:

warning: Could not canonicalize hostname: Jolla

This is my SPEC file:

Name:          hebrewvkbnew-2ar-3lang
Version:       0.8
Release:       1
Summary:       Hebrew vkb
Group:         System/Tools
Vendor:        Schturman
Distribution:  SailfisfOS
Packager: Schturman <schturman@hotmail.com>
URL:           www.dhrider.co.cc
Conflicts: hebrewvkb-4ar, hebrewvkb-2ar-2lang, hebrewvkb-2ar-3lang, hebrewvkbnew-4ar, hebrewvkbnew-2ar-2lang

License:       GPL

%description
Installer of Hebrew vkb with 2 arrows and toggle to switch between He & En & Ru.

%files
/usr/share/fonts/FreeSans.ttf

%defattr(644,root,root,-)
/usr/share/maliit/plugins/com/jolla/custom-he/*
/usr/share/maliit/plugins/com/jolla/layouts/*

%post
fc-cache -f
killall maliit-server
killall jolla-messages
killall jolla-email
killall jolla-notes
killall jolla-clock

%preun
if [ $1 = 1 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
killall maliit-server
fi

%postun
if [ $1 = 0 ]; then
    // Do stuff specific to uninstalls
rm -rf /usr/share/maliit/plugins/com/jolla/custom-he
killall maliit-server
else
if [ $1 = 1 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
killall maliit-server
fi
fi

%changelog
* Wed Jan 25 2014 Builder <builder@...> 0.1
- First build.
edit retag flag offensive close delete

Comments

I do not much about installing rpm packages. But:

"Fatal error: Installation aborted by user [root@Jolla rpmbuild]#"

You may need either (or even both):

  • Allow for the installation of untrusted software
  • Root access (i.e. developer mode and set a password; in Terminal you then may have to launch the sudo command). For more information, look here for the Wiki or HowTo for developer mode and Terminal.
jgr ( 2014-04-14 00:57:48 +0300 )edit

I know this... installation of untrusted software activated from previous system update, And like you can see from outputs I have root access without any problem. Also, although this message "Fatal error: Installation aborted by user " the package itself installed, see outputs :(

Schturman ( 2014-04-14 01:03:23 +0300 )edit

Sorry, I overlooked, who was posting (and that probably you are talking about your own app).

Nonetheless: When gaining root access, you usually login as user "nemo" (e.g. ssh nemo@192.168.xxx.yyy). Your logs show "root@Jolla". Could this be the problem?

jgr ( 2014-04-14 01:16:19 +0300 )edit

no, it's not a problem... All version of my packages I did this way. The problem starts only after last system update. Also, when you do: devel-su [enter] -> your root pass -> you will get "root@Jolla"

[nemo@Jolla ~]$ devel-su
Password:
[root@Jolla nemo]#
Schturman ( 2014-04-14 01:19:44 +0300 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2014-04-14 14:04:16 +0300

dez gravatar image

Always end your %post etc. sections last command with " || :". Otherwise if e.g. killall in %post section returned 1 because there is no application with this name running, scriplet will be considered as failed. Maybe it results in transaction being aborted...

edit flag offensive delete publish link more

Comments

Never used it before and it alwys worked.. I will try it today and report later. thanks

Schturman ( 2014-04-14 17:12:06 +0300 )edit

Ok, I tried your suggestion, but still the same result like before... :( Any other advices ?

Schturman ( 2014-04-14 20:08:42 +0300 )edit
0

answered 2014-04-16 23:48:39 +0300

Schturman gravatar image

Ok, finally I found how to fix my problem :D It come from my spec file from previous version (see first post) I just removed %preun section, changed a little %post and %postun to this:

%post
if [ $1 = 1 ]; then
    // Do stuff specific for first install
echo "It's first time install"
fc-cache -f
killall maliit-server
killall jolla-messages
killall jolla-email
killall jolla-notes
killall jolla-clock
else
if [ $1 = 2 ]; then
    // Do stuff specific to upgrades
killall maliit-server
fi
fi

%postun
if [ $1 = 0 ]; then
    // Do stuff specific to uninstalls
rm -rf /usr/share/maliit/plugins/com/jolla/custom-he
killall maliit-server
else
if [ $1 = 1 ]; then
    // Do stuff specific to upgrades
echo "It's just upgrade"
fi
fi

I still can't update from old version, but it because of old version... User just need to uninstall the old version and install new one. And now from the new version it can update to the next new version without any problem until I'll do other nonsense :D

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-04-14 00:30:55 +0300

Seen: 677 times

Last updated: Apr 16 '14