You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a tarfileset whose prefix path is set, and there is another
tarfileset that contains the parent directory of the prefix path, then dpkg
will fail to install the package.
The error message displayed by dpkg (or gdebi):
error creating directory `./usr/share/mireka/bin': No such file or directory
I am using the current trunk with my patch for issue 53 (which likely fixes
issue 47 too. It is on Windows but likely that does not matter.
Result of dpkg -c, which demonstrates the underlying issue:
...
./usr/share/mireka/bin/
./usr/
./usr/share/
./usr/share/mireka/
./usr/share/mireka/lib/
./usr/share/mireka/lib/configuration.js
...
./usr/share/mireka/bin/start.sh
Looking at the code of Deb.java, the following happens:
1. It collects those destination directories that has a corresponding actually
existing source directory. These paths are stored in existingDirs variable.
2. In the _dataFolders variable it collects those destination directories that
has no corresponding actual source directories. This happens when a tarfileset
is included with the prefix attribute set. In that case the destination (tar)
paths will contain the directories that are part of the prefix.
3. It adds the - virtual only - _dataFolders directories to the tar file first,
and the actual files and directories.
4. Here comes the problem. Assume that we have a prefix /usr/share/mireka/bin
and that we also have a real file in the real directory /usr/share/mireka/lib/.
Notice that the beginning of the two paths (/usr/share/mireka) are identical.
The tar file will start with the virtual/prefix path /usr/share/mireka/bin. It
does not start with the parent directories of that directory, because those has
a corresponding real directory, so they are included in the second step. When
dpkg tries to create the first directory it will fail, because its parent does
not exist.
I would add that tar - in contrast to dpkg - extracts the files without issues.
Unfortunately I cannot see an easy solution here.
Original issue reported on code.google.com by [email protected] on 7 Jun 2012 at 10:56
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 7 Jun 2012 at 10:56The text was updated successfully, but these errors were encountered: