]> git.ipfire.org Git - pakfire.git/commitdiff
Cleanup the package module by removing binary.py and source.py.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Aug 2011 13:34:50 +0000 (15:34 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Aug 2011 13:34:50 +0000 (15:34 +0200)
13 files changed:
pakfire/builder.py
pakfire/packages/__init__.py
pakfire/packages/binary.py [deleted file]
pakfire/packages/file.py
pakfire/packages/installed.py
pakfire/packages/make.py
pakfire/packages/packager.py
pakfire/packages/solv.py
pakfire/packages/source.py [deleted file]
pakfire/util.py
po/POTFILES.in
po/pakfire.pot
scripts/pakfire-build2 [new symlink]

index dc30b263bf3337e256e8fad228ab2d45ed202fe6..499ec927644be43221300ce3ea6565ce758355fb 100644 (file)
@@ -35,6 +35,7 @@ import base
 import chroot
 import logger
 import packages
+import packages.packager
 import repository
 import util
 
@@ -604,7 +605,7 @@ class BuildEnviron(object):
 
                # Make all these little package from the build environment.
                for pkg in reversed(self.pkg.packages):
-                       packager = packages.BinaryPackager(self.pakfire, pkg, self)
+                       packager = packages.packager.BinaryPackager(self.pakfire, pkg, self)
                        packager.run([repo.path,])
                self.log.info("")
 
@@ -777,7 +778,7 @@ class Builder2(object):
                # Make all these little package from the build environment.
                logging.info(_("Creating packages:"))
                for pkg in reversed(self.pkg.packages):
-                       packager = packages.BinaryPackager(self.pakfire, pkg, self.buildroot)
+                       packager = packages.packager.BinaryPackager(self.pakfire, pkg, self.buildroot)
                        packager.run([self.resultdir,])
                logging.info("")
 
index 377a9553695438da8ae912f0c7e309a0332acfe6..dc5fdaded98e702c37a7369ee4af9e5b41a40f34 100644 (file)
 
 import tarfile
 
-from binary import BinaryPackage
-from file import InnerTarFile
+from file import BinaryPackage, InnerTarFile, SourcePackage
 from installed import DatabasePackage, InstalledPackage
 from solv import SolvPackage
-from source import SourcePackage
 
 from make import Makefile
-from packager import BinaryPackager
 
 from pakfire.constants import *
 
diff --git a/pakfire/packages/binary.py b/pakfire/packages/binary.py
deleted file mode 100644 (file)
index b0b06eb..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/python
-###############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2011 Pakfire development team                                 #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program 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 General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-from file import FilePackage
-
-class BinaryPackage(FilePackage):
-       def get_scriptlet(self, type):
-               a = self.open_archive()
-
-               # Path of the scriptlet in the tarball.
-               path = "scriptlets/%s" % type
-
-               try:
-                       f = a.extractfile(path)
-               except KeyError:
-                       # If the scriptlet is not available, we just return.
-                       return
-
-               scriptlet = f.read()
-
-               f.close()
-               a.close()
-
-               return scriptlet
index 2f322dc5b8813959a525b1b8248ed6addee07954..c4cdacd8868c5b48f159696c26da615dcf056b51 100644 (file)
@@ -654,3 +654,28 @@ class FilePackage(Package):
                        return []
 
                return conflicts.split()
+
+
+class SourcePackage(FilePackage):
+       pass
+
+
+class BinaryPackage(FilePackage):
+       def get_scriptlet(self, type):
+               a = self.open_archive()
+
+               # Path of the scriptlet in the tarball.
+               path = "scriptlets/%s" % type
+
+               try:
+                       f = a.extractfile(path)
+               except KeyError:
+                       # If the scriptlet is not available, we just return.
+                       return
+
+               scriptlet = f.read()
+
+               f.close()
+               a.close()
+
+               return scriptlet
index 1cff99beaf18c0365501d9e9df920c85566f44dd..95df5b98cfd519b1a35a7c18c4e9c50b5ac14334 100644 (file)
@@ -24,7 +24,7 @@ import os
 import pakfire.downloader
 
 from base import Package
-from binary import BinaryPackage
+from file import BinaryPackage
 
 import pakfire.util as util
 from pakfire.constants import *
index 1b96b3b7384ad21cc1c57d73447010b8f744e252..7163d9f16f6a325fcb6a8b16c89efde8918a77c5 100644 (file)
@@ -34,7 +34,8 @@ import packager
 import pakfire.util as util
 
 from base import Package
-from source import SourcePackage
+from file import SourcePackage
+
 from pakfire.constants import *
 from pakfire.i18n import _
 
index 3ab007fd4db8f003879d4780b4cc570514bd5175..3f33facc84a0ec7e4125b4d99a7180b89ebd3a18 100644 (file)
@@ -39,14 +39,11 @@ import zlib
 
 import pakfire.compress
 import pakfire.util as util
-from pakfire.util import rm
 
 from pakfire.constants import *
 from pakfire.i18n import _
 
-from binary import BinaryPackage
-from source import SourcePackage
-from file import InnerTarFile
+from file import BinaryPackage, InnerTarFile, SourcePackage
 
 class Packager(object):
        def __init__(self, pakfire, pkg):
index 28d06da80a9c77b58ac60e4ee79e654e78ee285e..9030c2f9dd75ecf0a0c9970b8a4655cd159a44f8 100644 (file)
@@ -23,7 +23,7 @@ import os
 import re
 
 import base
-import binary
+import file
 
 class SolvPackage(base.Package):
        def __init__(self, pakfire, solvable, repo=None):
@@ -200,7 +200,7 @@ class SolvPackage(base.Package):
                                path = os.path.join(self.repo.path, i, self.filename)
 
                                if os.path.exists(path):
-                                       return binary.BinaryPackage(self.pakfire, self.repo, path)
+                                       return file.BinaryPackage(self.pakfire, self.repo, path)
                else:
                        filename = "packages/%s" % self.filename
 
@@ -208,7 +208,7 @@ class SolvPackage(base.Package):
                                path = self.repo.cache.abspath(filename)
 
                if path:
-                       return binary.BinaryPackage(self.pakfire, self.repo, path)
+                       return file.BinaryPackage(self.pakfire, self.repo, path)
 
        def download(self, text=""):
                if not self.repo.local:
diff --git a/pakfire/packages/source.py b/pakfire/packages/source.py
deleted file mode 100644 (file)
index ebda89d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/python
-###############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2011 Pakfire development team                                 #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program 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 General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-from file import FilePackage
-
-class SourcePackage(FilePackage):
-       pass
index 66cbc1f71456f0631d3be79e91f1c452fb420b5d..1ba2992a22a41ffafac417e1ecc569bbca485bd3 100644 (file)
@@ -97,7 +97,7 @@ def make_progress(message, maxval, eta=True):
 
        widgets = [
                "  ",
-               "%-40s" % message,
+               "%s" % message,
                " ",
                Bar(left="[", right="]"),
                "  ",
index 4bc1518a4f5b62f3d54881c5d05ecff192cf9816..c9f23fc2c32566fdcc2db3a3788638e7edada5b8 100644 (file)
@@ -14,7 +14,6 @@ pakfire/i18n.py
 pakfire/__init__.py
 pakfire/logger.py
 pakfire/packages/base.py
-pakfire/packages/binary.py
 pakfire/packages/file.py
 pakfire/packages/__init__.py
 pakfire/packages/installed.py
@@ -22,7 +21,6 @@ pakfire/packages/lexer.py
 pakfire/packages/make.py
 pakfire/packages/packager.py
 pakfire/packages/solv.py
-pakfire/packages/source.py
 pakfire/repository/base.py
 pakfire/repository/cache.py
 pakfire/repository/database.py
index fbb0b8c078aa6f923636e345dab1c01192d40a8c..4ff0d1ec6ecb035b1191869922723cf7f113aab1 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-23 20:53+0200\n"
+"POT-Creation-Date: 2011-08-28 14:33+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -77,31 +77,31 @@ msgstr ""
 msgid "Everything is fine."
 msgstr ""
 
-#: ../pakfire/builder.py:122
+#: ../pakfire/builder.py:123
 msgid "Package information:"
 msgstr ""
 
 #. Copy the makefile and load source tarballs.
-#: ../pakfire/builder.py:306
+#: ../pakfire/builder.py:307
 msgid "Extracting"
 msgstr ""
 
-#: ../pakfire/builder.py:614
+#: ../pakfire/builder.py:615
 msgid "Dumping created packages"
 msgstr ""
 
-#: ../pakfire/builder.py:636
+#: ../pakfire/builder.py:637
 msgid "The build command failed. See logfile for details."
 msgstr ""
 
 #. Package the result.
 #. Make all these little package from the build environment.
-#: ../pakfire/builder.py:778
+#: ../pakfire/builder.py:779
 msgid "Creating packages:"
 msgstr ""
 
 #. Execute the buildscript of this stage.
-#: ../pakfire/builder.py:789
+#: ../pakfire/builder.py:790
 #, python-format
 msgid "Running stage %s:"
 msgstr ""
@@ -450,20 +450,20 @@ msgstr ""
 msgid "Filename: %s"
 msgstr ""
 
-#: ../pakfire/packages/make.py:98
+#: ../pakfire/packages/make.py:99
 msgid "Package name is undefined."
 msgstr ""
 
-#: ../pakfire/packages/make.py:101
+#: ../pakfire/packages/make.py:102
 msgid "Package version is undefined."
 msgstr ""
 
 #. Load progressbar.
-#: ../pakfire/packages/packager.py:309
+#: ../pakfire/packages/packager.py:306
 msgid "Packaging"
 msgstr ""
 
-#: ../pakfire/packages/packager.py:602
+#: ../pakfire/packages/packager.py:599
 #, python-format
 msgid "Building source package %s:"
 msgstr ""
@@ -597,7 +597,7 @@ msgid ""
 msgstr ""
 
 #: ../scripts/pakfire:25
-msgid "Please your installation of Pakfire."
+msgid "Please check your installation of Pakfire."
 msgstr ""
 
 #: ../scripts/pakfire:27
diff --git a/scripts/pakfire-build2 b/scripts/pakfire-build2
new file mode 120000 (symlink)
index 0000000..83bb50a
--- /dev/null
@@ -0,0 +1 @@
+pakfire
\ No newline at end of file