Commit Graph

4799 Commits

Author SHA1 Message Date
Fatih Aşıcı 9802f80d1f Return immediately if a condition is not satisfied
Also use make_version instead of Version class.
2010-03-08 12:09:35 +00:00
Fatih Aşıcı c3b4570d9b atomicoperations: Use make_version instead of Version class
This also moves some variable initializations into inner scopes
for optimization.
2010-03-08 12:09:34 +00:00
Fatih Aşıcı f9e7f62d4d api: Remove unused variable 2010-03-08 12:09:32 +00:00
Fatih Aşıcı de82603b4d tests: Remove release numbers from version strings as they are no longer supported 2010-03-08 09:26:12 +00:00
Fatih Aşıcı 85ab697c88 version: Modify Version class to use make_version 2010-03-08 09:26:10 +00:00
Fatih Aşıcı a81590a42a api: Do not use Version class for full package versions 2010-03-08 09:26:08 +00:00
Fatih Aşıcı 0b46c4a706 index: If the build numbers are same, use the release number.
Pisi was selecting "icon-naming-utils-0.8.90-7-1.pisi" when both

  icon-naming-utils-0.8.90-7-1.pisi
  icon-naming-utils-0.8.90-8-1.pisi

files exist in the same directory. With this commit, it chooses the one
with greater release number.
2010-03-08 09:26:07 +00:00
Fatih Aşıcı 663376fbbc Add split_version function to split version, release and build parts of a package version 2010-03-08 09:26:05 +00:00
Fatih Aşıcı 813e93e702 Add make_version function
pisi.version.Version is one of most frequently used class in pisi
(esp. when calculating dependencies). This new function is a fast
alternative which returns a tuple representation of version strings.
Since python is able to compare tuple and list objects, we do not
have to write a special compare function.

Here are some results:

In [7]: %timeit -n100000 pisi.version.make_version("1.2.3.4.5")
100000 loops, best of 3: 8.12 us per loop

In [8]: %timeit -n100000 pisi.version.Version("1.2.3.4.5")
100000 loops, best of 3: 60.6 us per loop

In [9]: %timeit -n100000 pisi.version.make_version("1.2") < pisi.version.make_version("1.3")
100000 loops, best of 3: 10.1 us per loop

In [10]: %timeit -n100000 pisi.version.Version("1.2") < pisi.version.Version("1.3")
100000 loops, best of 3: 85.4 us per loop
2010-03-07 21:31:39 +00:00
Fatih Aşıcı f8328491e6 Use brightred for error messages 2010-03-06 21:53:34 +00:00
Fatih Aşıcı 6e6d64b221 Accelerate iteration to find security updates 2010-03-06 15:50:05 +00:00
Fatih Aşıcı 0e8acdb126 Refactor reverseDependencyUpdate search 2010-03-04 13:56:31 +00:00
Fatih Aşıcı 1ebc5c91fa Little optimization for Install class
* Make release variables integer instead of Version
* Create Version objects outside loops if possible
* Do not iterate over all update tags
2010-03-04 13:07:35 +00:00
Fatih Aşıcı be1379c935 Optimize get_package_requirements a little
Since release number are integers, we don't have to use Version objects.
Also piksemel returns tags in the order they are written. So we don't
have to iterate all update tags.
2010-03-04 12:26:59 +00:00
Fatih Aşıcı b1b8f790eb More consistent messages 2010-03-04 12:26:58 +00:00
Fatih Aşıcı efb7697f9d Fix concatenation error
This is a regression introduced when the support for
Source/AdditionalFile support is added.
2010-03-03 12:37:40 +00:00
Ozan Çağlayan c20c4895ed Use constants from constants.py 2010-03-01 14:44:34 +00:00
Ozan Çağlayan bf71c9e10d Use delta suffix value from constants.py 2010-03-01 14:30:29 +00:00
Fatih Aşıcı ac731fe864 Thinko fix: Old and new file hashes might be different. 2010-03-01 11:44:39 +00:00
Fatih Aşıcı a41e8bed9f pisi 2.3_alpha2
This is the second alpha for the upcoming 2.3.x releases. Beside the
minor refactoring and cosmetic changes, this release includes important
bug fixes related to delta packages. Also the installation of pisi
packages with the old format is fixed.

Changes since 2.3_alpha1
------------------------
fatih (18):
      Refactor get_file_type function
      Add missing shebang
      Fix archive tests
      Create valid repos for test cases
      Fix exceptions when path includes a trailing slash
      Install files into correct paths when the old package format is used.
      Remove redundant variable
      Print human readable error messages. We must use str instead of unicode in order to use __str__ method of exception classes.
      Check if the old and new paths refer to the same file when relocating or cleaning up.
      Show missing files in the output of pisi check
      Update ChangeLog
      Take -D parameter into account when checking files
      Take -D parameter into account when looking for file permission changes
      Yet another place that doesn't take -D parameter into account
      Update messages
      Catch empty dirs when searching for abandoned files. Always show abandoned files whether the --debug option is given or not.
      Do not show traceback for handled pisi errors
      Do not print an empty exception message

klemens (1):
      update of some spanish language files (kh)

sdalgic (2):
      correct the function name.
      warn_and_remove needs one more argument=repo
2010-03-01 08:04:17 +00:00
Fatih Aşıcı 27b54e74b8 Update ChangeLog 2010-03-01 08:04:15 +00:00
Fatih Aşıcı b1c5f511ff Do not print an empty exception message 2010-02-28 21:40:57 +00:00
Fatih Aşıcı 1285cbb7fc Do not show traceback for handled pisi errors 2010-02-28 21:27:27 +00:00
Fatih Aşıcı 757e7d97a7 Catch empty dirs when searching for abandoned files.
Always show abandoned files whether the --debug option is given or not.

BUG:FIXED:12342
2010-02-28 20:50:14 +00:00
Fatih Aşıcı 0e3780eca9 Update messages 2010-02-28 19:27:30 +00:00
Fatih Aşıcı ed8984ef4c Yet another place that doesn't take -D parameter into account 2010-02-28 19:12:50 +00:00
Fatih Aşıcı f5005bb796 Take -D parameter into account when looking for file permission changes 2010-02-28 19:00:36 +00:00
Fatih Aşıcı 63e6498b5f Take -D parameter into account when checking files 2010-02-28 18:50:18 +00:00
Fatih Aşıcı 10669a97c2 Update ChangeLog 2010-02-28 18:32:32 +00:00
Fatih Aşıcı 812f81ee69 Show missing files in the output of pisi check 2010-02-28 18:32:24 +00:00
Fatih Aşıcı 31e35e9604 Check if the old and new paths refer to the same file when relocating or cleaning up.
This commit also fixes updates with delta packages when the destination
directory is "/" and fixes exceptions when an old file is not found.
2010-02-28 18:13:07 +00:00
Fatih Aşıcı f98a1d0d46 Update messages 2010-02-27 22:26:38 +00:00
Fatih Aşıcı 7741c72de2 Better 2010-02-27 22:09:06 +00:00
Fatih Aşıcı fcf0669476 Print human readable error messages. We must use str instead of unicode in order to use __str__ method of exception classes. 2010-02-27 21:32:58 +00:00
Fatih Aşıcı dbb9a91cd9 Remove redundant variable 2010-02-27 19:33:40 +00:00
Fatih Aşıcı 5504639ceb Install files into correct paths when the old package format is used.
This was a regression introduced when switching to python 2.6.
2010-02-27 19:29:09 +00:00
Serdar Dalgıç 1e8f3899bc warn_and_remove needs one more argument=repo 2010-02-23 13:18:00 +00:00
Fatih Aşıcı 7840983f1f Fix exceptions when path includes a trailing slash 2010-02-23 12:06:49 +00:00
Serdar Dalgıç dadaf38196 correct the function name. 2010-02-23 10:03:32 +00:00
Klemens Häckel 87de3694c1 update of some spanish language files (kh) 2010-02-23 00:47:55 +00:00
Fatih Aşıcı 5ac40e0e48 Create valid repos for test cases 2010-02-23 00:02:55 +00:00
Fatih Aşıcı ee085521db Fix archive tests 2010-02-22 21:53:31 +00:00
Fatih Aşıcı 980d491473 Add missing shebang 2010-02-22 21:31:08 +00:00
Fatih Aşıcı abd60acd98 Refactor get_file_type function 2010-02-22 17:56:03 +00:00
Fatih Aşıcı 5116d858c4 pisi 2.3_alpha1
This is the first alpha for the upcoming 2.3.x releases. This
release adds new features for building source packages on different
architectures.

Changes since 2.2.19
--------------------
Fatih Aşıcı (3):
      Allow comparing Version objects with strings
      Add target attribute to Archive tag. It can be used to extract the archive into a sub-directory.
      Remove the check for repository architecture

Gökçen Eraslan (1):
      Replace FileError with ctx.ui.error since FileError is defined in pisitoolsfunctions.

Ozan Çağlayan (8):
      Add Maintainer tag to components.xml.
      Handle possible None values for obj when the element is optional
      The size of the list doesn't really matter at all (#11818)
      Real fix for #6748: The exception is raised both in getcwd() and chdir()
      Blacklisted system.base packages aren't really ignored during update (#9991)
      Feature: Add ability to avoid source packages from building on specific architectures
      Feature: Use <AdditionalFiles> in <Source> tags
      Feature: Add ability to use multiple <Archive> tags for a source package

Serdar Dalgıç (1):
      Use glob.glob0 and lstrip instead of glob.glob to fix exceptions raising when an invalid file path is used.
2010-02-22 09:30:31 +00:00
Fatih Aşıcı 07deed2a3f Remove the check for repository architecture
The current infrastructure doesn't allow a unified repository for multiple
architectures.
2010-02-22 08:01:29 +00:00
Serdar Dalgıç f290b85cd7 Use glob.glob0 and lstrip instead of glob.glob.
Typos in filePaths in pspec.xml were sometimes ignored and abandoned files were not succesfully caught in some cases. Now it is fixed.

Thanks Fatih for the collaboration.
2010-02-22 06:47:48 +00:00
Fatih Aşıcı f394699f19 Add target attribute to Archive tag. It can be used to extract the archive into a sub-directory. 2010-02-20 20:42:20 +00:00
Fatih Aşıcı 4996e645fc Rename Pspec.set_archive as Pspec.add_arrchive in scenario api.
This was broken by multiple Archive tag support.
2010-02-20 15:38:22 +00:00
Doruk Fişek 18ca225e1e uniq -u 2010-02-20 13:17:32 +00:00