2012-10-28T20:49:16ZFluxBBhttps://bbs.archlinux.org/viewtopic.php?id=151612@WorMzy - Yes, this would be optimal but the location that the new browser uses is a subset of the old location.@Falconindy - OK. In that case I believe the only option is for the pre_update function to stop the daemon and inform the user.

Aborting pacman mid installation is among the worst things you can do. This functionality does not exist, and will never exist.

OK... What would you recommend in this case, Dave?

Frankly, I've never been a fan of the idea of these silly sync daemons from the start. I suggest not breaking it in such a way that you necessarily lose data if its updated while running.

]]>https://bbs.archlinux.org/profile.php?id=302512012-10-28T20:37:19Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183173#p1183173Would it not be best to support both variables for a release or two, warning users that they need to change the old variable asap, or face losing their entire profile during a later update? If the users fail to heed the notice, then it's their own fault.]]>https://bbs.archlinux.org/profile.php?id=380912012-10-28T20:36:01Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183172#p1183172falconindy wrote:

Aborting pacman mid installation is among the worst things you can do. This functionality does not exist, and will never exist.

OK... What would you recommend in this case, Dave?

]]>https://bbs.archlinux.org/profile.php?id=210602012-10-28T20:32:41Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183170#p1183170Aborting pacman mid installation is among the worst things you can do. This functionality does not exist, and will never exist.]]>https://bbs.archlinux.org/profile.php?id=302512012-10-28T20:28:21Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183164#p1183164Trilby wrote:

Awebb wrote:

There is no proper way of aborting an installation. If the package is built...

I know it can be aborted at in the build function - this is an AUR package right?

Yes. I don't want the logic check to be applied at build time since some users might maintain their own local repos; the check and killing will need to happen on installation. I checked and adding a `exit 1` to the code I pasted above does not stop the installation. Where are you Allan

I've never tested it, but I believe a nonzero exit (eg "exit 1") would do it.

graysky wrote:

P.S. Why don't you run psd

I've heard nothing but good things - and I've thought about checking it out, but I don't know that it would apply as I don't use any of the "big" browsers.

]]>https://bbs.archlinux.org/profile.php?id=546942012-10-28T19:39:42Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183135#p1183135There is no proper way of aborting an installation. If the package is built, then pacman will install it, no exeption acceptable. Don't get me wrong: I'm not trying to sabotage your effort, I'm only being as critical as possible and simulate the worst case user complaints. I would personally rather have the package sync, stop, update and restart than aborting a pacman operation, because the package thinks it might be a good idea. You know, the package has absolutely no say in what happens. It's like a piece of bread deciding, that you are fat enough already, skipping your entire meal. Imagine that package in [community], that would be a memorable moment, here on the Arch forums. :-)

EDIT: A little OT: Why not use psd? I still have mixed feelings. On the one hand, it boosts the browser performance and start-up time trendemously. On the other hand, it slows down the system boot, as it seems to delay the start of X until the profiles are in the tmpfs. Data loss is also a possibility, although I use Chromium with my google account, so there is no data to be lost and the daemon runs quite well, so chances are low. Another candidate for psd would be my netbook, but it would not like a delayed login, has "only" 2GB of RAM and a fast SSD. However, you got me now, I will re-activate the service. It must be those red, shiny eyes. :-D

EDIT2: Forget what I said about boot time. It adds 2 seconds on my netbook, so now it needs 6s insted of 4s. That is not really relevant.

EDIT3: And three seconds on the desktop, both with chromium only. I used to have delays like 10-15s in the past. Must have been a different problem. Or maybe I was unwise enough to use asd for browser stuff…

]]>https://bbs.archlinux.org/profile.php?id=367412012-10-28T19:38:38Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183134#p1183134@Trilby - I like that suggestion a lot! I have logic in place via the pre_update function in readme.install that can determine:

1) If the user is affected at all (not all users make use of the BROWSERS array in /etc/psd.conf to begin with and are therefor unaffected).2) If the pseudo-daemon is in a "run" state.

What is the proper way to abort the installation? Here is the logic I spoke of:

DAEMON_FILE="/run/psd"
pre_upgrade() {
newpkgver=${1%-*}
if [ $newpkgver > 4.00 ]; then
# check to see if user is affected by change in v4
if [ -n $(grep ^BROWSERS /etc/psd.conf | grep mozilla) ]; then
echo '------------------------------------------------------------------------'
echo ' WARNING:'
echo
echo 'Usage of the "mozilla" variable in the BROWSERS array in /etc/psd.conf'
echo 'is now depreciated!'
echo
echo 'You must manually change it to "firefox" starting with v4.x of psd.'
echo
# further check to see if user is running psd and needs to manually fix
if [ -e $DAEMON_FILE ]; then
echo
echo 'I have detected that you are currently running psd.'
echo
echo 'In order to safely upgrade, you must do two things:'
echo '1) Exit your browser(s)'
echo '2) Manually stop psd now.'
echo
echo 'Pacman will be aborted now. Please do 1 then 2 and retry.'
<<< INSERT SOME CODE TO KILL PACMAN'S UPDATE OF PSD >>>
fi
echo '------------------------------------------------------------------------'
fi
fi
}

P.S. Why don't you run psd

]]>https://bbs.archlinux.org/profile.php?id=210602012-10-28T19:20:45Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183119#p1183119One option may be to have a pre-install abort if the daemon is running with a message to the user that it must be stopped before psd can be safely updated.

The disadvantage is that it would abort an update which might lead to mild annoyance. The advantage is that it leaves control (and thus responsibility for the outcome) completely in the hands of the user. This advantage far outweighs the disadvantage in my estimation.

But take that with a large grain of salt as I don't use psd so I would not be affected by this either way.

]]>https://bbs.archlinux.org/profile.php?id=546942012-10-28T19:15:35Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183114#p1183114Here is the situation: profile-sync-daemon v3.16 is the current release. I need to change a core variable's value in the code which I am doing in git now. The old value is "mozilla" and the new is "firefox." Once I formally release the next version. One key thing MUST happen to ensure no data loss:

1) Psd on the system MUST stop running before the new /usr/bin/profile-sync-daemon is rotated into place by pacman.

In stopping the daemon, the profile is sync'ed back to physical disk and the upgrade can occur.

To start the daemon again and get the expected behavior:

2) The user needs to edit the BROWSERS array in /etc/psd.conf and change "mozilla" to "firefox" only if the user has uncommented the BROWSERS array which is optional.

I can leave part 2 to the user since NOT doing it will not hurt anything, but I feel that I MUST stop the deamon in a pre_upgrade function or else the user risks losing his/her firefox profile... and we all know that many do NOT maintain backups

So now that you know the whole story... what is your collective advice?

]]>https://bbs.archlinux.org/profile.php?id=210602012-10-28T18:56:34Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183107#p1183107Stopping a daemon automatically is also unexpected behavior. I hope that daemon does not do anything critical.]]>https://bbs.archlinux.org/profile.php?id=367412012-10-28T18:38:58Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183097#p1183097Thanks for the opinions. I also have to force the daemon to stop running before the upgrade or else data loss will ensue. I figured "since I am stopping the service, might as well sed the old-->new while I'm at it as well."]]>https://bbs.archlinux.org/profile.php?id=210602012-10-28T18:27:47Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183088#p1183088I agree with ZekeSulastin. I would want a foo.conf.pacnew and a post install note. A package fiddling with an existing file in /etc would be highly uncomfortable, as I manually track the changes.]]>https://bbs.archlinux.org/profile.php?id=367412012-10-28T18:04:40Zhttps://bbs.archlinux.org/viewtopic.php?pid=1183077#p1183077