pisilinux-dev-tools

This commit is contained in:
aydemir
2015-07-21 13:02:54 +03:00
parent 34f6f9bb3d
commit a1ef87e65a
6 changed files with 203 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import pisitools
def install():
pisitools.dobin("scripts/*")
pisitools.dodoc("COPYING", "README", "TODO")
@@ -0,0 +1,15 @@
--- scripts/checkelf.old 2014-04-25 17:57:56.000000000 +0200
+++ scripts/checkelf 2014-06-15 15:29:21.932687493 +0200
@@ -150,7 +150,11 @@
for elf_files, paths_and_deps in result_dependencies.items():
for data in paths_and_deps:
if not data[1] == "broken" and not data[1] == package_name and not data[1] == "glibc":
- result_deps.append(data[1])
+ if (data[1].startswith("xorg-video-nvidia") or data[1].startswith("xorg-video-fglrx")) \
+ and not (package_name.startswith("xorg-video-nvidia") or package_name.startswith("xorg-video-fglrx")):
+ result_deps.append("mesa")
+ else:
+ result_deps.append(data[1])
# remove packages that belong to system.base component
# when -s is used, systembase is set to true
@@ -0,0 +1,11 @@
--- scripts/checkelf~ 2014-09-21 16:43:07.997559352 +0200
+++ scripts/checkelf 2014-09-21 16:43:31.069558509 +0200
@@ -157,7 +157,7 @@
result_deps = []
for elf_files, paths_and_deps in result_dependencies.items():
for data in paths_and_deps:
- if not data[1] == "broken" and not data[1] == package_name and not data[1] == "glibc":
+ if not data[1] == "broken" and not data[1] == package_name and not data[1].replace("32-bit", "") == "glibc":
if (data[1].startswith("xorg-video-nvidia") or data[1].startswith("xorg-video-fglrx")) \
and not (package_name.startswith("xorg-video-nvidia") or package_name.startswith("xorg-video-fglrx")):
result_deps.append("mesa")
@@ -0,0 +1,57 @@
--- scripts/checkelf.old 2014-06-19 18:50:10.499728066 +0200
+++ scripts/checkelf 2014-06-19 18:47:59.408732856 +0200
@@ -26,6 +26,7 @@
import itertools
import subprocess
+FILESDB = pisi.db.filesldb.FilesLDB()
INSTALLDB = pisi.db.installdb.InstallDB()
CONSTANTS = pisi.constants.Constants()
CMPFILTR = re.compile("(.*?)(\s*\((base|devel)\)\s*)$")
@@ -73,6 +74,7 @@
# result_undefined = undefined symbol errors
return (result_needed, result_broken, result_unused, result_undefined)
+found_objdump = []
def check_objdump(processed_needed, package_elf_files, package_name):
'''check the objdump needed libraries with the ldd libraries
the libraries that are needed can be used for dependencies'''
@@ -86,14 +88,18 @@
else:
# search for the package name (i.e: pisi sf /usr/lib/*.so )
# the library may not exist, thus adding an exception is welcome
+ if objdump_needed.startswith("/"): objdump_needed = objdump_needed[1:]
+ if objdump_needed in found_objdump: continue
try:
- dependency_name = pisi.api.search_file(objdump_needed)[0][0]
+ dependency_name = FILESDB.search_file(objdump_needed)[0][0]
+ found_objdump.extend([x.path for x in INSTALLDB.get_files(dependency_name).list])
except IndexError:
dependency_name = "broken"
#print "%s (probably broken dependency)" % needed
result_needed.append((objdump_needed, dependency_name))
return result_needed
+found_pc_files = []
def check_pc_files(pc_file):
'''check for .pc files created by pkgconfig and shipped with the package
these .pc files have requirements tags that can be used for dependencies'''
@@ -102,12 +108,14 @@
os.path.basename(pc_file).replace(".pc", "")).read().split("\n")[:-1])
for require in requires:
- require_file = "/usr/share/pkgconfig/%s.pc" % require
+ require_file = "usr/share/pkgconfig/%s.pc" % require
- if not os.path.exists(require_file):
- require_file = "/usr/lib/pkgconfig/%s.pc" % require
+ if not os.path.exists("/%s" % require_file):
+ require_file = "usr/lib/pkgconfig/%s.pc" % require
+ if require_file in found_pc_files: continue
try:
- dependency_name = pisi.api.search_file(require_file)[0][0]
+ dependency_name = FILESDB.search_file(require_file)[0][0]
+ found_pc_files.extend([x.path for x in INSTALLDB.get_files(dependency_name).list])
except IndexError:
dependency_name = "broken"
+100
View File
@@ -0,0 +1,100 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>pisilinux-dev-tools</Name>
<Homepage>http://www.pisilinux.org</Homepage>
<Packager>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>app:console</IsA>
<Summary>A collection of useful tools that Pisi Linux developers use to make their developing work a lot easier</Summary>
<Description>Pisilinux-dev-tools is a collection of useful tools that Pisilinux developers use to make their developing work a lot easier. Such tools can include packaging preparation, package analysis, etc.</Description>
<Archive sha1sum="202e8ba50f95c150fa6049f42780c6b97ed45cd9" type="tarxz">http://source.pisilinux.org/1.0/pisilinux-dev-tools-0.0.2.tar.xz</Archive>
<Patches>
<Patch>fix_detect_mesa.patch</Patch>
<Patch>spped_up.patch</Patch>
<Patch>ignore_glibc-32bit.patch</Patch>
</Patches>
</Source>
<Package>
<Name>pisilinux-dev-tools</Name>
<RuntimeDependencies>
<Dependency>chrpath</Dependency>
<Dependency>binutils</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<History>
<Update release="9">
<Date>2015-06-28</Date>
<Version>0.0.2</Version>
<Comment>fix runtime deps.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="8">
<Date>2014-09-21</Date>
<Version>0.0.2</Version>
<Comment>checkelf: ignore glibc-32bit</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="7">
<Date>2014-07-01</Date>
<Version>0.0.2</Version>
<Comment>rebuild.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-06-19</Date>
<Version>0.0.2</Version>
<Comment>Speed up checkelf.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2014-06-16</Date>
<Version>0.0.2</Version>
<Comment>checkelf: fix detect mesa.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2014-04-11</Date>
<Version>0.0.2</Version>
<Comment>Version bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-04-03</Date>
<Version>0.0.1</Version>
<Comment>Use re.search() for checking command file output.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-10-29</Date>
<Version>0.0.1</Version>
<Comment>Rebuild</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2011-05-23</Date>
<Version>0.0.1</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>Pisilinux-dev-tools</Name>
<Summary xml:lang="tr">Pisilinux geliştiricilerinin geliştirme yaparken işlerini kolaylaştıran araçların bazılarını içeren bir paket</Summary>
<Description xml:lang="tr">Pisilinux-dev-tools, Pisilinux geliştiricilerinin geliştirme yaparken işlerini kolaylaştıran araçların bazılarını içeren bir pakettir. Paket yapımı, paket analizi, ELF dosyalarının analizi gibi araçlar bulunmaktadır.</Description>
</Source>
</PISI>