SBdocs - SlackBuilder Tutorials - dlpkg

Last updated:

dlpkg


'dlpkg' will download a package to the current working directory or will mirror the source directory structure locally or if a directory argument is supplied will download to that

Note: 'dlpkg' does not resolve dependencies.

Examples of use

--> dlpkg -h

dlpkg [-options] [args]
 
-P  supply a directory to download to. can be combined with -d ie:
    
    dlpkg -d -P somedir
    
-d  downlowads the repository directory structure from the URL basename
    to pkg location. so for repo.com/path/to/src/location/pkg.txz 
    you would get src/location/pkg.txz locally. combined with the -P opt
    you would get somedir/src/location/pkg.txz

-h  show this help

Create a directory to work in cd into it.

mkdir work;
cd work;

I'll use slkn-vm (a SlackBuilder package that provides scripts to run qemu virtual machines) to demonstrate with.

--> dlpkg slkn-vm
-------------------------------------------------
SRC: RSYNC:mirrors.kernel.org/slackware/slackware64-14.2
-------------------------------------------------
SRC: HTTP:slackonly.com/pub/packages/14.2-x86_64
-------------------------------------------------
SRC: DIR:/var/www/htdocs/AlienBob-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-noarch-all
%%%%%%%%%%% slkn-vm
     0K ....                                                  100%  649M=0s

Now to see if it downloaded the file.

--> ls
slkn-vm-1.1-noarch-7_Skn.txz

With the -d option...this will download the source directory structure along with the package...

--> dlpkg -d slkn-vm
-------------------------------------------------
SRC: RSYNC:mirrors.kernel.org/slackware/slackware64-14.2
-------------------------------------------------
SRC: HTTP:slackonly.com/pub/packages/14.2-x86_64
-------------------------------------------------
SRC: DIR:/var/www/htdocs/AlienBob-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-noarch-all
%%%%%%%%%%% slkn-vm
     0K ....                                                  100%  347M=0s

A recursive listing shows the path to the file...

--> lr
.:
Slackbuilder-noarch-all/

./Slackbuilder-noarch-all:
slackerson/

./Slackbuilder-noarch-all/slackerson:
slkn-vm-1.1-noarch-7_Skn.txz

Similar to wget's -P, dlpkg's -P option lets you determine the path to the download location...

--> dlpkg -P here slkn-vm
-------------------------------------------------
SRC: RSYNC:mirrors.kernel.org/slackware/slackware64-14.2
-------------------------------------------------
SRC: HTTP:slackonly.com/pub/packages/14.2-x86_64
-------------------------------------------------
SRC: DIR:/var/www/htdocs/AlienBob-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-noarch-all
%%%%%%%%%%% slkn-vm
     0K ....                                                  100%  700M=0s

--> lr
.:
here/

./here:
slkn-vm-1.1-noarch-7_Skn.txz

You can combine -d and -P...

--> dlpkg -d -P here slkn-vm
-------------------------------------------------
SRC: RSYNC:mirrors.kernel.org/slackware/slackware64-14.2
-------------------------------------------------
SRC: HTTP:slackonly.com/pub/packages/14.2-x86_64
-------------------------------------------------
SRC: DIR:/var/www/htdocs/AlienBob-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-x86_64-14.2
-------------------------------------------------
SRC: HTTP:localhost/Slackbuilder-noarch-all
%%%%%%%%%%% slkn-vm
     0K ....                                                  100%  695M=0s

--> lr 
.:
here/

./here:
Slackbuilder-noarch-all/

./here/Slackbuilder-noarch-all:
slackerson/

./here/Slackbuilder-noarch-all/slackerson:
slkn-vm-1.1-noarch-7_Skn.txz

Comment in the Forum.

© 2015 - 2018  -   SlackBuilder  -   All Rights Reserved.

By: Lance Peterson -- Slackerson