Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
efb97cc3
Kaydet (Commit)
efb97cc3
authored
Ock 23, 2010
tarafından
Ozan Çağlayan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add support for reverse applying a patch with <Patch reverse="[tT]rue">..
üst
2eb89439
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
4 deletions
+14
-4
ChangeLog
ChangeLog
+4
-0
pisi-spec.dtd
pisi-spec.dtd
+1
-0
pisi-spec.rng
pisi-spec.rng
+3
-0
build.py
pisi/operations/build.py
+2
-1
specfile.py
pisi/specfile.py
+1
-0
util.py
pisi/util.py
+3
-3
No files found.
ChangeLog
Dosyayı görüntüle @
efb97cc3
2010-01-23 Ozan Çağlayan <ozan@pardus.org.tr>
* Add support for optional reverse="[tT]rue" in <Patch> for reverse applying
a patch.
2010-01-22 Gökçen Eraslan <gokcen@pardus.org.tr>
* pisi/actionsapi/perlmodules.py: Do not ignore parameter in make
method (eg. perl Build test). Tests of some perl modules have never run
...
...
pisi-spec.dtd
Dosyayı görüntüle @
efb97cc3
...
...
@@ -63,6 +63,7 @@
<!ATTLIST Patch compressionType CDATA #IMPLIED>
<!ATTLIST Patch level CDATA #IMPLIED>
<!ATTLIST Patch target CDATA #IMPLIED>
<!ATTLIST Patch reverse CDATA #IMPLIED>
<!-- Package Section -->
...
...
pisi-spec.rng
Dosyayı görüntüle @
efb97cc3
...
...
@@ -1372,6 +1372,9 @@
<optional>
<attribute
name=
"target"
/>
</optional>
<optional>
<attribute
name=
"reverse"
/>
</optional>
</group>
</define>
...
...
pisi/operations/build.py
Dosyayı görüntüle @
efb97cc3
...
...
@@ -613,6 +613,7 @@ class Builder:
for
patch
in
self
.
spec
.
source
.
patches
:
patchFile
=
pisi
.
util
.
join_path
(
files_dir
,
patch
.
filename
)
relativePath
=
patch
.
filename
reverseApply
=
patch
.
reverse
.
lower
()
==
"true"
if
patch
.
compressionType
:
patchFile
=
pisi
.
util
.
uncompress
(
patchFile
,
compressType
=
patch
.
compressionType
,
...
...
@@ -620,7 +621,7 @@ class Builder:
relativePath
=
relativePath
.
rsplit
(
".
%
s"
%
patch
.
compressionType
,
1
)[
0
]
ctx
.
ui
.
action
(
_
(
"* Applying patch:
%
s"
)
%
patch
.
filename
)
pisi
.
util
.
do_patch
(
self
.
srcDir
,
patchFile
,
level
=
patch
.
level
,
name
=
relativePath
)
pisi
.
util
.
do_patch
(
self
.
srcDir
,
patchFile
,
level
=
patch
.
level
,
name
=
relativePath
,
reverse
=
reverseApply
)
return
True
def
generate_static_package_object
(
self
):
...
...
pisi/specfile.py
Dosyayı görüntüle @
efb97cc3
...
...
@@ -83,6 +83,7 @@ class Patch:
s_Filename
=
[
autoxml
.
String
,
autoxml
.
mandatory
]
a_compressionType
=
[
autoxml
.
String
,
autoxml
.
optional
]
a_level
=
[
autoxml
.
Integer
,
autoxml
.
optional
]
a_reverse
=
[
autoxml
.
String
,
autoxml
.
optional
]
#FIXME: what's the cleanest way to give a default value for reading level?
#def decode_hook(self, node, errs, where):
...
...
pisi/util.py
Dosyayı görüntüle @
efb97cc3
...
...
@@ -463,7 +463,7 @@ def uncompress(patchFile, compressType="gz", targetDir=None):
return
filePath
def
do_patch
(
sourceDir
,
patchFile
,
level
=
0
,
name
=
None
):
def
do_patch
(
sourceDir
,
patchFile
,
level
=
0
,
name
=
None
,
reverse
=
False
):
"""Apply given patch to the sourceDir."""
cwd
=
os
.
getcwd
()
if
os
.
path
.
exists
(
sourceDir
):
...
...
@@ -485,12 +485,12 @@ def do_patch(sourceDir, patchFile, level=0, name=None):
if
not
os
.
path
.
exists
(
patchesDir
):
os
.
makedirs
(
patchesDir
)
# Import original patch into quilt tree
(
ret
,
out
,
err
)
=
run_batch
(
'quilt import
-p
%
d -P
%
s
\"
%
s
\"
'
%
(
level
,
name
,
patchFile
))
(
ret
,
out
,
err
)
=
run_batch
(
'quilt import
%
s -p
%
d -P
%
s
\"
%
s
\"
'
%
((
"-R"
if
reverse
else
""
),
level
,
name
,
patchFile
))
# run quilt push to apply original patch into tree
(
ret
,
out
,
err
)
=
run_batch
(
'quilt push'
)
else
:
# run GNU patch to apply original patch into tree
(
ret
,
out
,
err
)
=
run_batch
(
"patch --remove-empty-files --no-backup-if-mismatch
-p
%
d <
\"
%
s
\"
"
%
(
level
,
patchFile
))
(
ret
,
out
,
err
)
=
run_batch
(
"patch --remove-empty-files --no-backup-if-mismatch
%
s -p
%
d <
\"
%
s
\"
"
%
((
"-R"
if
reverse
else
""
),
level
,
patchFile
))
if
ret
:
if
out
is
None
and
err
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment