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)
1
Konular (issue)
1
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
ce72fe4a
Kaydet (Commit)
ce72fe4a
authored
Haz 06, 2006
tarafından
Barış Metin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix the mess here. gen_metadata_xml shouldn't return a value that is
unreleated of it's job.
üst
3481d9cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
build.py
pisi/build.py
+14
-17
No files found.
pisi/build.py
Dosyayı görüntüle @
ce72fe4a
...
@@ -549,7 +549,7 @@ class Builder:
...
@@ -549,7 +549,7 @@ class Builder:
except
KeyError
:
except
KeyError
:
util
.
strip_directory
(
install_dir
)
util
.
strip_directory
(
install_dir
)
def
gen_metadata_xml
(
self
,
package
):
def
gen_metadata_xml
(
self
,
package
,
build_no
=
None
):
"""Generate the metadata.xml file for build source.
"""Generate the metadata.xml file for build source.
metadata.xml is composed of the information from specfile plus
metadata.xml is composed of the information from specfile plus
...
@@ -574,22 +574,12 @@ class Builder:
...
@@ -574,22 +574,12 @@ class Builder:
metadata
.
package
.
installedSize
=
size
metadata
.
package
.
installedSize
=
size
old_build
=
None
metadata
.
package
.
build
=
build_no
# build no
if
ctx
.
config
.
options
.
ignore_build_no
:
metadata
.
package
.
build
=
None
ctx
.
ui
.
warning
(
_
(
'Build number is not available due to --ignore-build'
))
elif
(
not
ctx
.
config
.
values
.
build
.
buildno
):
metadata
.
package
.
build
=
None
ctx
.
ui
.
warning
(
_
(
'Build number is not available. For repo builds you must enable buildno in pisi.conf.'
))
else
:
metadata
.
package
.
build
,
old_build
=
self
.
calc_build_no
(
metadata
.
package
.
name
)
metadata_xml_path
=
util
.
join_path
(
self
.
pkg_dir
(),
ctx
.
const
.
metadata_xml
)
metadata_xml_path
=
util
.
join_path
(
self
.
pkg_dir
(),
ctx
.
const
.
metadata_xml
)
metadata
.
write
(
metadata_xml_path
)
metadata
.
write
(
metadata_xml_path
)
self
.
metadata
=
metadata
self
.
metadata
=
metadata
return
metadata
.
package
.
build
,
old_build
def
gen_files_xml
(
self
,
package
):
def
gen_files_xml
(
self
,
package
):
"""Generates files.xml using the path definitions in specfile and
"""Generates files.xml using the path definitions in specfile and
...
@@ -756,7 +746,6 @@ class Builder:
...
@@ -756,7 +746,6 @@ class Builder:
if
afile
.
permission
:
if
afile
.
permission
:
# mode is octal!
# mode is octal!
os
.
chmod
(
dest
,
int
(
afile
.
permission
,
8
))
os
.
chmod
(
dest
,
int
(
afile
.
permission
,
8
))
os
.
chdir
(
c
)
os
.
chdir
(
c
)
ctx
.
ui
.
action
(
_
(
"** Building package
%
s"
)
%
package
.
name
);
ctx
.
ui
.
action
(
_
(
"** Building package
%
s"
)
%
package
.
name
);
...
@@ -764,8 +753,16 @@ class Builder:
...
@@ -764,8 +753,16 @@ class Builder:
ctx
.
ui
.
info
(
_
(
"Generating
%
s,"
)
%
ctx
.
const
.
files_xml
)
ctx
.
ui
.
info
(
_
(
"Generating
%
s,"
)
%
ctx
.
const
.
files_xml
)
self
.
gen_files_xml
(
package
)
self
.
gen_files_xml
(
package
)
# build number
if
ctx
.
config
.
options
.
ignore_build_no
or
not
ctx
.
config
.
values
.
build
.
buildno
:
build_no
=
old_build_no
=
None
ctx
.
ui
.
warning
(
_
(
'Build number is not available. For repo builds you must enable buildno in pisi.conf.'
))
else
:
build_no
,
old_build_no
=
self
.
calc_build_no
(
metadata
.
package
.
name
)
ctx
.
ui
.
info
(
_
(
"Generating
%
s,"
)
%
ctx
.
const
.
metadata_xml
)
ctx
.
ui
.
info
(
_
(
"Generating
%
s,"
)
%
ctx
.
const
.
metadata_xml
)
build_number
,
old_build_number
=
self
.
gen_metadata_xml
(
package
)
self
.
gen_metadata_xml
(
package
,
build_no
)
# Calculate new and oldpackage names for buildfarm
# Calculate new and oldpackage names for buildfarm
name
=
util
.
package_name
(
package
.
name
,
name
=
util
.
package_name
(
package
.
name
,
...
@@ -773,11 +770,11 @@ class Builder:
...
@@ -773,11 +770,11 @@ class Builder:
self
.
spec
.
source
.
release
,
self
.
spec
.
source
.
release
,
self
.
metadata
.
package
.
build
)
self
.
metadata
.
package
.
build
)
if
old_build_n
umber
:
if
old_build_n
o
:
old_package_name
=
util
.
package_name
(
package
.
name
,
old_package_name
=
util
.
package_name
(
package
.
name
,
self
.
spec
.
source
.
version
,
self
.
spec
.
source
.
version
,
self
.
spec
.
source
.
release
,
self
.
spec
.
source
.
release
,
old_build_n
umber
)
old_build_n
o
)
new_package_names
.
append
(
name
)
new_package_names
.
append
(
name
)
old_package_names
.
append
(
old_package_name
)
old_package_names
.
append
(
old_package_name
)
...
...
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