LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   installpkg --install-new option (http://www.linuxquestions.org/questions/slackware-14/installpkg-install-new-option-542704/)

props666999 04-02-2007 01:49 PM

installpkg --install-new option
 
Hi

I find upgradepkg with the --install-new option but is there a similar way for installpkg to install the newest package among same packages ?. The current shows old and new files in its directories. I need to clarify that my partition is empty therefore upgradepkg is nonsense.
props

truthfatal 04-02-2007 02:09 PM

I could be wrong, but I think the pkgtools don't really pay attention to the version number. So I imagine that upgradepkg would just replace the installed version with the version that you have in your /directory/of/upgrades/*.tgz
--install-new would just install packages that were not already installed instead of just ignoring them.
e.g.
Code:

# ls /var/log/packages | grep asdfg
{no results}
# upgradepkg /somedirs/asdfg.tgz
{message saying package skipped no package to upgrade}
# upgradepkg --install-new /somedirs/asdfg.tgz
{message saying installing previously uninstalled package asdfg
#

Quote:

I need to clarify that my partition is empty therefore upgradepkg is nonsense
I'm not sure what you mean here? are you trying to install two versions of the same package side-by-side (so you can use either asdfg-1.0 or asdfg-1.2) ?
If so maybe take a look at the "-root" option so that files from the older package aren't over written. (i've never used that option, so I can't say how well it works[files that were installed to /somedir/etc might be expected by the package to be in /etc )

More information would be helpful.

Alien Bob 04-02-2007 02:28 PM

Quote:

Originally Posted by props666999
The current shows old and new files in its directories.

If you mean that your Slackware-current mirror of choice has old and new packages in the slackware directories then I suggest you leave a message with the mirror maintainer, and switch to a better mirror. No good mirror has more than one version of any specific package in the slackware-current tree.

And indeed, upgradepkg does not check if the version of the package you are going to upgrade with is more recent than the already installed version of that package. So, you can just as easily "downgrade" any package...

Eric

props666999 04-02-2007 02:32 PM

Hi truthfatal

I think you are correct

from man page
Code:

--install-new
              Normally upgradepkg only upgrades packages that are already installed on  the  system,  and  will
              skip  any  packages that do not already have a version installed.  If --install-new is specified,
              the behavior is modified to install new packages in addition to upgrading existing ones.

In Current many versions of the same package exist. How should i
install the latest packages only?.


props

props666999 04-02-2007 02:38 PM

Thank You Alien Bob

Yes indeed is a Slackware messed up mirror this one

In the official Slackware mirror there is only one version of each package as it should.

Thank you all

Props

MS3FGX 04-03-2007 04:56 PM

That is certainly a very interesting mirror there...

If you want something to automatically handle newer versions, you could look into slapt-get. That has version number parsing that will even pick up on the build numbers so that it should always know which package is the newer one.

rworkman 04-05-2007 11:56 PM

Quote:

Originally Posted by MS3FGX
That is certainly a very interesting mirror there...

If you want something to automatically handle newer versions, you could look into slapt-get. That has version number parsing that will even pick up on the build numbers so that it should always know which package is the newer one.


That's fine and well right up to the point where a package version is downgraded in the official Slackware tree due to a serious flaw or some such. Granted, this doesn't typically (if ever) happen within a stable release tree, but it's quite common in the -current development tree.
With that said, one really shouldn't be using an automated tool to track -current anyway, as they're inviting disaster [1] by doing so, but lots of people (attempt to) do it anyway.

[1] I mean one big honkin' invitation to disaster - the door is open, music is playing, there's a keg on the front lawn... ;-)

Franklin 04-08-2007 12:36 AM

Quote:

[1] I mean one big honkin' invitation to disaster - the door is open, music is playing, there's a keg on the front lawn... ;-)
As disasters go, that doesn't sound half-bad.


;)


All times are GMT -5. The time now is 12:37 AM.