[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
slackbook:package_management [2012/09/17 02:59 (UTC)] – [pkgtool] Added original text and formatting mfillpotslackbook:package_management [2012/09/17 03:02 (UTC)] – [Package Compression Formats] Added original text and formatting mfillpot
Line 28: Line 28:
 ===== Installing, Removing, and Upgrading Packages ===== ===== Installing, Removing, and Upgrading Packages =====
  
-While pkgtool scores points for convenience, installpkg(8) is much more capable of handling odd tasks, such as quickly installing a single package, installing an entire disk set of packages, or scripting an install. installpkg takes a list of packages to install, and simply installs them without asking any questions. Like all Slackware package management tools, it assumes that you know what you're doing and doesn't pretend to be smarter than you. In its simplest form, installpkg simply takes a list of packages to install, and does exactly what you would expect.+While **//pkgtool//** scores points for convenience, 
 +**//installpkg//**(8) is much more capable of 
 +handling odd tasks, such as quickly installing a single package,  
 +installing an entire disk set of packages, or scripting an install. 
 +**//installpkg//** takes a list of packages to 
 +install, and simply installs them without asking any questions. Like 
 +all Slackware package management tools, it assumes that you know what 
 +you're doing and doesn't pretend to be smarter than you. In its 
 +simplest form, **//installpkg//** simply takes a 
 +list of packages to install, and does exactly what you would expect. 
  
 <code> <code>
Line 45: Line 55:
 # The Blackbox home page is http://blackboxwm.sourceforge.net # The Blackbox home page is http://blackboxwm.sourceforge.net
 # #
-Package blackbox-0.70.1-i486-2.txz installed. +Package blackbox-0.70.1-i486-2.txz installed.</code> 
-</code>+ 
 + 
 +You can of course install multiple packages at a time, and in fact use 
 +shell wild cards.The following installs all of the //"N"// series 
 +packages from a mounted CD-ROM:
  
-You can of course install multiple packages at a time, and in fact use shell wild cards. The following installs all of the "N" series packages from a mounted CD-ROM: 
  
 <code> <code>
-darkstar:~# installpkg /mnt/cdrom/slackware/n/*.txz +darkstar:~# installpkg /mnt/cdrom/slackware/n/*.txz</code> 
-</code>+ 
 + 
 +At any given time, you can see what packages are installed on your 
 +system by listing the contents of /var/log/packages, 
 +which lists not only every application on your system but also the 
 +version number. Should you want to know what individual files were 
 +installed as a part of that package, **//cat//** 
 +the contents of the package:
  
-At any given time, you can see what packages are installed on your system by listing the contents of /var/log/packages, which lists not only every application on your system but also the version number. Should you want to know what individual files were installed as a part of that package, cat the contents of the package: 
  
 <code> <code>
-darkstar:~#  cat /var/log/packages/foo-1.0-x86_64.txz+ 
 +darkstar:~#cat /var/log/packages/foo-1.0-x86_64.txz
 </code> </code>
  
-This will return everything from the size of the package, a description of what it does, and the name and location of every file installed as a part of the package. 
  
-Removing a package is every bit as easy as installing one. As you might expect, the command to do this is removepkg(8). Simply tell it which packages to remove, and removepkg will check the contents of the package database and remove all the files and directories for that package with one caveat. If that file is included in multiple installed packages, it will be skipped and if a directory has new files in it, the directory will be left in place. Because of this, removing packages takes a good while longer than installing them.+This will return everything from the size of the package, a 
 +description of what it does, and the name and location of every file 
 +installed as a part of the package. 
 + 
 + 
 +Removing a package is every bit as easy as installing one. As you 
 +might expect, the command to do this is 
 +**//removepkg//**(8). Simply tell it which 
 +packages to remove, and **//removepkg//** will 
 +check the contents of the package database and remove all the files 
 +and directories for that package with one caveat. If that file is 
 +included in multiple installed packages, it will be skipped and if a 
 +directory has new files in it, the directory will be left in 
 +place. Because of this, removing packages takes a good while longer 
 +than installing them. 
  
 <code> <code>
Line 68: Line 102:
 </code> </code>
  
-Finally, upgrading is just as easy with (you guessed it), upgradepkg(8) which first installs a new package, then removes whatever files and directories are left-over from the old package. One important thing to remember is that upgradepkg doesn't check to see if the previously installed package has a higher version number than the "new" package, so it can also be used to downgrade to older versions.+ 
 +Finally, upgrading is just as easy with (you guessed it), 
 +**//upgradepkg//**(8) which first installs a new 
 +package, then removes whatever files and directories are left-over from 
 +the old package. One important thing to remember is that 
 +**//upgradepkg//** doesn't check to see if the 
 +previously installed package has a higher version number than the //"new"// 
 +package, so it can also be used to downgrade to older versions. 
  
 <code> <code>
Line 82: Line 124:
 Removing package Removing package
 /var/log/packages/blackbox-0.65.0-x86_64-4-upgraded-2010-02-23,16:50:51... /var/log/packages/blackbox-0.65.0-x86_64-4-upgraded-2010-02-23,16:50:51...
-  --> Deleting symlink /usr/share/blackbox/nls/POSIX +--> Deleting symlink /usr/share/blackbox/nls/POSIX 
-  --> Deleting symlink /usr/share/blackbox/nls/US_ASCII +--> Deleting symlink /usr/share/blackbox/nls/US_ASCII 
-  --> Deleting symlink /usr/share/blackbox/nls/de +--> Deleting symlink /usr/share/blackbox/nls/de 
-  --> Deleting symlink /usr/share/blackbox/nls/en +--> Deleting symlink /usr/share/blackbox/nls/en 
-  --> Deleting symlink /usr/share/blackbox/nls/en_GB+--> Deleting symlink /usr/share/blackbox/nls/en_GB
 ... ...
 Package blackbox-0.65.0-x86_64-4 upgraded with new package Package blackbox-0.65.0-x86_64-4 upgraded with new package
-./blackbox-0.70.1-i486-2.txz. +./blackbox-0.70.1-i486-2.txz.</code>
-</code>+
  
-All of these tools have useful arguments. For example, the [--rootto installpkg will install packages into an arbitrary directory. The [--dry-runargument will instruct upgradepkg to simply tell you what it would attempt without actually making any changes to the system. For complete details, you should (as always) refer to the man pages.+ 
 +All of these tools have useful arguments. For example, the 
 +//--root// to **//installpkg//** will install 
 +packages into an arbitrary directory. The //--dry-run// argument 
 +will instruct **//upgradepkg//** to simply tell you 
 +what it would attempt without actually making any changes to the 
 +system. For complete details, you should (as always) refer to the man 
 +pages.
 ===== Package Compression Formats ===== ===== Package Compression Formats =====
  
-In the past, all Slackware packages were compressed with the gzip(1) compression utility, which was a good compromise between compression speed and size. Recently, new compression schemes have been added and the package management tools have been upgraded to handle these. Today, official Slackware packages are compressed with the xz utility and end with .txz extensions. Older packages (and many third party packages) still use the .tgz extension.+In the past, all Slackware packages were compressed with the 
 +**//gzip//**(1) compression utility, which was a 
 +good compromise between compression speed and size.Recently, new 
 +compression schemes have been added and the package management tools 
 +have been upgraded to handle these. Today, official Slackware 
 +packages are compressed with the **//xz//** 
 +utility and end with .txz extensions.Older packages (and many 
 +third party packages) still use the .tgz extension
 + 
 + 
 +It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z 
 +files) are very standard, non-unique extensions for compressed .tar 
 +files. This has many advantages; they're easy to build on nearly any 
 +UNIX system (many other package formats require special toolchains), 
 +and they're just as simple to de-construct.
  
-It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z files) are very standard, non-unique extensions for compressed .tar files. This has many advantages; they're easy to build on nearly any UNIX system (many other package formats require special toolchains), and they're just as simple to de-construct. 
  
-However, it is also important to realize that just because all Slackware packages are .t?z files, not all .t?z files are Slackware packages. Installpkg won't magically install just any .t?z file, only Slackware packages.+However, it is also important to realize that just because all Slackware 
 +packages **are** .t?z files, not all .t?z files are 
 +Slackware packages. **//Installpkg//** won't 
 +magically install just any .t?z file, only Slackware packages.
 ==== slackpkg ==== ==== slackpkg ====
  
 slackbook:package_management ()