Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909419 - sys-fs/lvm2: Transient Make error at install time
Summary: sys-fs/lvm2: Transient Make error at install time
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2023-06-30 22:44 UTC by gwendal grignou
Modified: 2023-11-21 20:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to not make install_device-mapper when make install is invoked (0001-sys-fs-lvm2-Do-no-install-install_device-mapper-unco.patch,1.26 KB, patch)
2023-06-30 22:49 UTC, gwendal grignou
Details | Diff
emerge log with install_device-mapper (sys-fs:lvm2-2.03.20:20230630-214940.log,271.91 KB, text/x-log)
2023-06-30 22:56 UTC, gwendal grignou
Details
emerge log without install_device-mapper (sys-fs:lvm2-2.03.20:20230630-220908.log,261.64 KB, text/x-log)
2023-06-30 22:57 UTC, gwendal grignou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gwendal grignou 2023-06-30 22:44:38 UTC
A transient make error was observed when compiling lvm2 with lvm flag set:

```
cannot create regular file '/build/birman/tmp/portage/sys-fs/lvm2-2.03.20/image/lib/udev/rules.d/10-dm.rules'
cannot create regular file '/build/birman/tmp/portage/sys-fs/lvm2-2.03.20/image/sbin/dmsetup'   ....
: File exists
```

It looks like we try to install `dmsetup` twice. The Makefile do have .PHONY rules, but it does not prevent a second invocation of install. 
```
make -C dm-tools install
make[2]: Entering directory '/build/brya/tmp/portage/sys-fs/lvm2-2.03.20/work/LVM2.2.03.20/libdm/dm-tools
/usr/lib/portage/python3.8/ebuild-helpers/xattr/install -c -m 555  -D dmsetup /build/birman/tmp/portage/sys-fs/lvm2-2.03.20/image/sbin/dmsetup
```

`dmsetup` is installed twice by `install` and `install_device-mapper` targets. 
However, since`install` implies `install_device-mapper`, we don't have to install `install_device-mapper` unconditionally.
Comment 1 gwendal grignou 2023-06-30 22:49:25 UTC
Created attachment 864898 [details, diff]
Patch to not make install_device-mapper when make install is invoked

Running a diff of portage/logs/sys-fs\:lvm2-2.03.20, confirm that no files are added when `install_device-mapper` is invoked.
Comment 2 gwendal grignou 2023-06-30 22:56:23 UTC
Created attachment 864899 [details]
emerge log with install_device-mapper

Compile with MAKEOPTS="-j1" to improve readability. Diffing with the next file show the section that compile `install_device-mapper` is a noop, all files were already install by `install` rule.
Comment 3 gwendal grignou 2023-06-30 22:57:47 UTC
Created attachment 864900 [details]
emerge log without install_device-mapper

Compare with previous emerge.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-21 20:25:50 UTC
I think this might have been handled in bug 913231?