Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Do not require symlinks to resolve #192

Closed
wants to merge 453 commits into from

Conversation

blyxxyz
Copy link
Contributor

@blyxxyz blyxxyz commented Sep 6, 2021

If preserve-symlinks is enabled then symlinks don't have to resolve to be added to the package. This is e.g. useful for aliases for executables, where the symlink is in a different directory before being copied.

kornelski and others added 23 commits February 10, 2021 19:06
Add support for the 'Recommends' manifest field.
There's no difference on smaller binaries, since they don't get spread across
multiple lzma blocks to have anything to parallelize, but for bigger binaries
with many dependencies there's a noticeable win.

Below are the numbers from embedding 100MB of `/dev/urandom` into `cargo-deb`
itself and running it on my Macbook Air with M1 processor.

* Fast mode

```
real 0m3.597s
user 0m24.262s
sys  0m0.265s
```

* Regular mode:

```
real 0m9.833s
user 0m37.334s
sys  0m0.529s
```
Enable parallel xz compression out of the box
As reported here: nickbabcock/dness#278
installing a package with relative paths will fail on ubuntu 21.04 with
the following error message

```
dpkg: error processing archive latest.deb (--install):
 conffile name 'etc/dness/dness.conf' is not an absolute pathname
```

This appears to be a relative recent change to dpkg:
https://www.mail-archive.com/debian-dpkg-cvs@lists.debian.org/msg07446.html

This commit changes all references that are relative paths to absolute
paths.
Prefer absolute paths for latest compatibility
If preserve-symlinks is enabled then symlinks don't have to resolve to
be added to the package. This is e.g. useful for aliases for
executables.
@kornelski
Copy link
Collaborator

kornelski commented Sep 7, 2021

I would prefer to minimize amount of configuration options users need to know about. Would it be possible to have some smart defaults for this?

For example, if symlink resolves to a file, then copy the file. If the symlink is "broken", then copy the symlink itself (possibly with a warning that suggests setting the config flag to silence the warning).

@blyxxyz
Copy link
Contributor Author

blyxxyz commented Sep 7, 2021

Hm. That's a bit tricky because it means the behavior changes if the symlink starts resolving.

Maybe it should still be an error, just a more informative one with that same suggestion?

@kornelski
Copy link
Collaborator

Yeah, but what are the chances that it will start resolving?

Error with help text is a good idea.

Copy link
Collaborator

@kornelski kornelski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer an implicit default behavior

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.