[Rpm-maint] [rpm-software-management/rpm] "%transfiletriggerin -- /lib/modules" loops through every file 375 times (#370)

Andrew Gunnerson notifications at github.com
Wed Dec 13 02:31:37 UTC 2017


When setting `%transfiletriggerin` on `/lib/modules`, RPM seems to be passing the same list of files to the trigger script over and over. For example, with the following test case:

```
Name:       test-case
Version:    1.0
Release:    1%{?dist}
Summary:    Test case for transfiletriggerin loop

License:    GPLv3+
URL:        https://github.com/chenxiaolong/fedora-packages

BuildArch:  noarch

%description

%prep

%build

%install

%transfiletriggerin -- /lib/modules
cat >/tmp/files.txt

%files

%changelog
```

installing the RPM produces a 433MB file list:

```
[rpm-trans-test-case] ls -l /tmp/files.txt
-rw-r--r--. 1 root root 433904762 Dec 12 21:15 /tmp/files.txt
```

The number of lines do not match the number of files in `/lib/modules`.

```
[rpm-trans-test-case] wc -l /tmp/files.txt
5196138 /tmp/files.txt
[rpm-trans-test-case] sort -u /tmp/files.txt | wc -l
12645
[rpm-trans-test-case] rpm -qla | grep -c ^/lib/modules
12647
[rpm-trans-test-case] find /lib/modules | wc -l
12686
```

The same thing happens when setting the same trigger for `/usr/src/kernels`, though the list of files is now 15GB.

```
[rpm-trans-test-case] ls -lh /tmp/files.txt
-rw-r--r--. 1 root root 15G Dec 12 21:28 /tmp/files.txt
```

I tested with other non-kernel directories (eg. `/usr/bin`) and was not able to reproduce this issue. Any ideas what could cause this?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/370
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171213/34d370de/attachment.html>


More information about the Rpm-maint mailing list