Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

upgradepkg questions

84 views
Skip to first unread message

notbob

unread,
Dec 24, 2012, 11:58:21 AM12/24/12
to

I wanna upgrade seamonkey from seamonkey-2.1b3-i486-2 to
seamonkey-2.14.1-i486-1_slack13.37.txz. I've never used upgradepkg
before, always jes pkgtool and the others. For example, I upgraded
FF, but since it had no personal data files, I jes removed old and
installed new. I read the book and still have some questions. Since
the two pkgs are not the same name (different revs), do I use the
old%new format? Will this upgrade save/preserve data dirs/files like email,
bookmarks, etc, and will they sync?

I realize after 12 yrs as a slacker, I should know this, but I'm a mere
user, not a guru. In fact, I often wonder how I manage. ;)

nb

Kees Theunissen

unread,
Dec 24, 2012, 3:59:09 PM12/24/12
to
Different version numbers is the normal situation when upgrading.

Run: upgradepkg seamonkey-2.14.1-i486-1_slack13.37.txz
from the directory containing the new package or run
upgradepkg some/path/seamonkey-2.14.1-i486-1_slack13.37.txz
from any other directory.

Upgradepkg will extract package name and the new version from the
supplied parameter. Upgradepkg will install the new package over the
old one and then looks for file names that were part op the old package
version and not of any other installed package (including the just
installed new package). All such files files will be removed.

Configuration files will be kept and user data isn't touched. If
configuration files from the old and new version differ then the
existing configuration file will be kept and the new file is stored
with a ".new" extension appended to the file name.


Regards and Happy Christmas,

Kees.

--
Kees Theunissen.

notbob

unread,
Dec 24, 2012, 5:46:58 PM12/24/12
to
On 2012-12-24, Kees Theunissen <theu...@rijnh.nl> wrote:
>
> Regards and Happy Christmas,

Questions answered. Thanks Kees and have a Merry Christmas.

You too, aols! ;)

nb

Martijn Dekker

unread,
Dec 29, 2012, 5:30:11 PM12/29/12
to
In article <50d8c21d$0$6855$e4fe...@news2.news.xs4all.nl>,
Kees Theunissen <theu...@rijnh.nl> wrote:

> Upgradepkg will extract package name and the new version from the
> supplied parameter. Upgradepkg will install the new package over the
> old one and then looks for file names that were part op the old package
> version and not of any other installed package (including the just
> installed new package). All such files files will be removed.
>
> Configuration files will be kept and user data isn't touched. If
> configuration files from the old and new version differ then the
> existing configuration file will be kept and the new file is stored
> with a ".new" extension appended to the file name.

I've never quite understood what the advantage of the upgradepkg
"preinstall-remove-reinstall" algorithm is over simply removing the old
package before installing the new one. The latter procedure is faster
while, as far as I can tell, producing identical results[*]. Why doesn't
upgradepkg simply call removepkg followed by installpkg?

- Martijn

[*] The one difference is that upgradepkg also tags the old install
files in /var/log/removed_{packages,scripts} as upgraded with a
timestamp, but that doesn't really change my question.

Kees Theunissen

unread,
Dec 30, 2012, 1:52:43 AM12/30/12
to
First removing a package could possibly delete libs/tools that are
needed by the following install. Installing "tar" for instance needs
a working tar program to be installed so you better don't remove it
first.

Regards,

Kees.

--
Kees Theunissen.


Jim Diamond

unread,
Dec 30, 2012, 9:09:39 AM12/30/12
to
Second, if the package has some "configuration files" which you might
have edited post-install, the upgradepkg route keeps those config
files and puts the new version of the config file in the same place,
but with '.new' appended to the name.

For example, see /var/log/scripts/kbd-1.15.3-x86_64-1 (or whichever
version you have on your system).

The "problem" here is that after you do an upgradepkg you should look
for .new files to see if your existing config file needs to be
replaced and your configurations done again. You can execute (as root
to avoid complaints)
find /etc /var -name \*.new

(This gets all the .new files under /etc and /var, I think that is all
of them, but don't bet your life on it.)

Cheers.
Jim

Martijn Dekker

unread,
Dec 30, 2012, 2:09:44 PM12/30/12
to
In article <50dfe4bb$0$3103$e4fe...@dreader34.news.xs4all.nl>,
That makes sense, thanks. It does seem like a big performance price to
pay to treat *all* packages that way even though only a few system
packages really need it.

- M.

Martijn Dekker

unread,
Dec 30, 2012, 2:10:11 PM12/30/12
to
In article <slrnke0ip4.p6...@jdiamond-nb2.acadiau.ca>,
Jim Diamond <Jim.D...@deletethis.AcadiaU.ca> wrote:

> Second, if the package has some "configuration files" which you might
> have edited post-install, the upgradepkg route keeps those config
> files and puts the new version of the config file in the same place,
> but with '.new' appended to the name.

'removepkg' followed by 'installpkg' does that as well.

- M.

Grant

unread,
Dec 30, 2012, 2:08:39 PM12/30/12
to
Using upgradepkg does the above and looks after the filenames too.

I use rsync'd local install file mirror, so a global update is as simple
as:

upgradepkg /home/mirror/slackware-11.0/patches/packages/*.t?z

(done on old slackware box as the slack-14 boxes are off right now).

Grant.
>
>- M.

Chick Tower

unread,
Dec 30, 2012, 3:08:25 PM12/30/12
to
On 2012-12-24, notbob <not...@nothome.com> wrote:
>
> I wanna upgrade seamonkey from seamonkey-2.1b3-i486-2 to
> seamonkey-2.14.1-i486-1_slack13.37.txz. I've never used upgradepkg
> before, always jes pkgtool and the others. For example, I upgraded
> FF, but since it had no personal data files, I jes removed old and
> installed new. I read the book and still have some questions. Since
> the two pkgs are not the same name (different revs), do I use the
> old%new format?

The answer from Kees is much more complete than this, but you can see
if upgradepkg would upgrade seamonkey, without changing anything, by
using the --dry-run option, e.g.

upgradepkg --dry-run seamonkey-2.14.1-i486-1_slack13.37.txz

Also, if upgradepkg doesn't detect a previous version of whatever you
specify as the install package, it will tell you that prior versions are
not installed and quit.
--
Chick Tower

For e-mail: aols2 DOT sent DOT towerboy AT xoxy DOT net

Henrik Carlqvist

unread,
Dec 30, 2012, 6:53:11 PM12/30/12
to
On Sun, 30 Dec 2012 20:08:25 +0000, Chick Tower wrote:
> Also, if upgradepkg doesn't detect a previous version of whatever you
> specify as the install package, it will tell you that prior versions are
> not installed and quit.

This behaviour can be overridden with the switch --install-new

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Aaron W. Hsu

unread,
Feb 24, 2013, 11:30:33 PM2/24/13
to
Martijn Dekker <mar...@inlv.demon.nl> writes:

>That makes sense, thanks. It does seem like a big performance price to
>pay to treat *all* packages that way even though only a few system
>packages really need it.

The number of packages that can benefit from this are actually more
than just the system packages. While being able to install the package
at all is important, such as in the case of reinstalling or upgrading
the tar package, a number of other package upgrades might need to
avoid breaking a currently running package. When you're running a
server that needs to be up most of the time, then doing updates by
taking the whole program down, and then doing then update, and then
bringing the server back up can work just fine, but sometimes its
better to have a safe upgradepkg that will allow applications in
memory to continue to run. This can (in some applications) greatly
reduce your downtime when upgrading packages. Indeed, if you are
just updating for security and not for any ABI changes, then you
should be able to upgrade the package with basically zero downtime
or as close as makes no difference. However, this requires upgradepkg
to be able to do the inplace replacement, rather than deleting all
the files beforehand.

--
Aaron W. Hsu | arc...@sacrideo.us | http://www.sacrideo.us
לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃
0 new messages