# pkg-static: duplicate file listing



## Maciej (Dec 9, 2022)

While working on a port I have found a problem of duplicate entries for documentation files with warning message as in the title.
In my port, docs are installed conditionally, based on the DOCS option, so I have this in Makefile:

```
OPTIONS_DEFINE= DOCS
```
The example doc file, file.txt, is properly installed in work/stage/usr/local/share/doc/file.txt and `make makeplist` generates a single entry for that file, for pkg-plist:

```
%%PORTDOCS%%%%DOCSDIR%%/file.txt
```
What is interesting is that at later steps, work/.PLIST.mktmp contains TWO entries:

```
share/doc/file.txt
/usr/local/share/doc/file.txt
```
and the command `make package` prints:

```
pkg-static: duplicate file listing: /usr/local/share/doc/file.txt, ignoring
```
Ultimately, file.txt does not install in its destination after `make install`.
Is there anything obvious that I might be missing?


----------



## Alain De Vos (Dec 10, 2022)

Maybe try mailing-lists ?


----------



## Maciej (Dec 10, 2022)

Problem solved - apart from the entries listed above I also had (this is a leftover from a broken port) this:

```
PORTDOCS= *
```
According to the handbook, these are *alternative* mechanisms, so apparently they are responsible for the conflicting entries in the processed plist. I have removed this glob entry from the Makefile and stayed with the idea of using separate entry for each installed file (they are generated by `make makeplist` anyway, and at least I can review what goes there). Now the port works properly.


----------

