Difference between revisions of "Dpkg"

[quality revision] [quality revision]
m
(Getting Started)
 

1 Article purpose[edit]

This article aims to give information required to start with the LINUX tool Linux tool: dpkg[1]

2 Introduction[edit]

dpkg is the basic tool to deal with this package manager. A package manager is helpful for installing, removing and updating package in the rootfs.

A package is an archive with .deb extension that contains a set of files but also a set of installing/removing scripts.

Any package provides two kind of artifacts:

  • metadata: collection of scripts and configs need needs to correctly install data of the package
  • data data: applications, libraries, and any files to copy to the rootfs


3 Getting Started[edit]

dpkg could can be very helpful to know which file of the rootfs belong belongs to which package.

Keep in mind that the OpenSTLinux distribution has been generated with OpenEmbedded. There is a direct parity between 'recipes' and 'packages'.

Indeed an OpenEmbedded recipe describes how to get sources code, how to compile it, where to install build built artifacts on filesystem and also which the 'dpkg' packages to create and which files to put in.

That 's is why it could can be very interesting to list the files that belong to a package or reverseto find a package that belongs to a file.

Here a short list of useful commands with 'dpkg':

  • How to list the currently installed packages
$> dpkg -l
  • How to install a package:
$> dpkg -i <packageName>.deb
  • How to remove/uninstalling a package
$> dpkg -r <packageName>

  • How to list files of a pakagepackage
$> dpkg -L <packageName>

  • How to find a package belong that belongs to a file
$> dpkg -S </absolute/path/to/a/file/of/target>

4 References[edit]


==Article purpose==
This article aims to give information required to start with the LINUXLinux tool : dpkg<ref>https://linux.die.net/man/1/dpkg</ref>


==Introduction==<onlyinclude>

[[Dpkg|dpkg]] is the basic tool to deal with this package manager. A package manager is helpful for installing, removing and updating package in the rootfs.

A package is an archive with .deb extension that contains a set of files but also a set of installing/removing scripts.

Any package provides two kind of artifacts:
* metadata: collection of scripts and configs needneeds to correctly install data of the package
* data : applications, libraries, and any files to copy to the rootfs</onlyinclude>


==Getting Started==

''dpkg'' couldcan be very helpful to know which file of the rootfs belong belongs to which package.

Keep in mind that the OpenSTLinux distribution has been generated with OpenEmbedded. There is a direct parity between 'recipes' and 'packages'.

Indeed an OpenEmbedded recipe describes how to get sources code, how to compile it, where to install buildbuilt artifacts on filesystem and also which the 'dpkg' packages to create and which files to put in.

That's  is why it couldcan be very interesting to list the files that belong to a package or reverseto find a package that belongs to a file.

Here a short list of useful commands with 'dpkg':

* How to list the currently installed packages
 $> dpkg -l

* How to install a package:
 $> dpkg -i ''<packageName>''.deb

* How to remove/uninstalling a package
 $> dpkg -r ''<packageName>''

* How to list files of a pakagepackage

 $> dpkg -L ''<packageName>''

* How to find a package belong that belongs to a file
 $> dpkg -S ''</absolute/path/to/a/file/of/target>''

==References==<references/>

<noinclude>

[[Category:OpenSTLinux distribution]]{{PublicationRequestId |  15052 | 2020-02-21}}</noinclude>
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Article purpose==
 
==Article purpose==
This article aims to give information required to start with the LINUX tool : dpkg<ref>https://linux.die.net/man/1/dpkg</ref>
+
This article aims to give information required to start with the Linux tool: dpkg<ref>https://linux.die.net/man/1/dpkg</ref>
   
 
==Introduction==
 
==Introduction==
 
<onlyinclude>
 
<onlyinclude>
[[Dpkg|dpkg]] is the basic tool to deal with this package manager. A package manager is helpful for installing, removing and updating package in rootfs.
+
[[Dpkg|dpkg]] is the basic tool to deal with this package manager. A package manager is helpful for installing, removing and updating package in the rootfs.
   
 
A package is an archive with .deb extension that contains a set of files but also a set of installing/removing scripts.
 
A package is an archive with .deb extension that contains a set of files but also a set of installing/removing scripts.
   
 
Any package provides two kind of artifacts:
 
Any package provides two kind of artifacts:
* metadata: collection of scripts and configs need to correctly install data of package
+
* metadata: collection of scripts and configs needs to correctly install data of the package
* data : applications, libraries, and any files to copy to rootfs
+
* data: applications, libraries, and any files to copy to the rootfs
 
</onlyinclude>
 
</onlyinclude>
   
 
==Getting Started==
 
==Getting Started==
   
''dpkg'' could be very helpful to know which file of the rootfs belong which package.
+
''dpkg'' can be very helpful to know which file of the rootfs belongs to which package.
   
Keep in mind the OpenSTLinux distribution has been generated with OpenEmbedded. There is a direct parity between 'recipes' and 'packages'.
+
Keep in mind that the OpenSTLinux distribution has been generated with OpenEmbedded. There is a direct parity between 'recipes' and 'packages'.
   
Indeed an OpenEmbedded recipe describes how to get sources code, how to compile it, where to install build artifacts on filesystem and also which the 'dpkg' packages to create and which files to put in.
+
Indeed an OpenEmbedded recipe describes how to get sources code, how to compile it, where to install built artifacts on filesystem and also which 'dpkg' packages to create and which files to put in.
   
That's why it could be very interesting to list the files belong a package or reverse.
+
That is why it can be very interesting to list the files that belong to a package or to find a package that belongs to a file.
   
 
Here a short list of useful commands with 'dpkg':
 
Here a short list of useful commands with 'dpkg':
   
* How to list currently installed packages
+
* How to list the currently installed packages
 
  $> dpkg -l
 
  $> dpkg -l
   
Line 34: Line 34:
 
  $> dpkg -r ''<packageName>''
 
  $> dpkg -r ''<packageName>''
   
* How to list files of a pakage
+
* How to list files of a package
 
  $> dpkg -L ''<packageName>''
 
  $> dpkg -L ''<packageName>''
   
* How to find package belong a file
+
* How to find a package that belongs to a file
 
  $> dpkg -S ''</absolute/path/to/a/file/of/target>''
 
  $> dpkg -S ''</absolute/path/to/a/file/of/target>''
   
Line 45: Line 45:
 
<noinclude>
 
<noinclude>
 
[[Category:OpenSTLinux distribution]]
 
[[Category:OpenSTLinux distribution]]
  +
{{PublicationRequestId |  15052 | 2020-02-21}}
 
</noinclude>
 
</noinclude>