You are not logged in.

#1 2016-04-20 16:16:48

ZeppLu
Member
Registered: 2016-04-04
Posts: 8

A bug of dkms' hook?

I notice that dkms in official repo comes along with a hook for pacman. However, it sometimes seems not working perfectly. For instance, I make a package named mt7630e-driver (driver for my wifi adapter). It's content lools like this:

$ tree pkg/mt7630e-driver/

pkg/mt7630e-driver/
└── usr
    └── lib
        ├── firmware
        │   ├── MT7650E234.bin
        │   └── mt76x0.bin
        └── modules
            └── 4.5.1-1-ARCH
                └── kernel
                    └── drivers
                        └── net
                            └── wireless
                                ├── mt7630e.ko.gz
                                └── mt76xx.ko.gz

Obviously the package is not a dkms version since there isn't any source code, but when I install it using pacman, it produce such output:

Packages (1) mt7630e-driver-2.0.3-1

Total Installed Size:  0.86 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                             [##########################################] 100%
(1/1) checking package integrity                                           [##########################################] 100%
(1/1) loading package files                                                [##########################################] 100%
(1/1) checking for file conflicts                                          [##########################################] 100%
(1/1) checking available disk space                                        [##########################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms -q remove -q -m nvidia -v 364.16 -k 4.5.1-1-ARCH
:: Processing package changes...
(1/1) reinstalling mt7630e-driver                                          [##########################################] 100%
:: Running post-transaction hooks...
(1/1) Install DKMS modules
==> dkms -q install -m nvidia -v 364.16 -k 4.5.1-1-ARCH

You can see nvidia-dkms is removed and reinstalled. In my opinion, the hook incorrectly considers this package as a dkms version package, so dkms starts to remove and reinstall the original one. However, what it can find in /usr/src is nothing but nvidia-dkms, so...

Well, here comes my question: is it a bug of the hook? if it is, can I avoid such case by modifying my PKGBUILD? (if you want to have a look at it, I'll post it soon)

Offline

#2 2016-04-20 16:20:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: A bug of dkms' hook?

Looking at the hook, it appears to trigger any time anything is installed to /usr/lib/modules/. You're right, it shouldn't do this, file a bug report.

Offline

#3 2016-04-20 16:28:50

ZeppLu
Member
Registered: 2016-04-04
Posts: 8

Re: A bug of dkms' hook?

Scimmia wrote:

Looking at the hook, it appears to trigger any time anything is installed to /usr/lib/modules/. You're right, it shouldn't do this, file a bug report.

Thanks! Actually I've noticed it, but I do not understand this line in the hook

Target = !usr/lib/modules/*/?*

It seems that in some cases it doesn't trigger even if /usr/lib/modules/ is installed.

Offline

#4 2016-04-20 18:04:57

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: A bug of dkms' hook?

That prevents the hook from feeding the names of all subfolders as well -- the hook only wants the directories immediately under /usr/lib/modules

Perhaps it should only consider the /usr/lib/modules/*/build/ directories -- as Scimmia said, file a bug report.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB