Coder Social home page Coder Social logo

examachine / pisi Goto Github PK

View Code? Open in Web Editor NEW
40.0 12.0 13.0 3.67 MB

PISI package manager of Pardus linux written in Python. The original development branch by the main author.

License: Other

Python 63.74% Shell 31.47% Makefile 4.19% C 0.15% C++ 0.45%
python pisi pardus-linux-distribution metaclass system linux-tools pars-linux

pisi's Issues

locking breaks PISI DB's

current workaround:
#db.DB_INIT_LOCK | # locking subsystem

could be caused because somehow ctx isn't a real singleton... have to investigate.

Refactoring

sort of match the refactoring of pisi-2.x series and improve it. split long source files into sub-packages.

git kaynak çekme

ile kaynak kod çekme olsa çok iyi olurdu uzun zamandır pisi de bu özelliğin olmasını hep istemişimdir.

tests: packagedb test hangs

The tests hang at packagedb unit tests and do not move forward

$ tests/run.py
** Running all tests

  • Running tests in actionsapitests.py
    testFileList (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsCanAccessDir (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsCanAccessFile (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsCopy (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsEcho (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsMakedirs (actionsapitests.ActionsAPITestCase) ... ok
    testShelltoolsSystem (actionsapitests.ActionsAPITestCase) ... ok

Ran 7 tests in 3.857s

OK

  • Running tests in archivetests.py
    testMakeZip (archivetests.ArchiveFileTestCase) ... check_file_hash 5b3417efd5f537434b568114bcda853b4975d851 5b3417efd5f537434b568114bcda853b4975d851
    ok
    testUnpackTar (archivetests.ArchiveFileTestCase) ... check_file_hash 66f3c77b87a160951b180447f4a6dce68ad2f71b 66f3c77b87a160951b180447f4a6dce68ad2f71b
    ok
    testUnpackZip (archivetests.ArchiveFileTestCase) ... check_file_hash 5b3417efd5f537434b568114bcda853b4975d851 5b3417efd5f537434b568114bcda853b4975d851
    check_file_hash 5b3417efd5f537434b568114bcda853b4975d851 5b3417efd5f537434b568114bcda853b4975d851
    ok
    testUnpackZipCond (archivetests.ArchiveFileTestCase) ... ok

Ran 4 tests in 8.532s

OK

  • Running tests in autoxmltests.py
    testDeclaration (autoxmltests.AutoXmlTestCase) ... ok
    testReadWrite (autoxmltests.AutoXmlTestCase) ... ok
    testWriteRead (autoxmltests.AutoXmlTestCase) ... ok
    testStr (autoxmltests.LocalTextTestCase) ... ok

Ran 4 tests in 0.011s

OK

  • Running tests in buildtests.py
    testBasicBuild (buildtests.BuildTestCase) ... Building PISI source package: a
    Compiling action script
    Safety switch: the component system.devel cannot be found
    Fetching source from: https://github.com/examachine/pisi/raw/master/tests/buildtests/merhaba-pisi-1.0.tar.bz2
    check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    merhaba-pisi-1.0.tar.bz2 [cached]
    Source archive is stored: /Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/cache/pisi/archives/merhaba-pisi-1.0.tar.bz2
    Unpacking archive...check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    unpacked (/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/tmp/pisi/a-1.0-1/work)
    Setting up source...
    setup
    Building source...
    build
    Installing...
    install
    actions.py: WorkDir = merhaba-pisi-1.0
    Password:
    Stripping files..
    ** Building package a
    Generating files.xml,
    Generating metadata.xml,
    Creating PISI package tmp/a-1.0-1-1.pisi.
    Done.
    Keeping Build Directory
    ok
    testBuildNumber (buildtests.BuildTestCase) ... Building PISI source package: a
    Compiling action script
    Safety switch: the component system.devel cannot be found
    Fetching source from: https://github.com/examachine/pisi/raw/master/tests/buildtests/merhaba-pisi-1.0.tar.bz2
    check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    merhaba-pisi-1.0.tar.bz2 [cached]
    Source archive is stored: /Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/cache/pisi/archives/merhaba-pisi-1.0.tar.bz2
    Unpacking archive...check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    unpacked (/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/tmp/pisi/a-1.0-1/work)
    Setting up source...
    setup
    Building source...
    build
    Installing...
    install
    actions.py: WorkDir = merhaba-pisi-1.0
    Stripping files..
    ** Building package a
    Generating files.xml,
    Generating metadata.xml,
    Creating PISI package tmp/a-1.0-1-1.pisi.
    Done.
    Keeping Build Directory
    Building PISI source package: a
    Compiling action script
    Safety switch: the component system.devel cannot be found
    Fetching source from: https://github.com/examachine/pisi/raw/master/tests/buildtests/merhaba-pisi-1.0.tar.bz2
    check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    merhaba-pisi-1.0.tar.bz2 [cached]
    Source archive is stored: /Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/cache/pisi/archives/merhaba-pisi-1.0.tar.bz2
    Unpacking archive...check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    unpacked (/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/tmp/pisi/a-1.0-1/work)
    Setting up source...
    setup
    Building source...
    build
    Installing...
    install
    Stripping files..
    ** Building package a
    Generating files.xml,
    (found old version tmp/a-1.0-1-1.pisi)
    There are changes, incrementing build no to 2
    Generating metadata.xml,
    Creating PISI package tmp/a-1.0-1-2.pisi.
    Done.
    Keeping Build Directory
    Building PISI source package: a
    Compiling action script
    Safety switch: the component system.devel cannot be found
    Fetching source from: https://github.com/examachine/pisi/raw/master/tests/buildtests/merhaba-pisi-1.0.tar.bz2
    check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    merhaba-pisi-1.0.tar.bz2 [cached]
    Source archive is stored: /Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/cache/pisi/archives/merhaba-pisi-1.0.tar.bz2
    Unpacking archive...check_file_hash d140159f1a3d0439e5e597a147479fb185e67c53 d140159f1a3d0439e5e597a147479fb185e67c53
    unpacked (/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/tmp/pisi/a-1.0-1/work)
    Setting up source...
    setup
    Building source...
    build
    Installing...
    install
    Stripping files..
    ** Building package a
    Generating files.xml,
    (found old version tmp/a-1.0-1-1.pisi)
    (found old version tmp/a-1.0-1-2.pisi)
    There is no change from previous build 2
    Generating metadata.xml,
    Creating PISI package tmp/a-1.0-1-2.pisi.
    Done.
    Keeping Build Directory
    ok

Ran 2 tests in 9.284s

OK

  • Running tests in configfiletests.py
    testAccessMethods (configfiletests.ConfigFileTestCase) ... ok
    testFlagsExists (configfiletests.ConfigFileTestCase) ... ok
    testSections (configfiletests.ConfigFileTestCase) ... ok
    testValues (configfiletests.ConfigFileTestCase) ... ok

Ran 4 tests in 0.002s

OK

  • Running tests in conflicttests.py
    testConflictWithEachOther (conflicttests.ConflictTestCase) ... ok
    testConflictWithEachOtherAndInstalled (conflicttests.ConflictTestCase) ... ok
    testConflictWithInstalled (conflicttests.ConflictTestCase) ... ok

Ran 3 tests in 3.382s

OK

  • Running tests in constantstests.py
    testConstValues (constantstests.ContextTestCase) ... ok
    testConstness (constantstests.ContextTestCase) ... ok

Ran 2 tests in 0.000s

OK

  • Running tests in dependencytests.py
    testReleaseFrom (dependencytests.DependencyTestCase) ... ok
    testReleaseIs (dependencytests.DependencyTestCase) ... ok
    testReleaseTo (dependencytests.DependencyTestCase) ... ok
    testVersionFrom (dependencytests.DependencyTestCase) ... ok

Ran 4 tests in 0.001s

OK

  • Running tests in fetchertests.py
    testFetch (fetchertests.FetcherTestCase) ... ok
    testResume (fetchertests.FetcherTestCase) ... ERROR

======================================================================
ERROR: testResume (fetchertests.FetcherTestCase)

Traceback (most recent call last):
File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/fetchertests.py", line 44, in testResume
shutil.copy(resume_test_file, ctx.config.archives_dir())
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'tests/helloworld/hello-1.3.tar.gz.part'


Ran 2 tests in 1.298s

FAILED (errors=1)

  • Running tests in filestests.py
    testFileInfo (filestests.FilesTestCase) ... ok

Ran 1 test in 0.001s

OK

  • Running tests in filetests.py
    testLocalFile (filetests.FileTestCase) ... ok
    testRemoteRead (filetests.FileTestCase) ... ERROR

======================================================================
ERROR: testRemoteRead (filetests.FileTestCase)

Traceback (most recent call last):
File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/filetests.py", line 30, in testRemoteRead
f = File("http://uludag.org.tr/haberler/rootfs0.2.html", File.read)
File "./pisi/file.py", line 160, in init
localfile = File.download(uri, transfer_dir, sha1sum, compress, sign)
File "./pisi/file.py", line 119, in download
fetch_url(uri, transfer_dir, ctx.ui.Progress)
File "./pisi/fetcher.py", line 55, in fetch_url
fetch.fetch()
File "./pisi/fetcher.py", line 100, in fetch
self.fetchRemoteFile(partial_file)
File "./pisi/fetcher.py", line 198, in fetchRemoteFile
self.err(_('Cannot fetch %s; %s') % (uri, e[-1][-1]))
File "./pisi/fetcher.py", line 253, in err
raise FetchError(error)
FetchError: Cannot fetch http://uludag.org.tr/haberler/rootfs0.2.html; nodename nor servname provided, or not known


Ran 2 tests in 0.224s

FAILED (errors=1)

  • Running tests in graphtests.py
    testCycle (graphtests.GraphTestCase) ... ok
    testTopologicalSort (graphtests.GraphTestCase) ... ok

Ran 2 tests in 0.000s

OK

  • Running tests in installdbtests.py
    testInstall (installdbtests.InstallDBTestCase) ... ok
    testRemoveDummy (installdbtests.InstallDBTestCase) ... ok
    testRemovePurge (installdbtests.InstallDBTestCase) ... ok

Ran 3 tests in 2.269s

OK

  • Running tests in metadatatests.py
    testRead (metadatatests.MetaDataTestCase) ... ok
    testVerify (metadatatests.MetaDataTestCase) ... ok
    testWrite (metadatatests.MetaDataTestCase) ... ok

Ran 3 tests in 0.006s

OK

  • Running tests in ootests.py
    testautosuper (ootests.OOTestCase) ... ok

Ran 1 test in 0.000s

OK

  • Running tests in packagedbtests.py
    testAdd (packagedbtests.PackageDBTestCase) ...

package signing

  • a flag to sign package after building
  • code to check if the package has a valid signature

ps: check out bahadir's pisign tool in 2.x branch

tests: light.sh outdated

$ tests/light.sh 
/Volumes/Centauri/Users/malfunct/Code/projects/pisi
+ rm -rf tmp
+ mkdir tmp
+ set -e
+ pisi-cli -Dtmp -E --ignore-build-no build tests/zip/pspec.xml tests/unzip/pspec.xml
Writing current database version for dbversion
Writing current database version for filesdbversion
Outputting packages in the working directory.
Building PISI source package: zip
Compiling action script
Safety switch: the component system.devel cannot be found
Unsatisfied Build Dependencies: patch 
Ignoring build dependencies.
Fetching source from: ftp://ftp.linux.org.tr/pub/mirrors/gentoo/distfiles/zip23.tar.gz
Program Terminated.
Cannot fetch ftp://ftp.linux.org.tr/pub/mirrors/gentoo/distfiles/zip23.tar.gz; .
Please use 'pisi help' for general help.
Use --debug to see a traceback.

search: phonetic/syntactic fault tolerance (whichever works!)

  • in particular evaluate soundex and metaphone
  • research if there are language independent phonetic encodings
  • implement as an option (or make it possible to turn it off if it works well :))

the approx. searching algo would probably be a separate flag and work much slower.

python3

pisi python3 ile yeniden yazılması mümkün olabilir mi?

CLI: PISI developer tool

another tool called pisi-devel or pisi-script tool for accumulating various developer scripts, could be handy

accelerate search

The initial inverted index implementation is too slow for incremental use.

Write a fast incremental update algorithm.

hash hesaplama uzun sürüyor

büyük boyutlu sourcelerde build işlemi bittikten sonra pisi dosyaların hash ını alırken hash alma işlemi çok uzuyor

emerge up ve pisi fc

Pisi Linux'un kullandığı pisi de ihtiyaç duyulduğu için emerge.py yi kopyalayıp emergeup.py yaparak ve içerisinde oynayarak emerge ile kurulan paketlerin güncellenmesi özelliğini eklemiştim. Bu özelliği de eklemeniz hoş olurdu. "pisi emup" "pisiemergeup".

pisi fc komutuna da --deps gibi bir parametre ekleyip indirilen paketin bağımlılıklarını da indirmeyi sağlamıştık. Bunu da düşünebilirsiniz.

MongoDB

MongoDB pisi için kullanılabilir mi?

7z support for archive

There was full 7z support in one of the previous SVN revisions..... gotta port it back to devel branch

minidom breaks archivefile test

======================================================================
ERROR: testMakeZip (archivetests.ArchiveFileTestCase)

Traceback (most recent call last):
File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/archivetests.py", line 81, in testMakeZip
spec = SpecFile("tests/pccts/pspec.xml")
File "./pisi/pxml/autoxml.py", line 337, in initialize
self.read(uri, keepDoc, tmpDir)
File "./pisi/pxml/autoxml.py", line 426, in read
compress=compress, sign=sign, copylocal=copylocal)
TypeError: readxml() got an unexpected keyword argument 'sha1sum'

tests: build.sh breaks

$ tests/build.sh 
beta functionality test script
working directory: /Volumes/Centauri/Users/malfunct/Code/projects/pisi
cleaning destination dir: tmp
+ set -e
+ rm -rf tmp
+ pisi-cli -Dtmp build https://raw.githubusercontent.com/pars-linux/corporate2/master/system/base/zip/pspec.xml https://raw.githubusercontent.com/pars-linux/corporate2/master/system/base/unzip/pspec.xml
Destination directory tmp does not exist. Creating directory.
Writing current database version for dbversion
Writing current database version for filesdbversion
Outputting packages in the working directory.
pspec.xml                      (2.0 KB)100%      0.00 B/s [??:??:??] [complete]
actions.py                     (669.0  B)100%      0.00 B/s [??:??:??] [complete]
zip-3.0-build.patch            (923.0  B)100%      0.00 B/s [??:??:??] [complete]
zip-3.0-noexecstack.patch      (662.0  B)100%      0.00 B/s [??:??:??] [complete]
zip-3.0-pic.patch              (499.0  B)100%      0.00 B/s [??:??:??] [complete]
zip-3.0-no-crypt.patch         (1.0 KB)100%      0.00 B/s [??:??:??] [complete]
Building PISI source package: zip
Compiling action script
Safety switch: the component system.devel cannot be found
PartOf tag not defined, looking for component
component.xml                  (44.0  B)100%      0.00 B/s [??:??:??] [complete]
Program Terminated.
PISI.localName: At least one 'LocalName' tag should have local text
PISI.summary: At least one 'Summary' tag should have local text
PISI.description: At least one 'Description' tag should have local text
autoxml.read: File '/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tmp/var/tmp/pisi/zip-3.0-4/work/component.xml' has errors
Please use 'pisi help' for general help.
Use --debug to see a traceback.

tests: fix xmlext

$ tests/run.py xmlext
* Running tests in xmlexttests
testAdd (xmlexttests.XmlExtTestCase) ... ok
testGet (xmlexttests.XmlExtTestCase) ... FAIL

======================================================================
FAIL: testGet (xmlexttests.XmlExtTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/xmlexttests.py", line 34, in testGet
    self.assertEqual(len(codeswith), 4)
AssertionError: 5 != 4

----------------------------------------------------------------------
Ran 2 tests in 0.002s

FAILED (failures=1)

Çoklu paket indirimi.

İnternet hızları ve kotalar eskisine nazaran çok arttığına göre, bant genişliğini tam anlamıyla kullanmak için çoklu paket indirimi özelliği eklenebilir.

tests: fix util tests

$ tests/run.py util

  • Running tests in utiltests
    testCleanArTimestamp (utiltests.UtilTestCase) ... ok
    testDirSize (utiltests.UtilTestCase) ... FAIL
    testGetFileHashes (utiltests.UtilTestCase) ... FAIL
    testRemovePathPrefix (utiltests.UtilTestCase) ... ok
    testSubPath (utiltests.UtilTestCase) ... ok

======================================================================
FAIL: testDirSize (utiltests.UtilTestCase)

Traceback (most recent call last):
File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/utiltests.py", line 70, in testDirSize
self.assertEqual(dir_size('tests/utilfiles/linktonowhere'), 23)
AssertionError: 0 != 23

======================================================================
FAIL: testGetFileHashes (utiltests.UtilTestCase)

Traceback (most recent call last):
File "/Volumes/Centauri/Users/malfunct/Code/projects/pisi/tests/utiltests.py", line 79, in testGetFileHashes
self.assertEqual(len([x for x in get_file_hashes('tests/utilfiles/')]), 4)
AssertionError: 3 != 4


Ran 5 tests in 0.009s

FAILED (failures=2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.