1
00:00:06,580 --> 00:00:10,300
Let's talk about software
managers or package managers.

2
00:00:11,060 --> 00:00:14,560
These software managers were developed
to fix the dependency problems.

3
00:00:15,240 --> 00:00:21,695
Before the software manager. You could have a real
dependency. Hell, you know how that works. You wanted

4
00:00:21,695 --> 00:00:28,149
to install an application using RPM IVA on your
application, and then it would complain about missing dependencies.

5
00:00:28,530 --> 00:00:34,140
You would want to try to install your dependencies,
which on their turn might have dependencies themselves as

6
00:00:34,140 --> 00:00:39,750
well. And the result is that you could easily
spend an entire afternoon on getting something to work.

7
00:00:40,850 --> 00:00:44,909
Software managers have the solution, and
they do so by working with repositories.

8
00:00:46,250 --> 00:00:50,870
Repositories are online resources where
packages are stored, many of

9
00:00:50,870 --> 00:00:55,490
them, so that dependency
requirements can automatically be solved.

10
00:00:56,609 --> 00:01:00,204
Before installing a package, the
software manager analyzes the dependencies and

11
00:01:00,204 --> 00:01:03,799
it will try to fetch
the dependencies from the repositories.

12
00:01:05,030 --> 00:01:08,909
Repositories themselves are provided by
the Linux distribution or by

13
00:01:08,909 --> 00:01:12,789
software vendors, or you
might even create your own.

14
00:01:13,790 --> 00:01:20,310
Some commonly used software managers are Yum or DNF on
Red Hat and Family, and apps on Ubuntu and Related.

15
00:01:21,349 --> 00:01:25,944
Before I'm going to show you how
that works, let's do a quick whiteboard

16
00:01:25,944 --> 00:01:30,539
drawing so that I can explain the
relation between repositories, software managers and packages.

17
00:01:32,480 --> 00:01:38,849
All right, let's talk about software managers. To understand
software managers, we need to. Start talking about the repository.

18
00:01:40,310 --> 00:01:46,040
The repository is normally an online resource, and
in this online resource you find two things.

19
00:01:46,640 --> 00:01:51,564
You find packages, RPM packages
on Red Hat Family, Debian packages

20
00:01:51,564 --> 00:01:56,489
on Ubuntu and Related, and
you will find an index.

21
00:01:57,870 --> 00:02:03,310
And this index is continuously updated as
new packages are added to the repository.

22
00:02:04,310 --> 00:02:08,500
Then on your local system, you have
the repository client. Let's say that this

23
00:02:08,500 --> 00:02:12,689
client is dnf, but what I'm
telling you goes for APT as well.

24
00:02:13,270 --> 00:02:15,569
It's different command, but
the mechanism is the same.

25
00:02:16,530 --> 00:02:20,340
So you want to install packages
using dnf. In order to do

26
00:02:20,340 --> 00:02:24,150
so, DNF needs to get
the latest version of the index.

27
00:02:25,030 --> 00:02:30,110
You may have noticed that when you work
with packages on the Internet, sometimes it's a little

28
00:02:30,110 --> 00:02:35,190
bit slow. That is because it's always checking
if the index has changed, and if it has

29
00:02:35,189 --> 00:02:40,270
changed, it will download it. Because DNF
needs to know if any updates are available.

30
00:02:41,129 --> 00:02:46,330
If this index is locally available, it can be
compared to the packages that you have right here.

31
00:02:47,409 --> 00:02:52,310
Then you are going to install your
packages. Let's say your package name is MyApp.

32
00:02:52,870 --> 00:02:56,240
Then the package is going
to be analyzed for dependencies.

33
00:02:56,740 --> 00:03:02,415
And if dependencies are required, well, then
the dependencies are automatically fetched. From the

34
00:03:02,415 --> 00:03:08,090
repository as well, and that makes the
repository the solution for the dependency problem.

35
00:03:08,949 --> 00:03:09,870
But we
are not done.

36
00:03:10,409 --> 00:03:16,000
Once these packages are installed, they
are also registered in a local database.

37
00:03:16,580 --> 00:03:20,050
In the case of rpm,
that would be the RPM database.

38
00:03:20,680 --> 00:03:27,240
So this RPM database is a local database that you can
query to figure out what exactly is installed on your system.

39
00:03:28,340 --> 00:03:33,403
And when you use DNF to install any
package, well, the index will be compared with

40
00:03:33,403 --> 00:03:38,466
the packages locally in your database and that
makes it your software manager also knows if

41
00:03:38,466 --> 00:03:43,530
updates are required and it will be
able to install these updates as well.
