Difference between revisions of "Dpkg"

[quality revision] [checked revision]
m
m
 
Under construction.png Coming soon

1 Article purpose[edit]

This article aims to give information required to start with the 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 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 to correctly install data of package
  • data : applications, libraries, and any files to copy to rootfs


3 Getting Started[edit]

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

Keep in mind 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.

That's why it could be very interesting to list the files belong a package or reverse.

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

  • How to list 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 pakage
$> dpkg -L <packageName>

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

4 References[edit]

<noinclude>

{{ArticleMainWriter|SebastienG}}
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19}}==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>


==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 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 to correctly install data of package
* data : applications, libraries, and any files to copy to rootfs</onlyinclude>


==Getting Started==

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

Keep in mind 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.

That's why it could be very interesting to list the files belong a package or reverse.

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

* How to list 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 pakage
 $> dpkg -L ''<packageName>''

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

==References==<references/>

<noinclude>
[[Category:OpenSTLinux distribution]]</noinclude>

{{UnderConstruction}}
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
==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>
  +
  +
==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 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 to correctly install data of package
  +
* data : applications, libraries, and any files to copy to rootfs
  +
</onlyinclude>
  +
  +
==Getting Started==
  +
  +
''dpkg'' could be very helpful to know which file of the rootfs belong which package.
  +
  +
Keep in mind 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.
  +
  +
That's why it could be very interesting to list the files belong a package or reverse.
  +
  +
Here a short list of useful commands with 'dpkg':
  +
  +
* How to list 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 pakage
  +
$> dpkg -L ''<packageName>''
  +
  +
* How to find package belong a file
  +
$> dpkg -S ''</absolute/path/to/a/file/of/target>''
  +
  +
==References==
  +
<references/>
  +
 
<noinclude>
 
<noinclude>
{{ArticleMainWriter|SebastienG}}
 
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19}}
 
 
[[Category:OpenSTLinux distribution]]
 
[[Category:OpenSTLinux distribution]]
 
</noinclude>
 
</noinclude>
{{UnderConstruction}}
 

Attachments

Discussions