We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug] deploy generator broken with 1.25.0
### Environment Details (include every applicable attribute)
  * Operating System+version: Ubuntu 20.04
  * Compiler+version: any
  * Conan version: 1.25.0
  * Python version: 3.8.2

### Steps to reproduce (Include if Applicable)
* mkdir /tmp/conan-paho-mqtt
* conan install  paho-mqtt-cpp/1.1@ -g deploy -o *:shared=True

### Logs (Executed commands with output) (Include/Attach if Applicable)
```
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=9
os=Linux
os_build=Linux
[options]
*:shared=True
[build_requires]
[env]

Installing package: paho-mqtt-cpp/1.1
Requirements
    paho-mqtt-c/1.3.1 from 'conan-center' - Cache
    paho-mqtt-cpp/1.1 from 'conan-center' - Cache
Packages
    paho-mqtt-c/1.3.1:bf0adb9a727594d902b6dc22b23c800d7707b38a - Cache
    paho-mqtt-cpp/1.1:698833d5e29368eb40ad7c3fd09f712da2722f78 - Cache

Installing (downloading, building) binaries...
paho-mqtt-c/1.3.1: Already installed!
paho-mqtt-cpp/1.1: Already installed!
ERROR: Generator deploy(file:deploy_manifest.txt) failed
[Errno 2] No such file or directory: '/tmp/conan-paho-mqtt/paho-mqtt-cpp/lib/libpaho-mqttpp3.so.1'
ERROR: [Errno 2] No such file or directory: '/tmp/conan-paho-mqtt/paho-mqtt-cpp/lib/libpaho-mqttpp3.so.1'
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conans/client/generators/deploy.py`
Content:
```
1 import calendar
2 import os
3 import shutil
4 import time
5 
6 from conans.model import Generator
7 from conans.model.manifest import FileTreeManifest
8 from conans.paths import BUILD_INFO_DEPLOY
9 from conans.util.files import mkdir, md5sum
10 
11 
12 FILTERED_FILES = ["conaninfo.txt", "conanmanifest.txt"]
13 
14 
15 class DeployGenerator(Generator):
16 
17     def deploy_manifest_content(self, copied_files):
18         date = calendar.timegm(time.gmtime())
19         file_dict = {}
20         for f in copied_files:
21             abs_path = os.path.join(self.output_path, f)
22             file_dict[f] = md5sum(abs_path)
23         manifest = FileTreeManifest(date, file_dict)
24         return repr(manifest)
25 
26     @property
27     def filename(self):
28         return BUILD_INFO_DEPLOY
29 
30     @property
31     def content(self):
32         copied_files = []
33 
34         for dep_name in self.conanfile.deps_cpp_info.deps:
35             rootpath = self.conanfile.deps_cpp_info[dep_name].rootpath
36             for root, _, files in os.walk(os.path.normpath(rootpath)):
37                 for f in files:
38                     if f in FILTERED_FILES:
39                         continue
40                     src = os.path.normpath(os.path.join(root, f))
41                     dst = os.path.join(self.output_path, dep_name,
42                                        os.path.relpath(root, rootpath), f)
43                     dst = os.path.normpath(dst)
44                     mkdir(os.path.dirname(dst))
45                     if os.path.islink(src):
46                         linkto = os.path.relpath(os.readlink(src), os.path.dirname(src))
47                         os.symlink(linkto, dst)
48                     else:
49                         shutil.copy(src, dst)
50                     copied_files.append(dst)
51         return self.deploy_manifest_content(copied_files)
52
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conans/client/generators/deploy.py b/conans/client/generators/deploy.py
--- a/conans/client/generators/deploy.py
+++ b/conans/client/generators/deploy.py
@@ -43,7 +43,10 @@
                     dst = os.path.normpath(dst)
                     mkdir(os.path.dirname(dst))
                     if os.path.islink(src):
-                        linkto = os.path.relpath(os.readlink(src), os.path.dirname(src))
+                        link_target = os.readlink(src)
+                        if not os.path.isabs(link_target):
+                            link_target = os.path.join(os.path.dirname(src), link_target)
+                        linkto = os.path.relpath(link_target, os.path.dirname(src))
                         os.symlink(linkto, dst)
                     else:
                         shutil.copy(src, dst)

{"golden_diff": "diff --git a/conans/client/generators/deploy.py b/conans/client/generators/deploy.py\n--- a/conans/client/generators/deploy.py\n+++ b/conans/client/generators/deploy.py\n@@ -43,7 +43,10 @@\n                     dst = os.path.normpath(dst)\n                     mkdir(os.path.dirname(dst))\n                     if os.path.islink(src):\n-                        linkto = os.path.relpath(os.readlink(src), os.path.dirname(src))\n+                        link_target = os.readlink(src)\n+                        if not os.path.isabs(link_target):\n+                            link_target = os.path.join(os.path.dirname(src), link_target)\n+                        linkto = os.path.relpath(link_target, os.path.dirname(src))\n                         os.symlink(linkto, dst)\n                     else:\n                         shutil.copy(src, dst)\n", "issue": "[bug] deploy generator broken with 1.25.0\n### Environment Details (include every applicable attribute)\r\n  * Operating System+version: Ubuntu 20.04\r\n  * Compiler+version: any\r\n  * Conan version: 1.25.0\r\n  * Python version: 3.8.2\r\n\r\n### Steps to reproduce (Include if Applicable)\r\n* mkdir /tmp/conan-paho-mqtt\r\n* conan install  paho-mqtt-cpp/1.1@ -g deploy -o *:shared=True\r\n\r\n### Logs (Executed commands with output) (Include/Attach if Applicable)\r\n```\r\nConfiguration:\r\n[settings]\r\narch=x86_64\r\narch_build=x86_64\r\nbuild_type=Release\r\ncompiler=gcc\r\ncompiler.libcxx=libstdc++\r\ncompiler.version=9\r\nos=Linux\r\nos_build=Linux\r\n[options]\r\n*:shared=True\r\n[build_requires]\r\n[env]\r\n\r\nInstalling package: paho-mqtt-cpp/1.1\r\nRequirements\r\n    paho-mqtt-c/1.3.1 from 'conan-center' - Cache\r\n    paho-mqtt-cpp/1.1 from 'conan-center' - Cache\r\nPackages\r\n    paho-mqtt-c/1.3.1:bf0adb9a727594d902b6dc22b23c800d7707b38a - Cache\r\n    paho-mqtt-cpp/1.1:698833d5e29368eb40ad7c3fd09f712da2722f78 - Cache\r\n\r\nInstalling (downloading, building) binaries...\r\npaho-mqtt-c/1.3.1: Already installed!\r\npaho-mqtt-cpp/1.1: Already installed!\r\nERROR: Generator deploy(file:deploy_manifest.txt) failed\r\n[Errno 2] No such file or directory: '/tmp/conan-paho-mqtt/paho-mqtt-cpp/lib/libpaho-mqttpp3.so.1'\r\nERROR: [Errno 2] No such file or directory: '/tmp/conan-paho-mqtt/paho-mqtt-cpp/lib/libpaho-mqttpp3.so.1'\r\n```\r\n\n", "before_files": [{"content": "import calendar\nimport os\nimport shutil\nimport time\n\nfrom conans.model import Generator\nfrom conans.model.manifest import FileTreeManifest\nfrom conans.paths import BUILD_INFO_DEPLOY\nfrom conans.util.files import mkdir, md5sum\n\n\nFILTERED_FILES = [\"conaninfo.txt\", \"conanmanifest.txt\"]\n\n\nclass DeployGenerator(Generator):\n\n    def deploy_manifest_content(self, copied_files):\n        date = calendar.timegm(time.gmtime())\n        file_dict = {}\n        for f in copied_files:\n            abs_path = os.path.join(self.output_path, f)\n            file_dict[f] = md5sum(abs_path)\n        manifest = FileTreeManifest(date, file_dict)\n        return repr(manifest)\n\n    @property\n    def filename(self):\n        return BUILD_INFO_DEPLOY\n\n    @property\n    def content(self):\n        copied_files = []\n\n        for dep_name in self.conanfile.deps_cpp_info.deps:\n            rootpath = self.conanfile.deps_cpp_info[dep_name].rootpath\n            for root, _, files in os.walk(os.path.normpath(rootpath)):\n                for f in files:\n                    if f in FILTERED_FILES:\n                        continue\n                    src = os.path.normpath(os.path.join(root, f))\n                    dst = os.path.join(self.output_path, dep_name,\n                                       os.path.relpath(root, rootpath), f)\n                    dst = os.path.normpath(dst)\n                    mkdir(os.path.dirname(dst))\n                    if os.path.islink(src):\n                        linkto = os.path.relpath(os.readlink(src), os.path.dirname(src))\n                        os.symlink(linkto, dst)\n                    else:\n                        shutil.copy(src, dst)\n                    copied_files.append(dst)\n        return self.deploy_manifest_content(copied_files)\n", "path": "conans/client/generators/deploy.py"}], "after_files": [{"content": "import calendar\nimport os\nimport shutil\nimport time\n\nfrom conans.model import Generator\nfrom conans.model.manifest import FileTreeManifest\nfrom conans.paths import BUILD_INFO_DEPLOY\nfrom conans.util.files import mkdir, md5sum\n\n\nFILTERED_FILES = [\"conaninfo.txt\", \"conanmanifest.txt\"]\n\n\nclass DeployGenerator(Generator):\n\n    def deploy_manifest_content(self, copied_files):\n        date = calendar.timegm(time.gmtime())\n        file_dict = {}\n        for f in copied_files:\n            abs_path = os.path.join(self.output_path, f)\n            file_dict[f] = md5sum(abs_path)\n        manifest = FileTreeManifest(date, file_dict)\n        return repr(manifest)\n\n    @property\n    def filename(self):\n        return BUILD_INFO_DEPLOY\n\n    @property\n    def content(self):\n        copied_files = []\n\n        for dep_name in self.conanfile.deps_cpp_info.deps:\n            rootpath = self.conanfile.deps_cpp_info[dep_name].rootpath\n            for root, _, files in os.walk(os.path.normpath(rootpath)):\n                for f in files:\n                    if f in FILTERED_FILES:\n                        continue\n                    src = os.path.normpath(os.path.join(root, f))\n                    dst = os.path.join(self.output_path, dep_name,\n                                       os.path.relpath(root, rootpath), f)\n                    dst = os.path.normpath(dst)\n                    mkdir(os.path.dirname(dst))\n                    if os.path.islink(src):\n                        link_target = os.readlink(src)\n                        if not os.path.isabs(link_target):\n                            link_target = os.path.join(os.path.dirname(src), link_target)\n                        linkto = os.path.relpath(link_target, os.path.dirname(src))\n                        os.symlink(linkto, dst)\n                    else:\n                        shutil.copy(src, dst)\n                    copied_files.append(dst)\n        return self.deploy_manifest_content(copied_files)\n", "path": "conans/client/generators/deploy.py"}]}