Commit decd7e619ee629b5bee0d2a597679cbf58457977 to introduce weak and reverse 
dependency ordering also introduced a regression to erasure ordering. Using a 
smallish testcase of mine - first install:
```
[root@sopuli rpm]# rm -rf /srv/test/*
[root@sopuli rpm]# ./rpm -Uv --justdb --root /srv/test/ 
~pmatilai/mft/fc24-mandb.mft 
warning: /mnt/Packages/c/coreutils-common-8.25-5.fc24.x86_64.rpm: Header V3 
RSA/SHA256 Signature, key ID 81b46521: NOKEY
Preparing packages...
libgcc-6.1.1-2.fc24.x86_64
tzdata-2016d-1.fc24.noarch
ncurses-base-6.0-5.20160116.fc24.noarch
fedora-repos-24-1.noarch
fedora-release-24-1.noarch
setup-2.10.1-1.fc24.noarch
filesystem-3.2-37.fc24.x86_64
basesystem-11-2.fc24.noarch
nss-softokn-freebl-3.23.0-1.0.fc24.x86_64
glibc-all-langpacks-2.23.1-7.fc24.x86_64
glibc-common-2.23.1-7.fc24.x86_64
glibc-2.23.1-7.fc24.x86_64
ncurses-libs-6.0-5.20160116.fc24.x86_64
bash-4.3.42-5.fc24.x86_64
libstdc++-6.1.1-2.fc24.x86_64
pcre-8.38-11.fc24.x86_64
libsepol-2.5-3.fc24.x86_64
libselinux-2.5-3.fc24.x86_64
zlib-1.2.8-10.fc24.x86_64
info-6.1-2.fc24.x86_64
grep-2.25-1.fc24.x86_64
libattr-2.4.47-16.fc24.x86_64
libacl-2.2.52-11.fc24.x86_64
sed-4.2.2-15.fc24.x86_64
libcom_err-1.42.13-4.fc24.x86_64
libffi-3.1-9.fc24.x86_64
p11-kit-0.23.2-2.fc24.x86_64
groff-base-1.22.3-8.fc24.x86_64
libcap-2.24-9.fc24.x86_64
gawk-4.1.3-3.fc24.x86_64
gmp-1:6.1.0-2.fc24.x86_64
less-481-5.fc24.x86_64
ncurses-6.0-5.20160116.fc24.x86_64
libpipeline-1.4.1-2.fc24.x86_64
libverto-0.2.6-6.fc24.x86_64
popt-1.16-7.fc24.x86_64
chkconfig-1.7-2.fc24.x86_64
gdbm-1.11-7.fc24.x86_64
keyutils-libs-1.5.9-8.fc24.x86_64
libtasn1-4.8-1.fc24.x86_64
p11-kit-trust-0.23.2-2.fc24.x86_64
coreutils-common-8.25-5.fc24.x86_64
krb5-libs-1.14.1-6.fc24.x86_64
openssl-libs-1:1.0.2h-1.fc24.x86_64
coreutils-8.25-5.fc24.x86_64
crypto-policies-20151104-2.gitf1cba5f.fc24.noarch
ca-certificates-2016.2.7-1.0.fc24.noarch
gzip-1.6-10.fc24.x86_64
man-db-2.7.5-3.fc24.x86_64
```

...and then erasure:
```
[root@sopuli rpm]# ./rpm -ev --justdb --root /srv/test `./rpm -qa --root 
/srv/test/`
Preparing packages...
ncurses-base-6.0-5.20160116.fc24.noarch
coreutils-common-8.25-5.fc24.x86_64
tzdata-2016d-1.fc24.noarch
libgcc-6.1.1-2.fc24.x86_64
fedora-release-24-1.noarch
setup-2.10.1-1.fc24.noarch
filesystem-3.2-37.fc24.x86_64
basesystem-11-2.fc24.noarch
glibc-all-langpacks-2.23.1-7.fc24.x86_64
nss-softokn-freebl-3.23.0-1.0.fc24.x86_64
glibc-common-2.23.1-7.fc24.x86_64
glibc-2.23.1-7.fc24.x86_64
libstdc++-6.1.1-2.fc24.x86_64
ncurses-libs-6.0-5.20160116.fc24.x86_64
bash-4.3.42-5.fc24.x86_64
libsepol-2.5-3.fc24.x86_64
pcre-8.38-11.fc24.x86_64
libselinux-2.5-3.fc24.x86_64
fedora-repos-24-1.noarch
libattr-2.4.47-16.fc24.x86_64
keyutils-libs-1.5.9-8.fc24.x86_64
libacl-2.2.52-11.fc24.x86_64
zlib-1.2.8-10.fc24.x86_64
info-6.1-2.fc24.x86_64
grep-2.25-1.fc24.x86_64
sed-4.2.2-15.fc24.x86_64
libffi-3.1-9.fc24.x86_64
p11-kit-0.23.2-2.fc24.x86_64
popt-1.16-7.fc24.x86_64
chkconfig-1.7-2.fc24.x86_64
libtasn1-4.8-1.fc24.x86_64
libcom_err-1.42.13-4.fc24.x86_64
p11-kit-trust-0.23.2-2.fc24.x86_64
groff-base-1.22.3-8.fc24.x86_64
gawk-4.1.3-3.fc24.x86_64
libcap-2.24-9.fc24.x86_64
less-481-5.fc24.x86_64
ncurses-6.0-5.20160116.fc24.x86_64
gmp-1:6.1.0-2.fc24.x86_64
libpipeline-1.4.1-2.fc24.x86_64
gdbm-1.11-7.fc24.x86_64
libverto-0.2.6-6.fc24.x86_64
crypto-policies-20151104-2.gitf1cba5f.fc24.noarch
krb5-libs-1.14.1-6.fc24.x86_64
openssl-libs-1:1.0.2h-1.fc24.x86_64
coreutils-8.25-5.fc24.x86_64
ca-certificates-2016.2.7-1.0.fc24.noarch
gzip-1.6-10.fc24.x86_64
man-db-2.7.5-3.fc24.x86_64
[root@sopuli rpm]# 
```
The order is almost identical to that of install, which doesn't go very well 
for a real-world erasure...

After moving the p <-> q swap back to before tsi_p and tsi_q assignments, the 
erase order becomes reasonable again:

```
[root@sopuli rpm]# ./rpm -ev --justdb --root /srv/test `./rpm -qa --root 
/srv/test/`
Preparing packages...
glibc-all-langpacks-2.23.1-7.fc24.x86_64
man-db-2.7.5-3.fc24.x86_64
groff-base-1.22.3-8.fc24.x86_64
gzip-1.6-10.fc24.x86_64
ca-certificates-2016.2.7-1.0.fc24.noarch
crypto-policies-20151104-2.gitf1cba5f.fc24.noarch
coreutils-8.25-5.fc24.x86_64
openssl-libs-1:1.0.2h-1.fc24.x86_64
krb5-libs-1.14.1-6.fc24.x86_64
p11-kit-trust-0.23.2-2.fc24.x86_64
gawk-4.1.3-3.fc24.x86_64
p11-kit-0.23.2-2.fc24.x86_64
gmp-1:6.1.0-2.fc24.x86_64
sed-4.2.2-15.fc24.x86_64
grep-2.25-1.fc24.x86_64
info-6.1-2.fc24.x86_64
libcap-2.24-9.fc24.x86_64
libacl-2.2.52-11.fc24.x86_64
chkconfig-1.7-2.fc24.x86_64
libcom_err-1.42.13-4.fc24.x86_64
libverto-0.2.6-6.fc24.x86_64
popt-1.16-7.fc24.x86_64
keyutils-libs-1.5.9-8.fc24.x86_64
ncurses-6.0-5.20160116.fc24.x86_64
less-481-5.fc24.x86_64
gdbm-1.11-7.fc24.x86_64
libpipeline-1.4.1-2.fc24.x86_64
coreutils-common-8.25-5.fc24.x86_64
libtasn1-4.8-1.fc24.x86_64
zlib-1.2.8-10.fc24.x86_64
libffi-3.1-9.fc24.x86_64
libattr-2.4.47-16.fc24.x86_64
filesystem-3.2-37.fc24.x86_64
basesystem-11-2.fc24.noarch
setup-2.10.1-1.fc24.noarch
fedora-repos-24-1.noarch
fedora-release-24-1.noarch
glibc-common-2.23.1-7.fc24.x86_64
libselinux-2.5-3.fc24.x86_64
pcre-8.38-11.fc24.x86_64
libstdc++-6.1.1-2.fc24.x86_64
libsepol-2.5-3.fc24.x86_64
bash-4.3.42-5.fc24.x86_64
ncurses-libs-6.0-5.20160116.fc24.x86_64
glibc-2.23.1-7.fc24.x86_64
ncurses-base-6.0-5.20160116.fc24.noarch
tzdata-2016d-1.fc24.noarch
nss-softokn-freebl-3.23.0-1.0.fc24.x86_64
libgcc-6.1.1-2.fc24.x86_64
[root@sopuli rpm]# 
```

So something in that reversed logic is, well, reversed. Filing this so it wont 
get forgotten, needs fixing for 4.14.

-- 
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/213
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to