summaryrefslogtreecommitdiff
path: root/src/buildstream/plugins
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2019-11-23 00:51:56 +0900
committerJavier Jardón <jjardon@gnome.org>2020-01-17 04:20:09 +0000
commit45507ccc97bed1fce5749ae0c01c098a8ecd265c (patch)
tree6651e729b48280c498de1bf370b12f2907f08a6c /src/buildstream/plugins
parenta5b2396539e1621eef75a035b12c1c4266b5c9fe (diff)
downloadbuildstream-45507ccc97bed1fce5749ae0c01c098a8ecd265c.tar.gz
Remove "deb" surce plugin, it has beem moved to bst-plugins-experimentaljjardon/move_deb_source
Diffstat (limited to 'src/buildstream/plugins')
-rw-r--r--src/buildstream/plugins/sources/deb.py83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/buildstream/plugins/sources/deb.py b/src/buildstream/plugins/sources/deb.py
deleted file mode 100644
index a7d06b57c..000000000
--- a/src/buildstream/plugins/sources/deb.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (C) 2017 Codethink Limited
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library. If not, see <http://www.gnu.org/licenses/>.
-#
-# Authors:
-# Phillip Smyth <phillip.smyth@codethink.co.uk>
-# Jonathan Maw <jonathan.maw@codethink.co.uk>
-# Richard Maw <richard.maw@codethink.co.uk>
-
-"""
-deb - stage files from .deb packages
-====================================
-
-**Host dependencies:**
-
- * arpy (python package)
-
-**Usage:**
-
-.. code:: yaml
-
- # Specify the deb source kind
- kind: deb
-
- # Specify the deb url. Using an alias defined in your project
- # configuration is encouraged. 'bst source track' will update the
- # sha256sum in 'ref' to the downloaded file's sha256sum.
- url: upstream:foo.deb
-
- # Specify the ref. It's a sha256sum of the file you download.
- ref: 6c9f6f68a131ec6381da82f2bff978083ed7f4f7991d931bfa767b7965ebc94b
-
- # Specify the basedir to return only the specified dir and its children
- base-dir: ''
-
-See :ref:`built-in functionality doumentation <core_source_builtins>` for
-details on common configuration options for sources.
-"""
-
-import tarfile
-from contextlib import contextmanager
-import arpy
-
-from .tar import TarSource
-
-
-class DebSource(TarSource):
- # pylint: disable=attribute-defined-outside-init
-
- def configure(self, node):
- super().configure(node)
-
- self.base_dir = node.get_str("base-dir", None)
-
- def preflight(self):
- return
-
- @contextmanager
- def _get_tar(self):
- with open(self._get_mirror_file(), "rb") as deb_file:
- arpy_archive = arpy.Archive(fileobj=deb_file)
- arpy_archive.read_all_headers()
- data_tar_arpy = [v for k, v in arpy_archive.archived_files.items() if b"data.tar" in k][0]
- # ArchiveFileData is not enough like a file object for tarfile to use.
- # Monkey-patching a seekable method makes it close enough for TarFile to open.
- data_tar_arpy.seekable = lambda *args: True
- tar = tarfile.open(fileobj=data_tar_arpy, mode="r:*")
- yield tar
-
-
-def setup():
- return DebSource